psdi.app.recontask.engine

Class ComparisonRule

  • java.lang.Object
    • psdi.app.recontask.engine.ComparisonRule


  • public class ComparisonRule
    extends java.lang.Object
    Definition of a Reconciliation Comparison Rule. - A comparison rule may have 1 filter for data set1 comprised of 1 or more clauses - A comparison rule may have 1 filter for data set2 comprised of 1 or more clauses - A comparison rule must have either a set of object matches (cardinality) found or a set of equality attributes - If comparison rule has object matches found, then at least 1 filter is required
    • Field Detail

      • compRuleMbo

        protected MboRemote compRuleMbo
      • filterExpression1

        protected ReconCompFilterExpression filterExpression1
        An expression representing the filter clauses of the 1st data set over the object attributes read in memory (that is, not carried out on the database side by a where clause)
      • filterExpression2

        protected ReconCompFilterExpression filterExpression2
        An expression representing the filter clauses of the 2nd data set over the object attributes read in memory (that is, not carried out on the database side by a where clause)
      • attributesEqualityExpression

        protected ReconCompAttributesEqualityExpression attributesEqualityExpression
        An expression representing the set of Attributes Equality clauses for this comparison rule
      • matchesFoundExpression

        protected ReconCompMatchesFoundExpression matchesFoundExpression
        An expression representing the set of Matches Found clauses for this comparison rule
    • Constructor Detail

      • ComparisonRule

        public ComparisonRule(ReconInfo reconInfo,
                              MboRemote rule)
                       throws MXException,
                              java.rmi.RemoteException,
                              java.sql.SQLException
        Constructs a comparison rule with the given comparison rule object
        Parameters:
        name - The comparison rule object
        Throws:
        MXException - If fails to obtain reconciliation business object
        java.rmi.RemoteException - If fails to obtain reconciliation business object
        java.sql.SQLException
    • Method Detail

      • getCompRuleMbo

        public MboRemote getCompRuleMbo()
      • setAttributesEqualityExpression

        protected void setAttributesEqualityExpression(ReconCompAttributesEqualityExpression expression)
        Assigns the attributes equality expression for this comparison rule
      • getAttributesEqualityExpression

        public ReconCompAttributesEqualityExpression getAttributesEqualityExpression()
        Returns the attributes equality expression for this comparison rule
        Returns:
        ReconCompAttributesEqualityExpression The set of attributes equality clauses as an expression
      • setMatchesFoundExpression

        protected void setMatchesFoundExpression(ReconCompMatchesFoundExpression expression)
        Assigns the matches found expression for this comparison rule
      • getMatchesFoundExpression

        public ReconCompMatchesFoundExpression getMatchesFoundExpression()
        Returns the matches found expression for this comparison rule
        Returns:
        ReconCompMatchesFoundExpression The set of matches found clauses as an expression
      • getName

        public java.lang.String getName()
                                 throws MXException,
                                        java.rmi.RemoteException
        Returns the name of this reconciliation comparison rule
        Returns:
        String The comparison rule name
        Throws:
        MXException
        java.rmi.RemoteException
      • hasAttributesEqualityExpression

        public boolean hasAttributesEqualityExpression()
        Tests if this comparison rule has attributes equality clauses
        Returns:
        boolean true if this comparison rule has an attributes equality expression; false otherwise
      • hasFilter1

        public boolean hasFilter1()
        Tests if this comparison rule has a data set1 filter associated it
        Returns:
        boolean true if this comparison rule has a data set1 filter; false otherwise
      • hasFilter2

        public boolean hasFilter2()
        Tests if this comparison rule has a data set2 filter
        Returns:
        boolean true if this comparison rule has a data set2 filter; false otherwise
      • hasMatchesFoundExpression

        public boolean hasMatchesFoundExpression()
        Tests if this comparison rule has matches found clauses
        Returns:
        boolean true if this comparison rule has a matches found expression; false otherwise
      • processRule

        protected void processRule(MboRemote rule)
                            throws MXException,
                                   java.rmi.RemoteException,
                                   java.sql.SQLException
        Parses a comparison rule into its distinct components: - data set1 filter (set of filter clauses) - data set2 filter (set of filter clauses) - matches found records (set of clauses) - attributes equality records (set of clauses)
        Parameters:
        rule - The comparison rule to disassemble
        Throws:
        MXException - If fails to obtain reconciliation business object
        java.rmi.RemoteException - If fails to obtain reconciliation business object
        java.sql.SQLException
      • extractObjectsAndAttributes

        protected void extractObjectsAndAttributes()
                                            throws MXException,
                                                   java.rmi.RemoteException
        Walks the expressions that were already processed and extract object names and attributes for the SQL queries for the database.
        Parameters:
        whereClauseMap - the clauses attached to the queries
        Throws:
        MXException
        java.rmi.RemoteException
      • readReconCompExpression

        protected ReconExpression readReconCompExpression(MboRemote rule,
                                                          java.lang.String relationship)
                                                   throws MXException,
                                                          java.rmi.RemoteException
        Retrieves an expression for this comparison rule
        Parameters:
        expression - The recipient object expression
        rule - The rule to process
        relationship - The relationship from rule object to the expressiono clauses to read
        Returns:
        expression, already set up
        Throws:
        MXException - If fails to obtain reconciliation business object
        java.rmi.RemoteException - If fails to obtain reconciliation business object
      • setFilterExpression2

        protected void setFilterExpression2(ReconCompFilterExpression expression)
        Assigns the data set1 Filter Expression.
      • setFilterExpression1

        protected void setFilterExpression1(ReconCompFilterExpression expression)
        Assigns the data set2 Filter Expression.
      • getFilterExpression1

        public ReconCompFilterExpression getFilterExpression1()
        Returns:
        Returns the data set1 Filter Expression.
      • getFilterExpression2

        public ReconCompFilterExpression getFilterExpression2()
        Returns:
        Returns the data set2 Filter Expression.