| java.lang.Object org.apache.derby.impl.sql.compile.QueryTreeNode org.apache.derby.impl.sql.compile.TableElementNode org.apache.derby.impl.sql.compile.ConstraintDefinitionNode
All known Subclasses: org.apache.derby.impl.sql.compile.FKConstraintDefinitionNode,
ConstraintDefinitionNode | public class ConstraintDefinitionNode extends TableElementNode (Code) | | A ConstraintDefintionNode is a class for all nodes that can represent
constraint definitions.
author: Jerry Brenner |
Method Summary | |
protected void | bind(DDLStatementNode ddlNode, DataDictionary dd) Bind this constraint definition. | public ProviderList | getAuxiliaryProviderList() Return the auxiliary provider list. | String | getBackingIndexName(DataDictionary dd) | UUID | getBackingIndexUUID() Allocates a UUID if one doesn't already exist for the index backing this constraint. | public int[] | getCheckColumnReferences() Get the array of 1-based column references for a check constraint. | public ValueNode | getCheckCondition() Get the check condition from this table constraint. | public ResultColumnList | getColumnList() Get the column list from this node. | String | getConstraintMoniker() Get the name of the constraint. | public String | getConstraintText() Get the text of the constraint. | int | getConstraintType() | int | getDropBehavior() | 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. | public Properties | getProperties() Get the optional properties for the backing index to this constraint. | public int | getReferenceCount() | int | getVerifyType() | boolean | hasCheckConstraint() Does this element have a check constraint. | boolean | hasConstraint() Does this element have a constraint on it. | boolean | hasForeignKeyConstraint() Is this a foreign key constraint. | boolean | hasPrimaryKeyConstraint() Is this a primary key constraint. | boolean | hasUniqueKeyConstraint() Is this a unique key constraint. | public void | init(Object constraintName, Object constraintType, Object rcl, Object properties, Object checkCondition, Object constraintText, Object behavior) | public void | init(Object constraintName, Object constraintType, Object rcl, Object properties, Object checkCondition, Object constraintText) | public void | init(Object constraintName, Object constraintType, Object rcl, Object properties, Object checkCondition, Object constraintText, Object behavior, Object verifyType) | public boolean | isEnabled() Is this constraint enabled. | public boolean | isReferenced() Is this constraint referenced. | boolean | requiresBackingIndex() Is this a foreign key constraint. | boolean | requiresUniqueIndex() Is this a foreign key constraint. | void | setAuxiliaryProviderList(ProviderList apl) Set the auxiliary provider list. | public void | setCheckColumnReferences(int[] checkColumnReferences) Set the array of 1-based column references for a check constraint. | public void | setCheckCondition(ValueNode checkCondition) Set the check condition for this table constraint. | public void | setColumnList(ResultColumnList columnList) Set the column list for this node. | public void | setProperties(Properties properties) Set the optional properties for the backing index to this constraint. | public String | toString() Convert this object to a String. |
checkColumnReferences | int[] checkColumnReferences(Code) | | |
constraintType | protected int constraintType(Code) | | |
getAuxiliaryProviderList | public ProviderList getAuxiliaryProviderList()(Code) | | Return the auxiliary provider list.
The auxiliary provider list. |
getBackingIndexName | String getBackingIndexName(DataDictionary dd)(Code) | | 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
name of backing index |
getBackingIndexUUID | UUID getBackingIndexUUID()(Code) | | 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.
a UUID for the constraint. allocates one if this is the first time this method is called. |
getCheckColumnReferences | public int[] getCheckColumnReferences()(Code) | | Get the array of 1-based column references for a check constraint.
The array of 1-based column references for a check constraint. |
getCheckCondition | public ValueNode getCheckCondition()(Code) | | Get the check condition from this table constraint.
The check condition from this node. |
getColumnList | public ResultColumnList getColumnList()(Code) | | Get the column list from this node.
ResultColumnList The column list from this table constraint. |
getConstraintMoniker | String getConstraintMoniker()(Code) | | 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.
constraint name |
getConstraintText | public String getConstraintText()(Code) | | Get the text of the constraint. (Only meaningful for check constraints.)
The constraint text. |
getConstraintType | int getConstraintType()(Code) | | Get the constraint type
constraintType The constraint type. |
getDropBehavior | int getDropBehavior()(Code) | | Return the behavior of this constriant (DropStatementNode.xxx)
the behavior |
getDropSchemaName | String getDropSchemaName()(Code) | | 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.
|
getProperties | public Properties getProperties()(Code) | | Get the optional properties for the backing index to this constraint.
The optional properties for the backing index to this constraint |
getReferenceCount | public int getReferenceCount()(Code) | | Get the count of enabled fks
that reference this constraint
the number |
getVerifyType | int getVerifyType()(Code) | | the expected type of the constraint, DataDictionary.DROP_CONSTRAINT if the constraint isto be dropped without checking its type. |
hasCheckConstraint | boolean hasCheckConstraint()(Code) | | Does this element have a check constraint.
boolean Whether or not this element has a check constraint |
hasConstraint | boolean hasConstraint()(Code) | | Does this element have a constraint on it.
boolean Whether or not this element has a constraint on it |
hasForeignKeyConstraint | boolean hasForeignKeyConstraint()(Code) | | Is this a foreign key constraint.
boolean Whether or not this is a unique key constraint |
hasPrimaryKeyConstraint | boolean hasPrimaryKeyConstraint()(Code) | | Is this a primary key constraint.
boolean Whether or not this is a primary key constraint |
hasUniqueKeyConstraint | boolean hasUniqueKeyConstraint()(Code) | | Is this a unique key constraint.
boolean Whether or not this is a unique key constraint |
isEnabled | public boolean isEnabled()(Code) | | Is this constraint enabled.
true/false |
isReferenced | public boolean isReferenced()(Code) | | Is this constraint referenced.
true/false |
requiresBackingIndex | boolean requiresBackingIndex()(Code) | | Is this a foreign key constraint.
boolean Whether or not this is a unique key constraint |
requiresUniqueIndex | boolean requiresUniqueIndex()(Code) | | Is this a foreign key constraint.
boolean Whether or not this is a unique key constraint |
setAuxiliaryProviderList | void setAuxiliaryProviderList(ProviderList apl)(Code) | | Set the auxiliary provider list.
Parameters: apl - The new auxiliary provider list. |
setCheckColumnReferences | public void setCheckColumnReferences(int[] checkColumnReferences)(Code) | | Set the array of 1-based column references for a check constraint.
Parameters: checkColumnReferences - The array of 1-based column referencesfor the check constraint. |
setCheckCondition | public void setCheckCondition(ValueNode checkCondition)(Code) | | Set the check condition for this table constraint.
Parameters: checkCondition - The check condition |
setColumnList | public void setColumnList(ResultColumnList columnList)(Code) | | Set the column list for this node. This is useful for check constraints
where the list of referenced columns is built at bind time.
Parameters: columnList - The new columnList. |
setProperties | public void setProperties(Properties properties)(Code) | | Set the optional properties for the backing index to this constraint.
Parameters: properties - The optional Properties for this constraint. |
toString | public String toString()(Code) | | Convert this object to a String. See comments in QueryTreeNode.java
for how this should be done for tree printing.
This object as a String |
Methods inherited from org.apache.derby.impl.sql.compile.QueryTreeNode | public Visitable accept(Visitor v) throws StandardException(Code)(Java Doc) public QueryTreeNode bind() throws StandardException(Code)(Java Doc) public DataValueDescriptor convertDefaultNode(DataTypeDescriptor typeDescriptor) throws StandardException(Code)(Java Doc) protected static void debugFlush()(Code)(Java Doc) public static void debugPrint(String outputString)(Code)(Java Doc) public void disablePrivilegeCollection()(Code)(Java Doc) public String executeSchemaName()(Code)(Java Doc) public String executeStatementName()(Code)(Java Doc) public static String formatNodeString(String nodeString, int depth)(Code)(Java Doc) public boolean foundString(String[] list, String search)(Code)(Java Doc) public GeneratedClass generate(ByteArray ignored) throws StandardException(Code)(Java Doc) protected void generate(ActivationClassBuilder acb, MethodBuilder mb) throws StandardException(Code)(Java Doc) void generateAuthorizeCheck(ActivationClassBuilder acb, MethodBuilder mb, int sqlOperation)(Code)(Java Doc) public int getBeginOffset()(Code)(Java Doc) final protected ClassFactory getClassFactory()(Code)(Java Doc) final protected CompilerContext getCompilerContext()(Code)(Java Doc) final public ContextManager getContextManager()(Code)(Java Doc) public Object getCursorInfo() throws StandardException(Code)(Java Doc) final public DataDictionary getDataDictionary()(Code)(Java Doc) final public DependencyManager getDependencyManager()(Code)(Java Doc) public int getEndOffset()(Code)(Java Doc) final public ExecutionFactory getExecutionFactory()(Code)(Java Doc) final public GenericConstantActionFactory getGenericConstantActionFactory()(Code)(Java Doc) protected int getIntProperty(String value, String key) throws StandardException(Code)(Java Doc) final protected LanguageConnectionContext getLanguageConnectionContext()(Code)(Java Doc) final public NodeFactory getNodeFactory()(Code)(Java Doc) protected int getNodeType()(Code)(Java Doc) public ConstantNode getNullNode(TypeId typeId, ContextManager cm) throws StandardException(Code)(Java Doc) public DataTypeDescriptor[] getParameterTypes() throws StandardException(Code)(Java Doc) public long getRowEstimate()(Code)(Java Doc) public String getSPSName()(Code)(Java Doc) final SchemaDescriptor getSchemaDescriptor(String schemaName) throws StandardException(Code)(Java Doc) final SchemaDescriptor getSchemaDescriptor(String schemaName, boolean raiseError) throws StandardException(Code)(Java Doc) protected int getStatementType()(Code)(Java Doc) final protected TableDescriptor getTableDescriptor(String tableName, SchemaDescriptor schema) throws StandardException(Code)(Java Doc) final protected TypeCompiler getTypeCompiler(TypeId typeId)(Code)(Java Doc) public void init(Object arg1) throws StandardException(Code)(Java Doc) public void init(Object arg1, Object arg2) throws StandardException(Code)(Java Doc) public void init(Object arg1, Object arg2, Object arg3) throws StandardException(Code)(Java Doc) public void init(Object arg1, Object arg2, Object arg3, Object arg4) throws StandardException(Code)(Java Doc) public void init(Object arg1, Object arg2, Object arg3, Object arg4, Object arg5) throws StandardException(Code)(Java Doc) public void init(Object arg1, Object arg2, Object arg3, Object arg4, Object arg5, Object arg6) throws StandardException(Code)(Java Doc) public void init(Object arg1, Object arg2, Object arg3, Object arg4, Object arg5, Object arg6, Object arg7) throws StandardException(Code)(Java Doc) public void init(Object arg1, Object arg2, Object arg3, Object arg4, Object arg5, Object arg6, Object arg7, Object arg8) throws StandardException(Code)(Java Doc) public void init(Object arg1, Object arg2, Object arg3, Object arg4, Object arg5, Object arg6, Object arg7, Object arg8, Object arg9) throws StandardException(Code)(Java Doc) public void init(Object arg1, Object arg2, Object arg3, Object arg4, Object arg5, Object arg6, Object arg7, Object arg8, Object arg9, Object arg10) throws StandardException(Code)(Java Doc) public void init(Object arg1, Object arg2, Object arg3, Object arg4, Object arg5, Object arg6, Object arg7, Object arg8, Object arg9, Object arg10, Object arg11) throws StandardException(Code)(Java Doc) public void init(Object arg1, Object arg2, Object arg3, Object arg4, Object arg5, Object arg6, Object arg7, Object arg8, Object arg9, Object arg10, Object arg11, Object arg12) throws StandardException(Code)(Java Doc) public void init(Object arg1, Object arg2, Object arg3, Object arg4, Object arg5, Object arg6, Object arg7, Object arg8, Object arg9, Object arg10, Object arg11, Object arg12, Object arg13) throws StandardException(Code)(Java Doc) public void init(Object arg1, Object arg2, Object arg3, Object arg4, Object arg5, Object arg6, Object arg7, Object arg8, Object arg9, Object arg10, Object arg11, Object arg12, Object arg13, Object arg14) throws StandardException(Code)(Java Doc) public boolean isAtomic() throws StandardException(Code)(Java Doc) protected boolean isInstanceOf(int nodeType)(Code)(Java Doc) public boolean isPrivilegeCollectionRequired()(Code)(Java Doc) final boolean isSessionSchema(SchemaDescriptor sd)(Code)(Java Doc) final boolean isSessionSchema(String schemaName)(Code)(Java Doc) public ConstantAction makeConstantAction() throws StandardException(Code)(Java Doc) public ResultDescription makeResultDescription() throws StandardException(Code)(Java Doc) public TableName makeTableName(String schemaName, String flatName) throws StandardException(Code)(Java Doc) public boolean needsSavepoint()(Code)(Java Doc) protected String nodeHeader()(Code)(Java Doc) public QueryTreeNode optimize() throws StandardException(Code)(Java Doc) public static QueryTreeNode parseQueryText(CompilerContext compilerContext, String queryText, Object[] paramDefaults, LanguageConnectionContext lcc) throws StandardException(Code)(Java Doc) public void printLabel(int depth, String label)(Code)(Java Doc) public void printSubNodes(int depth)(Code)(Java Doc) public boolean referencesSessionSchema() throws StandardException(Code)(Java Doc) public TableName resolveTableToSynonym(TableName tabName) throws StandardException(Code)(Java Doc) public void setBeginOffset(int beginOffset)(Code)(Java Doc) public void setContextManager(ContextManager cm)(Code)(Java Doc) public void setEndOffset(int endOffset)(Code)(Java Doc) public void setNodeType(int nodeType)(Code)(Java Doc) public void setRefActionInfo(long fkIndexConglomId, int[] fkColArray, String parentResultSetId, boolean dependentScan)(Code)(Java Doc) public String toString()(Code)(Java Doc) public void treePrint()(Code)(Java Doc) public void treePrint(int depth)(Code)(Java Doc) String verifyClassExist(String javaClassName, boolean convertCase) throws StandardException(Code)(Java Doc)
|
|
|