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 Details

  • Constructor Details

    • TableElementNode

      TableElementNode(String name, ContextManager cm)
      Constructor for a TableElementNode
      Parameters:
      name - The name of the table element, if any
  • Method Details

    • toString

      public 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

      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