Top Description Fields Constructors Methods
org.apache.derby.impl.sql.execute

pack-priv Class CreateSequenceConstantAction

extends DDLConstantAction
Class Inheritance
Imports
org.apache.derby.shared.common.error.StandardException, org.apache.derby.iapi.sql.Activation, org.apache.derby.iapi.sql.dictionary.SchemaDescriptor, .SequenceDescriptor, .DataDictionary, .DataDescriptorGenerator, org.apache.derby.iapi.sql.conn.LanguageConnectionContext, org.apache.derby.iapi.store.access.TransactionController, org.apache.derby.iapi.types.DataTypeDescriptor, org.apache.derby.shared.common.reference.SQLState

This class performs actions that are ALWAYS performed for a CREATE SEQUENCE statement at execution time. These SQL objects are stored in the SYS.SYSSEQUENCES table.

Field Summary

Modifier and TypeField and Description
private boolean
private DataTypeDescriptor
private long
private long
private long
private String
private String
private long

Constructor Summary

AccessConstructor and Description
public
CreateSequenceConstantAction(String schemaName, String
The name of the sequence being created
sequenceName
,
DataTypeDescriptor
Exact numeric type of the new sequence
dataType
,
long
Starting value
initialValue
,
long
Increment amount
stepValue
,
long
Largest value returned by the sequence generator
maxValue
,
long
Smallest value returned by the sequence generator
minValue
,
boolean
True if the generator should wrap around, false otherwise
cycle
)

Make the ConstantAction for a CREATE SEQUENCE statement.

Method Summary

Modifier and TypeMethod and Description
public void
executeConstantAction(Activation
The execution environment for this constant action.
activation
)

Implements org.apache.derby.iapi.sql.execute.ConstantAction.executeConstantAction.

This is the guts of the Execution-time logic for CREATE SEQUENCE.

public String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.

Inherited from org.apache.derby.impl.sql.execute.DDLConstantAction:
addColumnDependenciesadjustUDTDependenciesadjustUDTDependenciesconstructToStringgetAndCheckSchemaDescriptorgetSchemaDescriptorForCreatelockTableForDDLstoreConstraintDependenciesOnPrivilegesstoreViewTriggerDependenciesOnPrivileges

Field Detail

_cycleback to summary
private boolean _cycle
_dataTypeback to summary
private DataTypeDescriptor _dataType
_initialValueback to summary
private long _initialValue
_maxValueback to summary
private long _maxValue
_minValueback to summary
private long _minValue
_schemaNameback to summary
private String _schemaName
_sequenceNameback to summary
private String _sequenceName
_stepValueback to summary
private long _stepValue

Constructor Detail

CreateSequenceConstantActionback to summary
public CreateSequenceConstantAction(String schemaName, String sequenceName, DataTypeDescriptor dataType, long initialValue, long stepValue, long maxValue, long minValue, boolean cycle)

Make the ConstantAction for a CREATE SEQUENCE statement. When executed, will create a sequence by the given name.

Parameters
sequenceName:String

The name of the sequence being created

dataType:DataTypeDescriptor

Exact numeric type of the new sequence

initialValue:long

Starting value

stepValue:long

Increment amount

maxValue:long

Largest value returned by the sequence generator

minValue:long

Smallest value returned by the sequence generator

cycle:boolean

True if the generator should wrap around, false otherwise

Method Detail

executeConstantActionback to summary
public void executeConstantAction(Activation activation) throws StandardException

Implements org.apache.derby.iapi.sql.execute.ConstantAction.executeConstantAction.

This is the guts of the Execution-time logic for CREATE SEQUENCE.

Parameters
activation:Activation

Doc from org.apache.derby.iapi.sql.execute.ConstantAction.executeConstantAction.

The execution environment for this constant action.

Exceptions
StandardException:
Thrown on failure
See Also
org.apache.derby.iapi.sql.execute.ConstantAction#executeConstantAction
toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object. Satisfying this method's contract implies a non-null result must be returned.

Returns:String

a string representation of the object