org.apache.derby.impl.sql.execute
Class DDLConstantAction

java.lang.Object
  extended byorg.apache.derby.impl.sql.execute.GenericConstantAction
      extended byorg.apache.derby.impl.sql.execute.DDLConstantAction
All Implemented Interfaces:
ConstantAction
Direct Known Subclasses:
AddJarConstantAction, CreateAliasConstantAction, CreateSchemaConstantAction, CreateTableConstantAction, CreateViewConstantAction, DDLSingleTableConstantAction, DropAliasConstantAction, DropJarConstantAction, DropSchemaConstantAction, DropStatisticsConstantAction, DropViewConstantAction, ReplaceJarConstantAction, SavepointConstantAction, SetConstraintsConstantAction, UpdateStatisticsConstantAction

public abstract class DDLConstantAction
extends GenericConstantAction

Abstract class that has actions that are across all DDL actions.

Author:
jamie

Field Summary
 
Fields inherited from interface org.apache.derby.iapi.sql.execute.ConstantAction
RUNTIMESTATISTICS, STATISTICSTIMING
 
Constructor Summary
DDLConstantAction()
           
 
Method Summary
protected  java.lang.String constructToString(java.lang.String statementType, java.lang.String objectName)
           
(package private) static SchemaDescriptor getAndCheckSchemaDescriptor(DataDictionary dd, UUID schemaId, java.lang.String statementType)
          Get the schema descriptor for the schemaid.
(package private) static SchemaDescriptor getSchemaDescriptorForCreate(DataDictionary dd, Activation activation, java.lang.String schemaName)
          Get the schema descriptor in the creation of an object in the passed in schema.
(package private)  void lockTableForDDL(TransactionController tc, long heapConglomerateNumber, boolean exclusiveMode)
          Lock the table in exclusive or share mode to prevent deadlocks.
 boolean modifiesTableId(UUID tableId)
          Does this constant action modify the passed in table uuid?
 void readExternal(java.io.ObjectInput in)
           
 boolean upToDate()
          Reports whether these constants are up-to-date.
 void writeExternal(java.io.ObjectOutput out)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.apache.derby.iapi.sql.execute.ConstantAction
executeConstantAction
 

Constructor Detail

DDLConstantAction

public DDLConstantAction()
Method Detail

getAndCheckSchemaDescriptor

static SchemaDescriptor getAndCheckSchemaDescriptor(DataDictionary dd,
                                                    UUID schemaId,
                                                    java.lang.String statementType)
                                             throws StandardException
Get the schema descriptor for the schemaid.

Parameters:
dd - the data dictionary
schemaId - the schema id
statementType - string describing type of statement for error reporting. e.g. "ALTER STATEMENT"
Returns:
the schema descriptor
Throws:
StandardException - if schema is system schema

getSchemaDescriptorForCreate

static SchemaDescriptor getSchemaDescriptorForCreate(DataDictionary dd,
                                                     Activation activation,
                                                     java.lang.String schemaName)
                                              throws StandardException
Get the schema descriptor in the creation of an object in the passed in schema.

Parameters:
dd - the data dictionary
activation - activation
schemaName - name of the schema
Returns:
the schema descriptor
Throws:
StandardException - if the schema does not exist

lockTableForDDL

final void lockTableForDDL(TransactionController tc,
                           long heapConglomerateNumber,
                           boolean exclusiveMode)
                    throws StandardException
Lock the table in exclusive or share mode to prevent deadlocks.

Parameters:
tc - The TransactionController
heapConglomerateNumber - The conglomerate number for the heap.
exclusiveMode - Whether or not to lock the table in exclusive mode.
Returns:
Nothing.
Throws:
StandardException - if schema is system schema

modifiesTableId

public boolean modifiesTableId(UUID tableId)
                        throws StandardException
Does this constant action modify the passed in table uuid? By modify we mean add or drop things tied to this table (e.g. index, trigger, constraint). Things like views or spses that reference this table don't count.

Specified by:
modifiesTableId in interface ConstantAction
Overrides:
modifiesTableId in class GenericConstantAction
Parameters:
tableId - the table id
Throws:
StandardException - on error

constructToString

protected java.lang.String constructToString(java.lang.String statementType,
                                             java.lang.String objectName)

readExternal

public final void readExternal(java.io.ObjectInput in)

writeExternal

public final void writeExternal(java.io.ObjectOutput out)

upToDate

public final boolean upToDate()
                       throws StandardException
Reports whether these constants are up-to-date. This returns true for homogenous Cloudscape/Cloudsync. For the Plugin, this may return false;

Specified by:
upToDate in interface ConstantAction
Returns:
true if these constants are up-to-date false otherwise
Throws:
StandardException

Built on Tue 2006-10-10 19:23:47+0200, from revision exported

Apache Derby V10.1 Engine Documentation - Copyright © 1997,2005 The Apache Software Foundation or its licensors, as applicable.