public class ConstraintDefinitionNode extends TableElementNode
| Modifier and Type | Field and Description |
|---|---|
(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 |
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, nameAUTOINCREMENT_CREATE_MODIFY, AUTOINCREMENT_INC_INDEX, AUTOINCREMENT_IS_AUTOINCREMENT_INDEX, AUTOINCREMENT_START_INDEX| Constructor and Description |
|---|
ConstraintDefinitionNode() |
| Modifier and Type | Method and Description |
|---|---|
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.
|
getElementType, getName, init, initaccept, acceptChildren, bindOffsetFetch, bindRowMultiSet, bindUserCatalogType, 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, getSchemaDescriptor, getSchemaDescriptor, getStatementType, getTableDescriptor, getTypeCompiler, 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, verifyClassExistprivate 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
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)
QueryTreeNodeinit in interface Nodeinit in class QueryTreeNodepublic 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)
QueryTreeNodeinit in interface Nodeinit in class QueryTreeNodepublic 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)
QueryTreeNodeinit in interface Nodeinit in class QueryTreeNodepublic java.lang.String toString()
toString in class TableElementNodeprotected void bind(DDLStatementNode ddlNode, DataDictionary dd) throws StandardException
ddlNode - the create or alter table nodedd - the ddStandardException - 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 TableElementNodeboolean hasUniqueKeyConstraint()
hasUniqueKeyConstraint in class TableElementNodeboolean hasForeignKeyConstraint()
hasForeignKeyConstraint in class TableElementNodeboolean hasCheckConstraint()
hasCheckConstraint in class TableElementNodeboolean hasConstraint()
hasConstraint in class TableElementNodeboolean 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()
Apache Derby V10.10 Internals - Copyright © 2004,2014 The Apache Software Foundation. All Rights Reserved.