|
|||||||||
| Home >> All >> org >> apache >> derby >> impl >> sql >> [ compile overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
org.apache.derby.impl.sql.compile
Class ConstraintDefinitionNode

java.lang.Objectorg.apache.derby.impl.sql.compile.QueryTreeNode
org.apache.derby.impl.sql.compile.TableElementNode
org.apache.derby.impl.sql.compile.ConstraintDefinitionNode
- All Implemented Interfaces:
- org.apache.derby.iapi.sql.compile.Visitable
- Direct Known Subclasses:
- FKConstraintDefinitionNode
- public class ConstraintDefinitionNode
- extends TableElementNode
A ConstraintDefintionNode is a class for all nodes that can represent constraint definitions.
| Field Summary | |
(package private) org.apache.derby.iapi.sql.depend.ProviderList |
apl
|
(package private) java.lang.String |
backingIndexName
|
(package private) org.apache.derby.catalog.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) org.apache.derby.iapi.services.uuid.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_INC_INDEX, AUTOINCREMENT_IS_AUTOINCREMENT_INDEX, AUTOINCREMENT_START_INDEX, beginOffset, endOffset |
| Constructor Summary | |
ConstraintDefinitionNode()
|
|
| Method Summary | |
protected void |
bind(DDLStatementNode ddlNode,
org.apache.derby.iapi.sql.dictionary.DataDictionary dd)
Bind this constraint definition. |
org.apache.derby.iapi.sql.depend.ProviderList |
getAuxiliaryProviderList()
Return the auxiliary provider list. |
(package private) java.lang.String |
getBackingIndexName(org.apache.derby.iapi.sql.dictionary.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) org.apache.derby.catalog.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 org.apache.derby.iapi.services.uuid.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(org.apache.derby.iapi.sql.depend.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 |
constraintName
private TableName constraintName
constraintType
protected int constraintType
properties
protected java.util.Properties properties
apl
org.apache.derby.iapi.sql.depend.ProviderList apl
uuidFactory
org.apache.derby.iapi.services.uuid.UUIDFactory uuidFactory
backingIndexName
java.lang.String backingIndexName
backingIndexUUID
org.apache.derby.catalog.UUID backingIndexUUID
checkColumnReferences
int[] checkColumnReferences
columnList
ResultColumnList columnList
constraintText
java.lang.String constraintText
checkCondition
ValueNode checkCondition
behavior
private int behavior
verifyType
private int verifyType
| Constructor Detail |
ConstraintDefinitionNode
public ConstraintDefinitionNode()
| Method Detail |
init
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)
- Description copied from class:
QueryTreeNode - Initialize a query tree node.
- Overrides:
initin classQueryTreeNode
init
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)
- Description copied from class:
QueryTreeNode - Initialize a query tree node.
- Overrides:
initin classQueryTreeNode
init
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)
- Description copied from class:
QueryTreeNode - Initialize a query tree node.
- Overrides:
initin classQueryTreeNode
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:
toStringin classTableElementNode
bind
protected void bind(DDLStatementNode ddlNode, org.apache.derby.iapi.sql.dictionary.DataDictionary dd) throws org.apache.derby.iapi.error.StandardException
- Bind this constraint definition.
getConstraintMoniker
java.lang.String getConstraintMoniker()
- Get the name of the constraint. If the user didn't provide one, we make one up. This allows Replication
to agree with the core compiler on the names of constraints.
getDropSchemaName
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.
If a constraint name was specified this returns it, otherwise it returns null.
getBackingIndexUUID
org.apache.derby.catalog.UUID getBackingIndexUUID()
- Allocates a UUID if one doesn't already exist for the index backing this constraint. This allows Replication
logic to agree with the core compiler on what the UUIDs of indices are.
getBackingIndexName
java.lang.String getBackingIndexName(org.apache.derby.iapi.sql.dictionary.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
setAuxiliaryProviderList
void setAuxiliaryProviderList(org.apache.derby.iapi.sql.depend.ProviderList apl)
- Set the auxiliary provider list.
getAuxiliaryProviderList
public org.apache.derby.iapi.sql.depend.ProviderList getAuxiliaryProviderList()
- Return the auxiliary provider list.
hasPrimaryKeyConstraint
boolean hasPrimaryKeyConstraint()
- Is this a primary key constraint.
- Overrides:
hasPrimaryKeyConstraintin classTableElementNode
hasUniqueKeyConstraint
boolean hasUniqueKeyConstraint()
- Is this a unique key constraint.
- Overrides:
hasUniqueKeyConstraintin classTableElementNode
hasForeignKeyConstraint
boolean hasForeignKeyConstraint()
- Is this a foreign key constraint.
- Overrides:
hasForeignKeyConstraintin classTableElementNode
hasCheckConstraint
boolean hasCheckConstraint()
- Does this element have a check constraint.
- Overrides:
hasCheckConstraintin classTableElementNode
hasConstraint
boolean hasConstraint()
- Does this element have a constraint on it.
- Overrides:
hasConstraintin classTableElementNode
requiresBackingIndex
boolean requiresBackingIndex()
- Is this a foreign key constraint.
requiresUniqueIndex
boolean requiresUniqueIndex()
- Is this a foreign key constraint.
getConstraintType
int getConstraintType()
- Get the constraint type
setProperties
public void setProperties(java.util.Properties properties)
- Set the optional properties for the backing index to this constraint.
getProperties
public java.util.Properties getProperties()
- Get the optional properties for the backing index to this constraint.
isReferenced
public boolean isReferenced()
- Is this constraint referenced.
getReferenceCount
public int getReferenceCount()
- Get the count of enabled fks
that reference this constraint
isEnabled
public boolean isEnabled()
- Is this constraint enabled.
getColumnList
public ResultColumnList getColumnList()
- Get the column list from this node.
setColumnList
public void setColumnList(ResultColumnList columnList)
- Set the column list for this node. This is useful for check constraints
where the list of referenced columns is built at bind time.
getCheckCondition
public ValueNode getCheckCondition()
- Get the check condition from this table constraint.
setCheckCondition
public void setCheckCondition(ValueNode checkCondition)
- Set the check condition for this table constraint.
getConstraintText
public java.lang.String getConstraintText()
- Get the text of the constraint. (Only meaningful for check constraints.)
getCheckColumnReferences
public int[] getCheckColumnReferences()
- Get the array of 1-based column references for a check constraint.
setCheckColumnReferences
public void setCheckColumnReferences(int[] checkColumnReferences)
- Set the array of 1-based column references for a check constraint.
getDropBehavior
int getDropBehavior()
- Return the behavior of this constriant (DropStatementNode.xxx)
getVerifyType
int getVerifyType()
getUUIDFactory
private org.apache.derby.iapi.services.uuid.UUIDFactory getUUIDFactory()
- Get the UUID factory
|
|||||||||
| Home >> All >> org >> apache >> derby >> impl >> sql >> [ compile overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
JAVADOC