|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.mckoi.database.interpret.ConstraintDef
public final class ConstraintDef
Represents a constraint definition (description) for a table.
| Field Summary | |
|---|---|
static int |
CHECK
A CHECK constraint. |
static int |
FOREIGN_KEY
A FOREIGN_KEY constraint. |
static int |
PRIMARY_KEY
A PRIMARY_KEY constraint. |
static int |
UNIQUE
A UNIQUE constraint. |
| Constructor Summary | |
|---|---|
ConstraintDef()
|
|
| Method Summary | |
|---|---|
java.lang.Object |
clone()
Performs a DEEP clone of this object if it is mutable, or a deep clone of its mutable members. |
java.lang.String[] |
getColumnList()
Returns the first column list as a string array. |
java.lang.String[] |
getColumnList2()
Returns the first column list as a string array. |
java.lang.String |
getDeleteRule()
Returns the delete rule if this is a foreign key reference. |
java.lang.String |
getUpdateRule()
Returns the update rule if this is a foreign key reference. |
void |
prepareExpressions(ExpressionPreparer preparer)
Prepares all expressions in this statement tree object by passing the ExpressionPreparer object to the 'prepare' method of the expression. |
void |
setCheck(Expression exp)
Sets object up for a check constraint. |
void |
setForeignKey(java.lang.String ref_table,
java.util.ArrayList col_list,
java.util.ArrayList ref_col_list,
java.lang.String delete_rule,
java.lang.String update_rule)
Sets object up for foreign key reference. |
void |
setInitiallyDeferred()
Sets that this constraint is initially deferred. |
void |
setName(java.lang.String name)
Sets the name of the constraint. |
void |
setNotDeferrable()
Sets that this constraint is not deferrable. |
void |
setPrimaryKey(java.util.ArrayList list)
Sets object up for a primary key constraint. |
void |
setUnique(java.util.ArrayList list)
Sets object up for a unique constraint. |
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int PRIMARY_KEY
public static final int UNIQUE
public static final int FOREIGN_KEY
public static final int CHECK
| Constructor Detail |
|---|
public ConstraintDef()
| Method Detail |
|---|
public void setName(java.lang.String name)
public void setPrimaryKey(java.util.ArrayList list)
public void setUnique(java.util.ArrayList list)
public void setCheck(Expression exp)
public void setForeignKey(java.lang.String ref_table,
java.util.ArrayList col_list,
java.util.ArrayList ref_col_list,
java.lang.String delete_rule,
java.lang.String update_rule)
public void setInitiallyDeferred()
public void setNotDeferrable()
public java.lang.String[] getColumnList()
public java.lang.String[] getColumnList2()
public java.lang.String getDeleteRule()
public java.lang.String getUpdateRule()
public void prepareExpressions(ExpressionPreparer preparer)
throws DatabaseException
StatementTreeObject
prepareExpressions in interface StatementTreeObjectDatabaseException
public java.lang.Object clone()
throws java.lang.CloneNotSupportedException
StatementTreeObject
clone in interface StatementTreeObjectclone in class java.lang.Objectjava.lang.CloneNotSupportedException
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||