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

java.lang.Object
  extended byorg.apache.derby.impl.sql.execute.GenericConstantAction
      extended byorg.apache.derby.impl.sql.execute.DDLConstantAction
          extended byorg.apache.derby.impl.sql.execute.DDLSingleTableConstantAction
              extended byorg.apache.derby.impl.sql.execute.DropTableConstantAction
All Implemented Interfaces:
ConstantAction

class DropTableConstantAction
extends DDLSingleTableConstantAction

This class describes actions that are ALWAYS performed for a DROP TABLE Statement at Execution time.

Author:
Rick Hillegas Extracted code from DropTableResultSet.

Field Summary
private  boolean cascade
           
private  long conglomerateNumber
           
private  java.lang.String fullTableName
           
private  SchemaDescriptor sd
           
protected  UUID tableId
           
private  java.lang.String tableName
           
 
Fields inherited from interface org.apache.derby.iapi.sql.execute.ConstantAction
RUNTIMESTATISTICS, STATISTICSTIMING
 
Constructor Summary
(package private) DropTableConstantAction(java.lang.String fullTableName, java.lang.String tableName, SchemaDescriptor sd, long conglomerateNumber, UUID tableId, int behavior)
          Make the ConstantAction for a DROP TABLE statement.
 
Method Summary
private  void dropAllConstraintDescriptors(TableDescriptor td, Activation activation)
           
 void executeConstantAction(Activation activation)
          This is the guts of the Execution-time logic for DROP TABLE.
 boolean modifiesTableId(UUID tableId)
          Does this constant action modify the passed in table uuid?
 java.lang.String toString()
           
 
Methods inherited from class org.apache.derby.impl.sql.execute.DDLConstantAction
constructToString, getAndCheckSchemaDescriptor, getSchemaDescriptorForCreate, lockTableForDDL, readExternal, upToDate, writeExternal
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

conglomerateNumber

private final long conglomerateNumber

fullTableName

private final java.lang.String fullTableName

tableName

private final java.lang.String tableName

sd

private final SchemaDescriptor sd

cascade

private final boolean cascade

tableId

protected UUID tableId
Constructor Detail

DropTableConstantAction

DropTableConstantAction(java.lang.String fullTableName,
                        java.lang.String tableName,
                        SchemaDescriptor sd,
                        long conglomerateNumber,
                        UUID tableId,
                        int behavior)
Make the ConstantAction for a DROP TABLE statement.

Parameters:
fullTableName - Fully qualified table name
tableName - Table name.
sd - Schema that table lives in.
tableId - UUID for table
behavior - drop behavior: RESTRICT, CASCADE or default
Method Detail

toString

public java.lang.String toString()

executeConstantAction

public void executeConstantAction(Activation activation)
                           throws StandardException
This is the guts of the Execution-time logic for DROP TABLE.

Parameters:
activation - The execution environment for this constant action.
Throws:
StandardException - Thrown on failure
See Also:
ConstantAction.executeConstantAction(org.apache.derby.iapi.sql.Activation)

dropAllConstraintDescriptors

private void dropAllConstraintDescriptors(TableDescriptor td,
                                          Activation activation)
                                   throws StandardException
Throws:
StandardException

modifiesTableId

public boolean modifiesTableId(UUID tableId)
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 DDLConstantAction
Parameters:
tableId - the table id

Built on Mon 2007-06-04 09:58:47+0400, from revision ???

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