public class MatchingClauseConstantAction extends java.lang.Object implements ConstantAction, Formatable
| Modifier and Type | Field and Description |
|---|---|
private java.lang.String |
_actionMethodName |
private ResultSet |
_actionRS |
private int |
_clauseType |
private GeneratedMethod |
_matchRefinementMethod |
private java.lang.String |
_matchRefinementName |
private java.lang.String |
_resultSetFieldName |
private GeneratedMethod |
_rowMakingMethod |
private java.lang.String |
_rowMakingMethodName |
private ConstantAction |
_thenAction |
private ResultDescription |
_thenColumnSignature |
private static int |
FIRST_VERSION |
private static long |
serialVersionUID
Serial version produced by the serialver utility.
|
WHEN_MATCHED_THEN_DELETE, WHEN_MATCHED_THEN_UPDATE, WHEN_NOT_MATCHED_THEN_INSERT| Constructor and Description |
|---|
MatchingClauseConstantAction()
0-arg constructor needed by Formatable machinery
|
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.
|
| Modifier and Type | Method and Description |
|---|---|
private ExecRow |
bufferThenRow(Activation activation)
Construct and buffer a row for the INSERT/UPDATE/DELETE
action corresponding to this [ NOT ] MATCHED clause.
|
(package private) TemporaryRowHolderImpl |
bufferThenRow(Activation activation,
TemporaryRowHolderImpl thenRows,
ExecRow selectRow)
Construct and buffer a row for the INSERT/UPDATE/DELETE
action corresponding to this [ NOT ] MATCHED clause.
|
int |
clauseType()
Get the clause type: WHEN_NOT_MATCHED_THEN_INSERT, WHEN_MATCHED_THEN_UPDATE, WHEN_MATCHED_THEN_DELETE
|
(package private) void |
cleanUp()
Release resources at the end.
|
private TemporaryRowHolderImpl |
createThenRows(Activation activation)
Create the temporary table for holding the rows which are buffered up
for bulk-processing after the driving left join completes.
|
(package private) boolean |
evaluateRefinementClause(Activation activation)
Run the matching refinement clause associated with this WHEN [ NOT ] MATCHED clause.
|
void |
executeConstantAction(Activation activation)
Run the ConstantAction.
|
void |
executeConstantAction(Activation activation,
TemporaryRowHolderImpl thenRows) |
int |
getTypeFormatId()
Get the formatID which corresponds to this class.
|
(package private) void |
init()
Initialize this constant action, nulling out any transient state left over from
a previous use.
|
void |
readExternal(java.io.ObjectInput in)
Read this object from a stream of stored objects.
|
void |
writeExternal(java.io.ObjectOutput out)
Write this object to a stream of stored objects.
|
private static final long serialVersionUID
private static final int FIRST_VERSION
private int _clauseType
private java.lang.String _matchRefinementName
private ResultDescription _thenColumnSignature
private java.lang.String _rowMakingMethodName
private java.lang.String _resultSetFieldName
private java.lang.String _actionMethodName
private ConstantAction _thenAction
private transient GeneratedMethod _matchRefinementMethod
private transient GeneratedMethod _rowMakingMethod
private transient ResultSet _actionRS
public 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)
clauseType - WHEN_NOT_MATCHED_THEN_INSERT, WHEN_MATCHED_THEN_UPDATE, WHEN_MATCHED_THEN_DELETEmatchRefinementName - 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.public int clauseType()
public void executeConstantAction(Activation activation) throws StandardException
ConstantActionexecuteConstantAction in interface ConstantActionactivation - The execution environment for this constant action.StandardException - Thrown on failurepublic void executeConstantAction(Activation activation, TemporaryRowHolderImpl thenRows) throws StandardException
StandardExceptionvoid init() throws StandardException
Initialize this constant action, nulling out any transient state left over from a previous use.
StandardExceptionboolean 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.
StandardExceptionTemporaryRowHolderImpl bufferThenRow(Activation activation, TemporaryRowHolderImpl thenRows, ExecRow selectRow) throws StandardException
Construct and buffer a row for the INSERT/UPDATE/DELETE action corresponding to this [ NOT ] MATCHED clause. The buffered row is built from columns in the passed-in row. The passed-in row is the SELECT list of the MERGE statement's driving left join.
StandardExceptionvoid cleanUp()
throws StandardException
Release resources at the end.
StandardExceptionprivate ExecRow bufferThenRow(Activation activation) throws StandardException
Construct and buffer a row for the INSERT/UPDATE/DELETE action corresponding to this [ NOT ] MATCHED clause.
StandardExceptionprivate TemporaryRowHolderImpl createThenRows(Activation activation) throws StandardException
Create the temporary table for holding the rows which are buffered up for bulk-processing after the driving left join completes.
StandardExceptionpublic void readExternal(java.io.ObjectInput in)
throws java.io.IOException,
java.lang.ClassNotFoundException
readExternal in interface java.io.Externalizablein - read this.java.io.IOException - thrown on errorjava.lang.ClassNotFoundException - thrown on errorpublic void writeExternal(java.io.ObjectOutput out)
throws java.io.IOException
writeExternal in interface java.io.Externalizableout - write bytes here.java.io.IOException - thrown on errorpublic int getTypeFormatId()
getTypeFormatId in interface TypedFormatApache Derby V10.13 Internals - Copyright © 2004,2016 The Apache Software Foundation. All Rights Reserved.