Class MergeConstantAction
- java.lang.Object
-
- org.apache.derby.impl.sql.execute.MergeConstantAction
-
- All Implemented Interfaces:
java.io.Externalizable,java.io.Serializable,Formatable,TypedFormat,ConstantAction
public class MergeConstantAction extends java.lang.Object implements ConstantAction, Formatable
Describes the execution machinery needed to evaluate a MERGE statement.- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description private MatchingClauseConstantAction[]_matchingClausesprivate static intFIRST_VERSIONSerial version produced by the serialver utility.-
Fields inherited from interface org.apache.derby.iapi.sql.execute.ConstantAction
WHEN_MATCHED_THEN_DELETE, WHEN_MATCHED_THEN_UPDATE, WHEN_NOT_MATCHED_THEN_INSERT
-
-
Constructor Summary
Constructors Constructor Description MergeConstantAction()0-arg constructor needed by Formatable machineryMergeConstantAction(ConstantAction[] matchingClauses)Construct from thin air.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidexecuteConstantAction(Activation activation)Run the ConstantAction.MatchingClauseConstantActiongetMatchingClause(int idx)Get the ith (0-based) matching clauseintgetTypeFormatId()Get the formatID which corresponds to this class.intmatchingClauseCount()Get the number of matching clausesvoidreadExternal(java.io.ObjectInput in)Read this object from a stream of stored objects.voidwriteExternal(java.io.ObjectOutput out)Write this object to a stream of stored objects.
-
-
-
Field Detail
-
FIRST_VERSION
private static final int FIRST_VERSION
Serial version produced by the serialver utility. Needed in order to make serialization work reliably across different compilers.- See Also:
- Constant Field Values
-
_matchingClauses
private MatchingClauseConstantAction[] _matchingClauses
-
-
Constructor Detail
-
MergeConstantAction
public MergeConstantAction()
0-arg constructor needed by Formatable machinery
-
MergeConstantAction
public MergeConstantAction(ConstantAction[] matchingClauses)
Construct from thin air.- Parameters:
matchingClauses- Constant actions for WHEN [ NOT ] MATCHED clauses.
-
-
Method Detail
-
matchingClauseCount
public int matchingClauseCount()
Get the number of matching clauses
-
getMatchingClause
public MatchingClauseConstantAction getMatchingClause(int idx)
Get the ith (0-based) matching clause
-
executeConstantAction
public void executeConstantAction(Activation activation) throws StandardException
Description copied from interface:ConstantActionRun the ConstantAction.- Specified by:
executeConstantActionin interfaceConstantAction- Parameters:
activation- The execution environment for this constant action.- Throws:
StandardException- Thrown on failure
-
readExternal
public void readExternal(java.io.ObjectInput in) throws java.io.IOException, java.lang.ClassNotFoundExceptionRead this object from a stream of stored objects.- Specified by:
readExternalin interfacejava.io.Externalizable- Parameters:
in- read this.- Throws:
java.io.IOException- thrown on errorjava.lang.ClassNotFoundException- thrown on error
-
writeExternal
public void writeExternal(java.io.ObjectOutput out) throws java.io.IOExceptionWrite this object to a stream of stored objects.- Specified by:
writeExternalin interfacejava.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:
getTypeFormatIdin interfaceTypedFormat- Returns:
- the formatID of this class
-
-