Class MatchingClauseConstantAction

    • Field Detail

      • serialVersionUID

        private static final long serialVersionUID
        Serial version produced by the serialver utility. Needed in order to make serialization work reliably across different compilers.
        See Also:
        Constant Field Values
      • _clauseType

        private int _clauseType
      • _matchRefinementName

        private java.lang.String _matchRefinementName
      • _rowMakingMethodName

        private java.lang.String _rowMakingMethodName
      • _resultSetFieldName

        private java.lang.String _resultSetFieldName
      • _actionMethodName

        private java.lang.String _actionMethodName
      • _matchRefinementMethod

        private transient GeneratedMethod _matchRefinementMethod
      • _actionRS

        private transient ResultSet _actionRS
    • Constructor Detail

      • MatchingClauseConstantAction

        public MatchingClauseConstantAction()
        0-arg constructor needed by Formatable machinery
      • MatchingClauseConstantAction

        public MatchingClauseConstantAction​(int clauseType,
                                            java.lang.String matchRefinementName,
                                            ResultDescription thenColumnSignature,
                                            java.lang.String rowMakingMethodName,
                                            java.lang.String resultSetFieldName,
                                            java.lang.String actionMethodName,
                                            ConstantAction thenAction)
        Construct from thin air.
        Parameters:
        clauseType - WHEN_NOT_MATCHED_THEN_INSERT, WHEN_MATCHED_THEN_UPDATE, WHEN_MATCHED_THEN_DELETE
        matchRefinementName - Name of the method which evaluates the boolean expression in the WHEN clause.
        thenColumnSignature - The shape of the row which goes into the temporary table.
        rowMakingMethodName - Name of the method which populates the "then" row with expressions from the driving left join.
        resultSetFieldName - Name of the field which will be stuffed at runtime with the temporary table of relevant rows.
        actionMethodName - Name of the method which invokes the INSERT/UPDATE/DELETE action.
        thenAction - The ConstantAction describing the associated INSERT/UPDATE/DELETE action.
    • Method Detail

      • clauseType

        public int clauseType()
        Get the clause type: WHEN_NOT_MATCHED_THEN_INSERT, WHEN_MATCHED_THEN_UPDATE, WHEN_MATCHED_THEN_DELETE
      • evaluateRefinementClause

        boolean evaluateRefinementClause​(Activation activation)
                                  throws StandardException

        Run the matching refinement clause associated with this WHEN [ NOT ] MATCHED clause. The refinement is a boolean expression. Return the boolean value it resolves to. A boolean NULL is treated as false. If there is no refinement clause, then this method evaluates to true.

        Throws:
        StandardException
      • readExternal

        public void readExternal​(java.io.ObjectInput in)
                          throws java.io.IOException,
                                 java.lang.ClassNotFoundException
        Read this object from a stream of stored objects.
        Specified by:
        readExternal in interface java.io.Externalizable
        Parameters:
        in - read this.
        Throws:
        java.io.IOException - thrown on error
        java.lang.ClassNotFoundException - thrown on error
      • writeExternal

        public void writeExternal​(java.io.ObjectOutput out)
                           throws java.io.IOException
        Write this object to a stream of stored objects.
        Specified by:
        writeExternal in interface java.io.Externalizable
        Parameters:
        out - write bytes here.
        Throws:
        java.io.IOException - thrown on error
      • getTypeFormatId

        public int getTypeFormatId()
        Get the formatID which corresponds to this class.
        Specified by:
        getTypeFormatId in interface TypedFormat
        Returns:
        the formatID of this class