com.akiban.sql.parser
Class ConstraintDefinitionNode

java.lang.Object
  extended by com.akiban.sql.parser.QueryTreeNode
      extended by com.akiban.sql.parser.TableElementNode
          extended by com.akiban.sql.parser.ConstraintDefinitionNode
All Implemented Interfaces:
Visitable
Direct Known Subclasses:
FKConstraintDefinitionNode, IndexConstraintDefinitionNode

public class ConstraintDefinitionNode
extends TableElementNode

A ConstraintDefinitionNode is a class for all nodes that can represent constraint definitions.


Nested Class Summary
static class ConstraintDefinitionNode.ConstraintType
           
 
Nested classes/interfaces inherited from class com.akiban.sql.parser.TableElementNode
TableElementNode.ElementType
 
Field Summary
protected  TableName constraintName
           
protected  ConstraintDefinitionNode.ConstraintType constraintType
           
protected  Properties properties
           
 
Fields inherited from class com.akiban.sql.parser.QueryTreeNode
AUTOINCREMENT_CREATE_MODIFY, AUTOINCREMENT_INC_INDEX, AUTOINCREMENT_IS_AUTOINCREMENT_INDEX, AUTOINCREMENT_START_INDEX
 
Constructor Summary
ConstraintDefinitionNode()
           
 
Method Summary
 void copyFrom(QueryTreeNode node)
          Fill this node with a deep copy of the given node.
 ResultColumnList getColumnList()
          Get the column list
 ConstraintDefinitionNode.ConstraintType getConstraintType()
          Get the constraint type
 Properties getProperties()
          Get the optional properties for the backing index to this constraint.
 ConstraintDefinitionNode.ConstraintType getVerifyType()
          Get the verify constraint type.
 void init(Object constraintName, Object constraintType, Object rcl, Object properties, Object checkCondition, Object constraintText)
          Initialize a query tree node.
 void init(Object constraintName, Object constraintType, Object rcl, Object properties, Object checkCondition, Object constraintText, Object behavior)
          Initialize a query tree node.
 void init(Object constraintName, Object constraintType, Object rcl, Object properties, Object checkCondition, Object constraintText, Object behavior, Object verifyType)
          Initialize a query tree node.
 void printSubNodes(int depth)
          Prints the sub-nodes of this object.
 void setProperties(Properties properties)
          Set the optional properties for the backing index to this constraint.
 String toString()
          Convert this object to a String.
 
Methods inherited from class com.akiban.sql.parser.TableElementNode
getName, init, init
 
Methods inherited from class com.akiban.sql.parser.QueryTreeNode
accept, convertDefaultNode, debugFlush, debugPrint, formatNodeString, getBeginOffset, getDebugOutput, getEndOffset, getNodeFactory, getNodeType, getNullNode, getParserContext, getStatementType, getUserData, init, init, init, init, init, init, init, init, init, isInstanceOf, makeTableName, makeTableName, nodeHeader, printLabel, setBeginOffset, setDebugOutput, setEndOffset, setNodeType, setParserContext, setUserData, stackPrint, treePrint, treePrint, treePrint
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

constraintName

protected TableName constraintName

constraintType

protected ConstraintDefinitionNode.ConstraintType constraintType

properties

protected Properties properties
Constructor Detail

ConstraintDefinitionNode

public ConstraintDefinitionNode()
Method Detail

init

public void init(Object constraintName,
                 Object constraintType,
                 Object rcl,
                 Object properties,
                 Object checkCondition,
                 Object constraintText,
                 Object behavior)
Description copied from class: QueryTreeNode
Initialize a query tree node.

Overrides:
init in class QueryTreeNode

init

public void init(Object constraintName,
                 Object constraintType,
                 Object rcl,
                 Object properties,
                 Object checkCondition,
                 Object constraintText)
Description copied from class: QueryTreeNode
Initialize a query tree node.

Overrides:
init in class QueryTreeNode

init

public void init(Object constraintName,
                 Object constraintType,
                 Object rcl,
                 Object properties,
                 Object checkCondition,
                 Object constraintText,
                 Object behavior,
                 Object verifyType)
Description copied from class: QueryTreeNode
Initialize a query tree node.

Overrides:
init in class QueryTreeNode

copyFrom

public void copyFrom(QueryTreeNode node)
              throws StandardException
Fill this node with a deep copy of the given node.

Overrides:
copyFrom in class TableElementNode
Throws:
StandardException

getConstraintType

public ConstraintDefinitionNode.ConstraintType getConstraintType()
Get the constraint type

Returns:
constraintType The constraint type.

getVerifyType

public ConstraintDefinitionNode.ConstraintType getVerifyType()
Get the verify constraint type. Clarifies DROP actions.

Returns:
verify The verify constraint type.

getColumnList

public ResultColumnList getColumnList()
Get the column list

Returns:
columnList The column list.

setProperties

public void setProperties(Properties properties)
Set the optional properties for the backing index to this constraint.

Parameters:
properties - The optional Properties for this constraint.

getProperties

public Properties getProperties()
Get the optional properties for the backing index to this constraint.

Returns:
The optional properties for the backing index to this constraint

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 TableElementNode
Returns:
This object as a String

printSubNodes

public void printSubNodes(int depth)
Prints the sub-nodes of this object. See QueryTreeNode.java for how tree printing is supposed to work.

Overrides:
printSubNodes in class QueryTreeNode
Parameters:
depth - The depth to indent the sub-nodes


Copyright © 2013 Akiban Technologies, Inc. All rights reserved.