Class TableElementNode
- java.lang.Object
-
- org.apache.derby.impl.sql.compile.QueryTreeNode
-
- org.apache.derby.impl.sql.compile.TableElementNode
-
- All Implemented Interfaces:
Visitable
- Direct Known Subclasses:
ColumnDefinitionNode,ConstraintDefinitionNode
class TableElementNode extends QueryTreeNode
A TableElementNode is an item in a TableElementList, and represents a single table element such as a column or constraint in a CREATE TABLE or ALTER TABLE statement.
-
-
Field Summary
Fields Modifier and Type Field Description static intAT_ADD_CHECK_CONSTRAINTstatic intAT_ADD_FOREIGN_KEY_CONSTRAINTstatic intAT_ADD_PRIMARY_KEY_CONSTRAINTstatic intAT_ADD_UNIQUE_CONSTRAINTstatic intAT_DROP_COLUMNstatic intAT_DROP_CONSTRAINTstatic intAT_MODIFY_COLUMNstatic intAT_MODIFY_CONSTRAINTstatic intAT_UNKNOWN(package private) intelementType(package private) java.lang.Stringname-
Fields inherited from class org.apache.derby.impl.sql.compile.QueryTreeNode
AUTOINCREMENT_CREATE_MODIFY, AUTOINCREMENT_CYCLE, AUTOINCREMENT_INC_INDEX, AUTOINCREMENT_IS_AUTOINCREMENT_INDEX, AUTOINCREMENT_START_INDEX
-
-
Constructor Summary
Constructors Constructor Description TableElementNode(java.lang.String name, ContextManager cm)Constructor for a TableElementNode
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description (package private) intgetElementType()Get the type of this table element.(package private) java.lang.StringgetName()Get the name from this node.(package private) booleanhasCheckConstraint()Does this element have a check constraint.(package private) booleanhasConstraint()Does this element have a constraint on it.(package private) booleanhasForeignKeyConstraint()Does this element have a foreign key constraint.(package private) booleanhasPrimaryKeyConstraint()Does this element have a primary key constraint.(package private) booleanhasUniqueKeyConstraint()Does this element have a unique key constraint.java.lang.StringtoString()Convert this object to a String.-
Methods inherited from class org.apache.derby.impl.sql.compile.QueryTreeNode
accept, acceptChildren, addTag, addUDTUsagePriv, addUDTUsagePriv, bindOffsetFetch, bindRowMultiSet, bindUserCatalogType, bindUserType, checkReliability, checkReliability, convertDefaultNode, copyTagsFrom, createTypeDependency, debugFlush, debugPrint, disablePrivilegeCollection, formatNodeString, generate, generateAuthorizeCheck, getBeginOffset, getClassFactory, getCompilerContext, getContext, getContextManager, getDataDictionary, getDependencyManager, getEndOffset, getExecutionFactory, getGenericConstantActionFactory, getIntProperty, getLanguageConnectionContext, getLongProperty, getNullNode, getOffsetOrderedNodes, getOptimizerFactory, getOptimizerTracer, getParameterTypes, getSchemaDescriptor, getSchemaDescriptor, getStatementType, getTableDescriptor, getTypeCompiler, getUDTDesc, isAtomic, isPrivilegeCollectionRequired, isSessionSchema, isSessionSchema, makeConstantAction, makeTableName, makeTableName, nodeHeader, optimizerTracingIsOn, orReliability, parseSearchCondition, parseStatement, printLabel, printSubNodes, referencesSessionSchema, resolveTableToSynonym, setBeginOffset, setEndOffset, setRefActionInfo, stackPrint, taggedWith, treePrint, treePrint, verifyClassExist
-
-
-
-
Field Detail
-
AT_UNKNOWN
public static final int AT_UNKNOWN
- See Also:
- Constant Field Values
-
AT_ADD_FOREIGN_KEY_CONSTRAINT
public static final int AT_ADD_FOREIGN_KEY_CONSTRAINT
- See Also:
- Constant Field Values
-
AT_ADD_PRIMARY_KEY_CONSTRAINT
public static final int AT_ADD_PRIMARY_KEY_CONSTRAINT
- See Also:
- Constant Field Values
-
AT_ADD_UNIQUE_CONSTRAINT
public static final int AT_ADD_UNIQUE_CONSTRAINT
- See Also:
- Constant Field Values
-
AT_ADD_CHECK_CONSTRAINT
public static final int AT_ADD_CHECK_CONSTRAINT
- See Also:
- Constant Field Values
-
AT_DROP_CONSTRAINT
public static final int AT_DROP_CONSTRAINT
- See Also:
- Constant Field Values
-
AT_MODIFY_COLUMN
public static final int AT_MODIFY_COLUMN
- See Also:
- Constant Field Values
-
AT_DROP_COLUMN
public static final int AT_DROP_COLUMN
- See Also:
- Constant Field Values
-
AT_MODIFY_CONSTRAINT
public static final int AT_MODIFY_CONSTRAINT
- See Also:
- Constant Field Values
-
name
java.lang.String name
-
elementType
int elementType
-
-
Constructor Detail
-
TableElementNode
TableElementNode(java.lang.String name, ContextManager cm)Constructor for a TableElementNode- Parameters:
name- The name of the table element, if any
-
-
Method Detail
-
toString
public java.lang.String toString()
Convert this object to a String. See comments in QueryTreeNode.java for how this should be done for tree printing.- Overrides:
toStringin classQueryTreeNode- Returns:
- This object as a String
-
hasPrimaryKeyConstraint
boolean hasPrimaryKeyConstraint()
Does this element have a primary key constraint.- Returns:
- boolean Whether or not this element has a primary key constraint
-
hasUniqueKeyConstraint
boolean hasUniqueKeyConstraint()
Does this element have a unique key constraint.- Returns:
- boolean Whether or not this element has a unique key constraint
-
hasForeignKeyConstraint
boolean hasForeignKeyConstraint()
Does this element have a foreign key constraint.- Returns:
- boolean Whether or not this element has a foreign key constraint
-
hasCheckConstraint
boolean hasCheckConstraint()
Does this element have a check constraint.- Returns:
- boolean Whether or not this element has a check constraint
-
hasConstraint
boolean hasConstraint()
Does this element have a constraint on it.- Returns:
- boolean Whether or not this element has a constraint on it
-
getName
java.lang.String getName()
Get the name from this node.- Returns:
- String The name.
-
getElementType
int getElementType()
Get the type of this table element.- Returns:
- one of the constants at the front of this file
-
-