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[]
_matchingClauses
private static int
FIRST_VERSION
Serial 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 void
executeConstantAction(Activation activation)
Run the ConstantAction.MatchingClauseConstantAction
getMatchingClause(int idx)
Get the ith (0-based) matching clauseint
getTypeFormatId()
Get the formatID which corresponds to this class.int
matchingClauseCount()
Get the number of matching clausesvoid
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.
-
-
-
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:ConstantAction
Run the ConstantAction.- Specified by:
executeConstantAction
in 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.ClassNotFoundException
Read this object from a stream of stored objects.- Specified by:
readExternal
in 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.IOException
Write this object to a stream of stored objects.- Specified by:
writeExternal
in 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:
getTypeFormatId
in interfaceTypedFormat
- Returns:
- the formatID of this class
-
-