org.apache.derby.impl.sql.compile
Class TableElementNode

java.lang.Object
  extended by org.apache.derby.impl.sql.compile.QueryTreeNode
      extended by org.apache.derby.impl.sql.compile.TableElementNode
All Implemented Interfaces:
Visitable
Direct Known Subclasses:
ColumnDefinitionNode, ConstraintDefinitionNode

public 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
static int AT_ADD_CHECK_CONSTRAINT
           
static int AT_ADD_FOREIGN_KEY_CONSTRAINT
           
static int AT_ADD_PRIMARY_KEY_CONSTRAINT
           
static int AT_ADD_UNIQUE_CONSTRAINT
           
static int AT_DROP_COLUMN
           
static int AT_DROP_CONSTRAINT
           
static int AT_MODIFY_COLUMN
           
static int AT_UNKNOWN
           
(package private)  int elementType
           
(package private)  java.lang.String name
           
 
Fields inherited from class org.apache.derby.impl.sql.compile.QueryTreeNode
AUTOINCREMENT_CREATE_MODIFY, AUTOINCREMENT_INC_INDEX, AUTOINCREMENT_IS_AUTOINCREMENT_INDEX, AUTOINCREMENT_START_INDEX, isPrivilegeCollectionRequired
 
Constructor Summary
TableElementNode()
           
 
Method Summary
(package private)  int getElementType()
          Get the type of this table element.
 java.lang.String getName()
          Get the name from this node.
(package private)  boolean hasCheckConstraint()
          Does this element have a check constraint.
(package private)  boolean hasConstraint()
          Does this element have a constraint on it.
(package private)  boolean hasForeignKeyConstraint()
          Does this element have a foreign key constraint.
(package private)  boolean hasPrimaryKeyConstraint()
          Does this element have a primary key constraint.
(package private)  boolean hasUniqueKeyConstraint()
          Does this element have a unique key constraint.
 void init(java.lang.Object name)
          Initializer for a TableElementNode
 void init(java.lang.Object name, java.lang.Object elementType)
          Initializer for a TableElementNode
 java.lang.String toString()
          Convert this object to a String.
 
Methods inherited from class org.apache.derby.impl.sql.compile.QueryTreeNode
accept, acceptChildren, bindOffsetFetch, bindRowMultiSet, bindUserType, checkReliability, checkReliability, convertDefaultNode, createTypeDependency, debugFlush, debugPrint, disablePrivilegeCollection, formatNodeString, foundString, generate, generateAuthorizeCheck, getBeginOffset, getClassFactory, getCompilerContext, getContextManager, getCursorInfo, getDataDictionary, getDependencyManager, getEndOffset, getExecutionFactory, getGenericConstantActionFactory, getIntProperty, getLanguageConnectionContext, getNodeFactory, getNodeType, getNullNode, getParameterTypes, getRowEstimate, getSchemaDescriptor, getSchemaDescriptor, getStatementType, getTableDescriptor, getTypeCompiler, init, init, init, init, init, init, init, init, init, init, init, init, isAtomic, isInstanceOf, isPrivilegeCollectionRequired, isSessionSchema, isSessionSchema, makeConstantAction, makeTableName, makeTableName, nodeHeader, orReliability, parseStatement, printLabel, printSubNodes, referencesSessionSchema, resolveTableToSynonym, setBeginOffset, setContextManager, setEndOffset, setNodeType, setRefActionInfo, stackPrint, treePrint, treePrint, verifyClassExist
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

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

name

java.lang.String name

elementType

int elementType
Constructor Detail

TableElementNode

public TableElementNode()
Method Detail

init

public void init(java.lang.Object name)
Initializer for a TableElementNode

Overrides:
init in class QueryTreeNode
Parameters:
name - The name of the table element, if any

init

public void init(java.lang.Object name,
                 java.lang.Object elementType)
Initializer for a TableElementNode

Overrides:
init in class QueryTreeNode
Parameters:
name - The name of the table element, if any

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:
toString in class QueryTreeNode
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

public 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

Built on Thu 2012-03-29 21:53:33+0000, from revision ???

Apache Derby V10.6 Internals - Copyright © 2004,2007 The Apache Software Foundation. All Rights Reserved.