|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.derby.impl.sql.compile.QueryTreeNode
org.apache.derby.impl.sql.compile.TableElementNode
org.apache.derby.impl.sql.compile.ConstraintDefinitionNode
public class ConstraintDefinitionNode
A ConstraintDefintionNode is a class for all nodes that can represent constraint definitions.
Field Summary | |
---|---|
(package private) ProviderList |
apl
|
(package private) java.lang.String |
backingIndexName
|
(package private) UUID |
backingIndexUUID
|
private int |
behavior
|
(package private) int[] |
checkColumnReferences
|
(package private) ValueNode |
checkCondition
|
(package private) ResultColumnList |
columnList
|
private TableName |
constraintName
|
(package private) java.lang.String |
constraintText
|
protected int |
constraintType
|
protected java.util.Properties |
properties
|
(package private) UUIDFactory |
uuidFactory
|
private int |
verifyType
|
Fields inherited from class org.apache.derby.impl.sql.compile.TableElementNode |
---|
AT_ADD_CHECK_CONSTRAINT, AT_ADD_FOREIGN_KEY_CONSTRAINT, AT_ADD_PRIMARY_KEY_CONSTRAINT, AT_ADD_UNIQUE_CONSTRAINT, AT_DROP_COLUMN, AT_DROP_CONSTRAINT, AT_MODIFY_COLUMN, AT_UNKNOWN, elementType, 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 | |
---|---|
ConstraintDefinitionNode()
|
Method Summary | |
---|---|
protected void |
bind(DDLStatementNode ddlNode,
DataDictionary dd)
Bind this constraint definition. |
ProviderList |
getAuxiliaryProviderList()
Return the auxiliary provider list. |
(package private) java.lang.String |
getBackingIndexName(DataDictionary dd)
Gets a unique name for the backing index for this constraint of the form SQLyymmddhhmmssxxn yy - year, mm - month, dd - day of month, hh - hour, mm - minute, ss - second, xx - the first 2 digits of millisec because we don't have enough space to keep the exact millisec value, n - number between 0-9 |
(package private) UUID |
getBackingIndexUUID()
Allocates a UUID if one doesn't already exist for the index backing this constraint. |
int[] |
getCheckColumnReferences()
Get the array of 1-based column references for a check constraint. |
ValueNode |
getCheckCondition()
Get the check condition from this table constraint. |
ResultColumnList |
getColumnList()
Get the column list from this node. |
(package private) java.lang.String |
getConstraintMoniker()
Get the name of the constraint. |
java.lang.String |
getConstraintText()
Get the text of the constraint. |
(package private) int |
getConstraintType()
Get the constraint type |
(package private) int |
getDropBehavior()
Return the behavior of this constriant (DropStatementNode.xxx) |
(package private) java.lang.String |
getDropSchemaName()
To support dropping exisiting constraints that may have mismatched schema names we need to support ALTER TABLE S1.T DROP CONSTRAINT S2.C. |
java.util.Properties |
getProperties()
Get the optional properties for the backing index to this constraint. |
int |
getReferenceCount()
Get the count of enabled fks that reference this constraint |
private UUIDFactory |
getUUIDFactory()
Get the UUID factory |
(package private) int |
getVerifyType()
|
(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()
Is this a foreign key constraint. |
(package private) boolean |
hasPrimaryKeyConstraint()
Is this a primary key constraint. |
(package private) boolean |
hasUniqueKeyConstraint()
Is this a unique key constraint. |
void |
init(java.lang.Object constraintName,
java.lang.Object constraintType,
java.lang.Object rcl,
java.lang.Object properties,
java.lang.Object checkCondition,
java.lang.Object constraintText)
Initialize a query tree node. |
void |
init(java.lang.Object constraintName,
java.lang.Object constraintType,
java.lang.Object rcl,
java.lang.Object properties,
java.lang.Object checkCondition,
java.lang.Object constraintText,
java.lang.Object behavior)
Initialize a query tree node. |
void |
init(java.lang.Object constraintName,
java.lang.Object constraintType,
java.lang.Object rcl,
java.lang.Object properties,
java.lang.Object checkCondition,
java.lang.Object constraintText,
java.lang.Object behavior,
java.lang.Object verifyType)
Initialize a query tree node. |
boolean |
isEnabled()
Is this constraint enabled. |
boolean |
isReferenced()
Is this constraint referenced. |
(package private) boolean |
requiresBackingIndex()
Is this a foreign key constraint. |
(package private) boolean |
requiresUniqueIndex()
Is this a foreign key constraint. |
(package private) void |
setAuxiliaryProviderList(ProviderList apl)
Set the auxiliary provider list. |
void |
setCheckColumnReferences(int[] checkColumnReferences)
Set the array of 1-based column references for a check constraint. |
void |
setCheckCondition(ValueNode checkCondition)
Set the check condition for this table constraint. |
void |
setColumnList(ResultColumnList columnList)
Set the column list for this node. |
void |
setProperties(java.util.Properties properties)
Set the optional properties for the backing index to this constraint. |
java.lang.String |
toString()
Convert this object to a String. |
Methods inherited from class org.apache.derby.impl.sql.compile.TableElementNode |
---|
getElementType, getName, init, init |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
private TableName constraintName
protected int constraintType
protected java.util.Properties properties
ProviderList apl
UUIDFactory uuidFactory
java.lang.String backingIndexName
UUID backingIndexUUID
int[] checkColumnReferences
ResultColumnList columnList
java.lang.String constraintText
ValueNode checkCondition
private int behavior
private int verifyType
Constructor Detail |
---|
public ConstraintDefinitionNode()
Method Detail |
---|
public void init(java.lang.Object constraintName, java.lang.Object constraintType, java.lang.Object rcl, java.lang.Object properties, java.lang.Object checkCondition, java.lang.Object constraintText, java.lang.Object behavior)
QueryTreeNode
init
in class QueryTreeNode
public void init(java.lang.Object constraintName, java.lang.Object constraintType, java.lang.Object rcl, java.lang.Object properties, java.lang.Object checkCondition, java.lang.Object constraintText)
QueryTreeNode
init
in class QueryTreeNode
public void init(java.lang.Object constraintName, java.lang.Object constraintType, java.lang.Object rcl, java.lang.Object properties, java.lang.Object checkCondition, java.lang.Object constraintText, java.lang.Object behavior, java.lang.Object verifyType)
QueryTreeNode
init
in class QueryTreeNode
public java.lang.String toString()
toString
in class TableElementNode
protected void bind(DDLStatementNode ddlNode, DataDictionary dd) throws StandardException
ddlNode
- the create or alter table nodedd
- the dd
StandardException
- on errorjava.lang.String getConstraintMoniker()
java.lang.String getDropSchemaName()
UUID getBackingIndexUUID()
java.lang.String getBackingIndexName(DataDictionary dd)
void setAuxiliaryProviderList(ProviderList apl)
apl
- The new auxiliary provider list.public ProviderList getAuxiliaryProviderList()
boolean hasPrimaryKeyConstraint()
hasPrimaryKeyConstraint
in class TableElementNode
boolean hasUniqueKeyConstraint()
hasUniqueKeyConstraint
in class TableElementNode
boolean hasForeignKeyConstraint()
hasForeignKeyConstraint
in class TableElementNode
boolean hasCheckConstraint()
hasCheckConstraint
in class TableElementNode
boolean hasConstraint()
hasConstraint
in class TableElementNode
boolean requiresBackingIndex()
boolean requiresUniqueIndex()
int getConstraintType()
public void setProperties(java.util.Properties properties)
properties
- The optional Properties for this constraint.public java.util.Properties getProperties()
public boolean isReferenced()
public int getReferenceCount()
public boolean isEnabled()
public ResultColumnList getColumnList()
public void setColumnList(ResultColumnList columnList)
columnList
- The new columnList.public ValueNode getCheckCondition()
public void setCheckCondition(ValueNode checkCondition)
checkCondition
- The check conditionpublic java.lang.String getConstraintText()
public int[] getCheckColumnReferences()
public void setCheckColumnReferences(int[] checkColumnReferences)
checkColumnReferences
- The array of 1-based column references
for the check constraint.int getDropBehavior()
int getVerifyType()
private UUIDFactory getUUIDFactory()
|
Built on Thu 2011-03-10 11:54:14+0000, from revision ??? | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |