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

pack-priv Class RenameConstantAction

extends DDLSingleTableConstantAction
Class Inheritance
Imports
org.apache.derby.iapi.sql.dictionary.SchemaDescriptor, .TableDescriptor, .ColumnDescriptor, .ColumnDescriptorList, .ConglomerateDescriptor, .ConstraintDescriptor, .ConstraintDescriptorList, .ReferencedKeyConstraintDescriptor, .DataDictionary, org.apache.derby.iapi.store.access.TransactionController, org.apache.derby.iapi.sql.depend.DependencyManager, org.apache.derby.iapi.sql.conn.LanguageConnectionContext, org.apache.derby.shared.common.reference.SQLState, org.apache.derby.iapi.sql.Activation, .StatementType, org.apache.derby.iapi.sql.execute.ConstantAction, org.apache.derby.shared.common.error.StandardException, org.apache.derby.shared.common.sanity.SanityManager, org.apache.derby.catalog.UUID, org.apache.derby.iapi.services.io.FormatableBitSet, org.apache.derby.impl.sql.compile.ColumnDefinitionNode

This class describes actions that are ALWAYS performed for a RENAME TABLE/COLUMN/INDEX Statement at Execution time.

Field Summary

Modifier and TypeField and Description
private String
private String
private String
private String
private int
private UUID
private SchemaDescriptor
private String
private boolean
Inherited from org.apache.derby.impl.sql.execute.DDLSingleTableConstantAction:
tableId

Constructor Summary

AccessConstructor and Description
public
RenameConstantAction(String
Fully qualified table name
fullTableName
,
String
Table name.
tableName
,
String
This is either the name of column/index in case of rename column/index. For rename table, this is null.
oldObjectName
,
String
This is new name for table/column/index
newObjectName
,
SchemaDescriptor
Schema that table lives in.
sd
,
UUID
UUID for table
tableId
,
boolean
True-Used Alter Table, False-Used Rename. For rename index, this will always be false because there is no alter table command to rename index
usedAlterTable
,
int
Rename a 1 - table, 2 - column, 3 - index
renamingWhat
)

Make the ConstantAction for a RENAME TABLE/COLUMN/INDEX statement.

Method Summary

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

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

The guts of the Execution-time logic for RENAME TABLE/COLUMN/INDEX.

public String
public String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.

Inherited from org.apache.derby.impl.sql.execute.DDLSingleTableConstantAction:
dropConglomeratedropConglomeratedropConstraintdropConstraintdropConstraintexecuteConglomReplacementgetConglomReplacementActionrecreateUniqueConstraintBackingIndexAsUniqueWhenNotNull

Field Detail

fullTableNameback to summary
private String fullTableName
newObjectNameback to summary
private String newObjectName
newTableNameback to summary
private String newTableName
oldObjectNameback to summary
private String oldObjectName
renamingWhatback to summary
private int renamingWhat
schemaIdback to summary
private UUID schemaId
sdback to summary
private SchemaDescriptor sd
tableNameback to summary
private String tableName
usedAlterTableback to summary
private boolean usedAlterTable

Constructor Detail

RenameConstantActionback to summary
public RenameConstantAction(String fullTableName, String tableName, String oldObjectName, String newObjectName, SchemaDescriptor sd, UUID tableId, boolean usedAlterTable, int renamingWhat)

Make the ConstantAction for a RENAME TABLE/COLUMN/INDEX statement.

Parameters
fullTableName:String

Fully qualified table name

tableName:String

Table name.

oldObjectName:String

This is either the name of column/index in case of rename column/index. For rename table, this is null.

newObjectName:String

This is new name for table/column/index

sd:SchemaDescriptor

Schema that table lives in.

tableId:UUID

UUID for table

usedAlterTable:boolean

True-Used Alter Table, False-Used Rename. For rename index, this will always be false because there is no alter table command to rename index

renamingWhat:int

Rename a 1 - table, 2 - column, 3 - index

Method Detail

execGutsRenameColumnback to summary
private void execGutsRenameColumn(TableDescriptor td, Activation activation) throws StandardException
execGutsRenameIndexback to summary
private void execGutsRenameIndex(TableDescriptor td, Activation activation) throws StandardException
execGutsRenameTableback to summary
private void execGutsRenameTable(TableDescriptor td, Activation activation) throws StandardException
executeConstantActionback to summary
public void executeConstantAction(Activation activation) throws StandardException

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

The guts of the Execution-time logic for RENAME TABLE/COLUMN/INDEX.

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
ConstantAction#executeConstantAction
getTableNameback to summary
public String getTableName()
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