psdi.app.recontask.engine

Class ReconOperatorCompCompareAttribute



  • public class ReconOperatorCompCompareAttribute
    extends ReconOperator
    Operator representing an attribute match operation
    • Field Detail

      • dataSet1ObjectName

        protected java.lang.String dataSet1ObjectName
      • registerObjectName

        protected java.lang.String registerObjectName
      • dataSet1AttributeName

        protected java.lang.String dataSet1AttributeName
      • dataset1AttributeIndex

        protected int dataset1AttributeIndex
      • dataSet2ObjectName

        protected java.lang.String dataSet2ObjectName
      • dataSet2AttributeName

        protected java.lang.String dataSet2AttributeName
      • dataset2AttributeIndex

        protected int dataset2AttributeIndex
    • Constructor Detail

      • ReconOperatorCompCompareAttribute

        public ReconOperatorCompCompareAttribute(ReconInfo reconInfo)
        Any comparison filter operator
        Parameters:
        operator -
    • Method Detail

      • getInstance

        public ReconOperator getInstance()
        Description copied from class: ReconOperator
        Factory-like method to allow operator objects that cache initializations to return a new instance instead of this
        Specified by:
        getInstance in class ReconOperator
        Returns:
        overrides will return a new instance
      • initialize

        protected void initialize(java.lang.String fullyQualifiedName1,
                                  java.lang.String fullyQualifiedName2,
                                  ComparisonQueryHelper qh)
                           throws java.rmi.RemoteException,
                                  MXException
        Throws:
        java.rmi.RemoteException
        MXException
      • getDataSet1Value

        protected java.lang.String getDataSet1Value(int idxDataSet1ObjectInstance)
      • getDataSet1Unit

        protected java.lang.String getDataSet1Unit(int idxDataSet1ObjectInstance)
      • getDataSet2Value

        protected java.lang.String getDataSet2Value(int idxDataSet2ObjectInstance)
      • getDataSet2Unit

        protected java.lang.String getDataSet2Unit(int idxDataSet2ObjectInstance)
      • evaluateOperator

        public ReconCompResult evaluateOperator(java.lang.String fullyQualifiedName1,
                                                java.lang.String fullyQualifiedName2,
                                                ComparisonQueryHelper qh)
                                         throws MXException,
                                                java.rmi.RemoteException
        Parameters:
        fullyQualifiedName1 -
        fullyQualifiedName2 -
        allStatements - a HashMap keyed on lower case object names, contains ComparisonStatement objects
        Returns:
        an object with result and references to the participated objects
        Throws:
        MXException
        java.rmi.RemoteException
      • compareTwoValues

        protected boolean compareTwoValues(java.lang.String valueDataSet1,
                                           java.lang.String unitDataSet1,
                                           java.lang.String valueDataSet2,
                                           java.lang.String unitDataSet2)
        In Maximo Classification Spec attributes we support two types of data ALN and NUMERIC. While on deployed site use can select any column type like BigInt, Decimal, etc. Therefore we try to convert both values to int and compare; if any of the conversion fails, tries to convert to double and compare; if conversion fails again on any value, compares lexicographically

      • If there is no unit on the deployed side, only values are compared
      • If there is a unit on the deployed side, the units must be literally the same, taking into account the task case sensitiveness
Parameters:
valueAuthorized - String representation of the authorized value
unitAuthorized - String representation of the authorized measurement unit
valueDeployed - String representation of the deployed value
unitDeployed - String representation of the deployed measurement unit
Returns:
true if values and units are equal
  • fillInDataSet1Data

    protected void fillInDataSet1Data(ReconCompResult ret,
                                      int idx,
                                      java.lang.Object val,
                                      java.lang.String unit)
    Parameters:
    ret -
    idxD -
    av -
  • fillInDataSet2Data

    protected void fillInDataSet2Data(ReconCompResult ret,
                                      int idx,
                                      java.lang.Object val,
                                      java.lang.String unit)
                               throws MXException,
                                      java.rmi.RemoteException
    Parameters:
    ret -
    dv -
    Throws:
    MXException
    java.rmi.RemoteException