psdi.app.recontask.engine.dataset

Interface DataSet

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method and Description
      java.lang.String[] getAttributesExcludeList(java.lang.String objectname)
      Not all attributes of an object may be available for linking, comparison filtering, or comparison.
      java.lang.String getDataSetName()
      Returns the data set name that's assign to the data set by the engine through setDataSetName().
      java.lang.String[] getExtraTableNamesForComparison(java.lang.String tableName)
      When retrieving data from a table for comparison, other tables may need to be joined in in order to get the correct results.
      java.lang.String getFixedTaskFilterWhereClause()
      The recon engine calls this method to check if the data set wants to impose a global where clause for filtering the root objects for all recon tasks at link time, in addition to task filters.
      java.lang.String getMainObjectName()
      The data set class needs to implement this method to provide the name of its main object that will be reconciled.
      java.lang.String[] getMainObjectPrimaryKeys()
      Returns the names of the primary keys of the main object of this data set, in the order of primary key sequence as defined in MAXATTRIBUTES.
      java.lang.String getMainObjectUID()
      Returns the name of the Maximo unique ID of the main object of this data set.
      java.lang.String getMasterForSpec(java.lang.String specObjectName)
      Convenience method that returns the master object name of a spec object, consistent with the information provided by getObjectSpecPairs.
      java.lang.String[] getObjectNameDomainExcludeList(java.lang.String objectName)
      Not all objects defined in the object name domain may be available for linking, comparison filtering, records comparison or attribute comparison.
      java.lang.String getObjectNameDomainID()
      All objects, including class spec objects, that can be linked or compared with the data set must be defined in a synonym domain.
      java.lang.String[][] getObjectSpecPairs()
      If the reconciliation can be performed on a class specification of an object, the recon engine will read in the spec object data along with that of the master object.
      java.lang.String getObjectUID(java.lang.String objectName)
      Convenience function that returns the Maximo unique ID of a given object.
      ResultTableAttributes getReconLinkAttributeNamesForLink(boolean isDataSet1)
      The data set uses this method to map database table columns that are specific to the data set to the ones in the RECONLINK db table for the successful results of the linking phase.
      ReconLinkerI getReconLinker()
      whether the data set wants to handle linking...
      ResultTableAttributes getReconResultAttributeNamesForComparison(boolean isDataSet1)
      The data set uses this method to map database table columns that are specific to the data set to the ones in the RECONRESULT table for the successful or unsuccessful results of the comparison phase.
      ResultTableAttributes getReconResultAttributeNamesForLink(boolean isDataSet1)
      The data set uses this method to map database table columns that are specific to the data set to the ones in the RECONRESULT table for the successful results of the linking phase.
      int getRecordCount(java.util.Map rootValues, java.lang.String tableName, java.lang.String classStructureID)
      For record match comparison, the recon engine reads in the proper data and count the numbers of them for comparison.
      java.lang.String getRootClassstructureID(java.lang.String objectname)
      If the reconciliation can be performed on a class specification of an object, it may be desired that only decendants of a root class are included in the reconciliation process.
      java.lang.String getSpecForMaster(java.lang.String masterObjectName)
      Convenience method that returns the spec object name of a master object, consistent with the information provided by getObjectSpecPairs.
      java.lang.String getTableColumnNameForTaskFilter(java.lang.String attributeName)
      Returns the true table column name for an attribute name defined in the task filter attribute domain.
      java.lang.String getTableJoinWhereClauseForComparison(java.lang.String tableName, java.util.Map parentValues)
      At the comparison phase the recon engine needs to read in more data using the top level main objects calculated from the linking process.
      java.lang.String getTableJoinWhereClauseForTaskFilter(java.lang.String tableName)
      In case that one or more attributes of the task filter attribute domain are from database tables other than the main table, the data set class needs to implement this method to tell the recon engine, in the form of a SQL where clause, how to join those other tables with the main table.
      java.lang.String getTableNameForTaskFilter(java.lang.String attributeName)
      Returns the table name for an attribute name defined in the task filter attribute domain.
      java.lang.String getTaskFilterAttributesDomainID()
      The available attributes of task filters for any data set are defined by synonym domain.
      java.lang.String getTaskFilterClause()
      Set a where clause to add to the task filter
      boolean isUnitOfMeasureAllowed(java.lang.String objectName)
      Determines whether the dataset allows use of the "Unit of Measure" attribute for all or part of its subtypes.
      void setContext(DataSetContext context)
      The recon engine calls this method to pass a ReconContext object to the data set.
      void setDataSetName(java.lang.String datasetName)
      The recon engine calls this method to assign a name to the data set.
      void setTaskFilterClause(java.lang.String filterClause) 
    • Method Detail

      • setContext

        void setContext(DataSetContext context)
        The recon engine calls this method to pass a ReconContext object to the data set. The data set can use the ReconContext to access information and services provided by the recon engine.
        There is no need to implement this method if the data set class extends CommonDataSet.
        Parameters:
        context - The ReconContext passed in from recon engine.
        See Also:
        ReconContext
      • setDataSetName

        void setDataSetName(java.lang.String datasetName)
        The recon engine calls this method to assign a name to the data set. This is normally the same name as defined in the synoyndomain RECONTYPE.
        There is no need to implement this method if the data set class extends CommonDataSet.
        Parameters:
        datasetName - The name that's assigned to this data set.
      • getDataSetName

        java.lang.String getDataSetName()
        Returns the data set name that's assign to the data set by the engine through setDataSetName().
        There is no need to implement this method if the data set class extends CommonDataSet.
        Returns:
        The data set name that's assign to the data set by the engine.
      • getMainObjectName

        java.lang.String getMainObjectName()
        The data set class needs to implement this method to provide the name of its main object that will be reconciled. The name can be in either upper case or lower case or mixed.
        Returns:
        The main object name of this data set.
      • getMainObjectPrimaryKeys

        java.lang.String[] getMainObjectPrimaryKeys()
                                             throws MXException,
                                                    java.rmi.RemoteException
        Returns the names of the primary keys of the main object of this data set, in the order of primary key sequence as defined in MAXATTRIBUTES.
        There is no need to implement this method if the data set class extends CommonDataSet.
        Returns:
        The primary key names in a String array.
        Throws:
        MXException
        java.rmi.RemoteException
      • getMainObjectUID

        java.lang.String getMainObjectUID()
                                   throws MXException,
                                          java.rmi.RemoteException
        Returns the name of the Maximo unique ID of the main object of this data set.
        There is no need to implement this method if the data set class extends CommonDataSet, unless the data set wishes to assign a different attribute as the unique ID for reconciliation.
        Returns:
        The unique ID.
        Throws:
        MXException
        java.rmi.RemoteException
      • getObjectUID

        java.lang.String getObjectUID(java.lang.String objectName)
                               throws MXException,
                                      java.rmi.RemoteException
        Convenience function that returns the Maximo unique ID of a given object.
        There is no need to implement this method if the data set class extends CommonDataSet.
        Parameters:
        objectName - The object name whose unique ID is to be obtained
        Returns:
        The unique ID of the object
        Throws:
        MXException
        java.rmi.RemoteException
      • getFixedTaskFilterWhereClause

        java.lang.String getFixedTaskFilterWhereClause()
                                                throws MXException,
                                                       java.rmi.RemoteException,
                                                       java.sql.SQLException
        The recon engine calls this method to check if the data set wants to impose a global where clause for filtering the root objects for all recon tasks at link time, in addition to task filters. The where clause returned by this method will be and'ed with the one generated from the task filter, if one is defined.
        Column names in the returned where clause should be prefixed with corresponding table names ,such as
        asset.moved=:0
        Returns:
        The global where clause for filtering in link, or null if none is to be defined.
        Throws:
        MXException
        java.rmi.RemoteException
        java.sql.SQLException
      • getTaskFilterAttributesDomainID

        java.lang.String getTaskFilterAttributesDomainID()
        The available attributes of task filters for any data set are defined by synonym domain. The data set class provides the ID of the domain using this method. This method must be implemented by all data set classes. It is used in both the recon engine and the recon taks filter application.
        Notice that the attributes defined in the domain may or may not be from the main table, and their names may or may not be the same as the corresponding column names in the database tables.
        Returns:
        The synonyn domain ID that defines the list of filter attributes.
      • getTableColumnNameForTaskFilter

        java.lang.String getTableColumnNameForTaskFilter(java.lang.String attributeName)
        Returns the true table column name for an attribute name defined in the task filter attribute domain. There is no need to implement this method if the data set class extends CommonDataSet and all attributes in the task filter attribute name domain are the same as their corresponding DB table column names.
        Parameters:
        attributeName - The attribute name whose table column name is inquired
        Returns:
        The true table column of the attribute, which may or may not be the same as the attribute itself.
        See Also:
        getTaskFilterAttributesDomainID.
      • getTableNameForTaskFilter

        java.lang.String getTableNameForTaskFilter(java.lang.String attributeName)
        Returns the table name for an attribute name defined in the task filter attribute domain. There is no need to implement this method if the data set class extends CommonDataSet and all attributes in the task filter attribute name domain are from the main table of the data set.
        Parameters:
        attributeName - The attribute name whose table name is inquired
        Returns:
        The true table column of the attribute, which may or may not be the same as main table name.
        See Also:
        getTaskFilterAttributesDomainID.
      • getTableJoinWhereClauseForTaskFilter

        java.lang.String getTableJoinWhereClauseForTaskFilter(java.lang.String tableName)
        In case that one or more attributes of the task filter attribute domain are from database tables other than the main table, the data set class needs to implement this method to tell the recon engine, in the form of a SQL where clause, how to join those other tables with the main table. There is no need to implement this method if the data set class extends CommonDataSet and all attributes in the task filter attribute name domain are from the main table of the data set.
        Column names in the returned where clause should be prefixed with corresponding table names ,such as
        asset.assetnum = assetusercust.assetnum
        Parameters:
        tableName - The name of the table that needs to be joined with the main table.
        Returns:
        The SQL where clause that joins the table in the parameter and the main table. Return null if the table name is the same as the main table.
        See Also:
        getTaskFilterAttributesDomainID.
      • getObjectNameDomainID

        java.lang.String getObjectNameDomainID()
        All objects, including class spec objects, that can be linked or compared with the data set must be defined in a synonym domain. The recon GUI and engine will call this method to get the ID of this domain.
        Returns:
        The object names domain ID.
      • getObjectNameDomainExcludeList

        java.lang.String[] getObjectNameDomainExcludeList(java.lang.String objectName)
        Not all objects defined in the object name domain may be available for linking, comparison filtering, records comparison or attribute comparison. This method is used by the data set to exclude some objects from of the object list from the GUI in one of these situation.
        Parameters:
        objectName - Name of object that uses the domain. This is used to distiguish the circumstance of the call. The value "RECONLINKCLAUSE" is for linking, "RECONCOMPFLTRAST" or "RECONCOMPFLTRDPA" is for comparison filter, "RECONRCDCLAUSE" is for records comparison and "RECONATTRCLAUSE" is for attribute comparison.
        Returns:
        Elements to exclude from the object name domain, null if none is to be excluded.
        See Also:
        getObjectNameDomainID
      • getAttributesExcludeList

        java.lang.String[] getAttributesExcludeList(java.lang.String objectname)
        Not all attributes of an object may be available for linking, comparison filtering, or comparison. This method is used by the data set to exclude some attributes from the attribute list in the GUI when an object is selected.
        Parameters:
        objectName - Name of object whose attributes are to be excluded.
        Returns:
        names of attributes to exclude from the attribute list, null if none is to be excluded.
        See Also:
        getObjectNameDomainID
      • getRootClassstructureID

        java.lang.String getRootClassstructureID(java.lang.String objectname)
                                          throws MXException,
                                                 java.rmi.RemoteException
        If the reconciliation can be performed on a class specification of an object, it may be desired that only decendants of a root class are included in the reconciliation process. In this case this method should be implemented to provide the root class structure id to the recon engine and GUI applications.
        Parameters:
        objectName - Name of spec object whose root class structure id is defined.
        Returns:
        root class structure id, or null if the object is not of class specification or all class structure ids are to be included.
        Throws:
        MXException
        java.rmi.RemoteException
      • getObjectSpecPairs

        java.lang.String[][] getObjectSpecPairs()
        If the reconciliation can be performed on a class specification of an object, the recon engine will read in the spec object data along with that of the master object. The data set does not need to provide a SQL where clause of how to join the spec objects to their master objects. It only need to implement this method to pair up all the master objects and their spec objects.
        The master and spec object pairs are provided as an array, with every element of the array lists one pair. Each element in turn is a String array with 2 elements. The 1st element is the master object name and the 2nd element is the spec object name.
        Returns:
        The object-spec pairs, or null if spec is not used in this data set.
      • getMasterForSpec

        java.lang.String getMasterForSpec(java.lang.String specObjectName)
        Convenience method that returns the master object name of a spec object, consistent with the information provided by getObjectSpecPairs. There is no need to implement this method if the data set class extends CommonDataSet
        Parameters:
        specObjectName - The name of the spec object whose master object name is to be obtained
        Returns:
        The master object name, or null if the name passed in as parameter is not a spec object.
        See Also:
        getObjectSpecPairs
      • getSpecForMaster

        java.lang.String getSpecForMaster(java.lang.String masterObjectName)
        Convenience method that returns the spec object name of a master object, consistent with the information provided by getObjectSpecPairs. There is no need to implement this method if the data set class extends CommonDataSet
        Parameters:
        masterObjectName - The name of the master object whose spec object name is to be obtained
        Returns:
        The spec object name, or null if the name passed in as parameter is not a master object.
        See Also:
        getObjectSpecPairs
      • getReconLinkAttributeNamesForLink

        ResultTableAttributes getReconLinkAttributeNamesForLink(boolean isDataSet1)
        The data set uses this method to map database table columns that are specific to the data set to the ones in the RECONLINK db table for the successful results of the linking phase. The values of these columns are copied from attributes of the objects that are involved during the linking process.
        The names are provided in the form of a ResultTableAttributes object which maintains a list of attribute names and the reconciliation result table (RECONLINK and RECONRESULT) column names they map to. The data set class normally instantiates a ResultTableAttributes, adds the attributes and returns it.
        Returns:
        The data set specific RECONLINK table columns.
        See Also:
        ResultTableAttributes
      • getReconResultAttributeNamesForLink

        ResultTableAttributes getReconResultAttributeNamesForLink(boolean isDataSet1)
        The data set uses this method to map database table columns that are specific to the data set to the ones in the RECONRESULT table for the successful results of the linking phase. The values of these columns are copied from attributes of the objects that are involved during the linking process.
        The names are provided in the form of a ResultTableAttributes object which maintains a list of attribute names and the reconciliation result table (RECONLINK and RECONRESULT) column names they map to. The data set class normally instantiates a ResultTableAttributes, adds the attributes and returns it.
        Returns:
        The data set specific RECONRESULT table columns.
        See Also:
        ResultTableAttributes
      • getReconResultAttributeNamesForComparison

        ResultTableAttributes getReconResultAttributeNamesForComparison(boolean isDataSet1)
        The data set uses this method to map database table columns that are specific to the data set to the ones in the RECONRESULT table for the successful or unsuccessful results of the comparison phase. The values of these columns are copied from attributes of the objects that are involved during the comparison process.
        The names are provided in the form of a ResultTableAttributes object which maintains a list of attribute names and the reconciliation result table (RECONLINK and RECONRESULT) column names they map to. The data set class normally instantiates a ResultTableAttributes, adds the attributes and returns it.
        Returns:
        The data set specific RECONRESULT table columns.
        See Also:
        ResultTableAttributes
      • getTableJoinWhereClauseForComparison

        java.lang.String getTableJoinWhereClauseForComparison(java.lang.String tableName,
                                                              java.util.Map parentValues)
                                                       throws MXException,
                                                              java.rmi.RemoteException,
                                                              java.sql.SQLException
        At the comparison phase the recon engine needs to read in more data using the top level main objects calculated from the linking process. To get the necessary data for comparison, the recon engine will,
        1. read in children main objects of the top level main object, this should include the top level object itself.
        2. for each main (top level and children) object read in objects of other types.
        This method is provided by the data set to help in both steps. In step #1 the engine will pass the main object table name and the key values from the top level main object. in step #2 it will pass in the sub object name and the key values from the main object.
        Column names in the returned where clause should be prefixed with corresponding table names ,such as
        asset.assetid=:0
        Notice that the spec objects won't be included in this process. The recon engine will identify spec objects based on the information provided by the getObjectSpecPairs() method and it knows how to load the specs per Maximo rules.
        Parameters:
        tableName - The name of the table from which data is to be retrieved.
        parentValues - The key values of the main table. this should at least include the unique IDs and primary key values. This parameter maps attribute names to attribute values.
        Returns:
        The where clause that joins the table and the main object table.
        Throws:
        MXException
        java.rmi.RemoteException
        java.sql.SQLException
      • getExtraTableNamesForComparison

        java.lang.String[] getExtraTableNamesForComparison(java.lang.String tableName)
        When retrieving data from a table for comparison, other tables may need to be joined in in order to get the correct results. In this case this method needs to be implemented to provide information about those extra tables.
        Parameters:
        tableName - The name of the table from which data is to be retrieved.
        Returns:
        The list of names of extra tables that might be involved, or null if none is needed.
        See Also:
        getTableJoinWhereClauseForComparison
      • getRecordCount

        int getRecordCount(java.util.Map rootValues,
                           java.lang.String tableName,
                           java.lang.String classStructureID)
                    throws MXException,
                           java.rmi.RemoteException,
                           java.sql.SQLException
        For record match comparison, the recon engine reads in the proper data and count the numbers of them for comparison. But the data set may decide that's not the right way to count records in some special cases. In these cases it should implement this mehod to count the records itself.
        There is no need to implement this method if the data set class extends CommonDataSet and it doesn't provide a special count method.
        Parameters:
        rootValues - The top level main object key values for this comparison.
        tableName - The name of the table to be counted.
        classStructureID - The class structure ID if the table involved is a spec object
        Returns:
        record count of the given table, or -1 if the data set doesn't provide a special counting method.
        Throws:
        MXException
        java.rmi.RemoteException
        java.sql.SQLException
      • isUnitOfMeasureAllowed

        boolean isUnitOfMeasureAllowed(java.lang.String objectName)
        Determines whether the dataset allows use of the "Unit of Measure" attribute for all or part of its subtypes.
        Parameters:
        objectName - The name of a subset.
        Returns:
        boolean Whether or not the use of the "Unit of Measure" attribute is allowed.
      • getTaskFilterClause

        java.lang.String getTaskFilterClause()
        Set a where clause to add to the task filter
        Parameters:
        filter -
      • setTaskFilterClause

        void setTaskFilterClause(java.lang.String filterClause)
      • getReconLinker

        ReconLinkerI getReconLinker()
        whether the data set wants to handle linking...
        Returns: