public final class ConstraintDef extends Object implements Serializable, StatementTreeObject, Cloneable
Modifier and Type | Field and Description |
---|---|
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 and Description |
---|
ConstraintDef() |
Modifier and Type | Method and Description |
---|---|
Object |
clone()
Performs a DEEP clone of this object if it is mutable, or a deep clone
of its mutable members.
|
String[] |
getColumnList()
Returns the first column list as a string array.
|
String[] |
getColumnList2()
Returns the first column list as a string array.
|
String |
getDeleteRule()
Returns the delete rule if this is a foreign key reference.
|
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(String ref_table,
ArrayList col_list,
ArrayList ref_col_list,
String delete_rule,
String update_rule)
Sets object up for foreign key reference.
|
void |
setInitiallyDeferred()
Sets that this constraint is initially deferred.
|
void |
setName(String name)
Sets the name of the constraint.
|
void |
setNotDeferrable()
Sets that this constraint is not deferrable.
|
void |
setPrimaryKey(ArrayList list)
Sets object up for a primary key constraint.
|
void |
setUnique(ArrayList list)
Sets object up for a unique constraint.
|
public static final int PRIMARY_KEY
public static final int UNIQUE
public static final int FOREIGN_KEY
public static final int CHECK
public void setName(String name)
public void setPrimaryKey(ArrayList list)
public void setUnique(ArrayList list)
public void setCheck(Expression exp)
public void setForeignKey(String ref_table, ArrayList col_list, ArrayList ref_col_list, String delete_rule, String update_rule)
public void setInitiallyDeferred()
public void setNotDeferrable()
public String[] getColumnList()
public String[] getColumnList2()
public String getDeleteRule()
public String getUpdateRule()
public void prepareExpressions(ExpressionPreparer preparer) throws DatabaseException
StatementTreeObject
prepareExpressions
in interface StatementTreeObject
DatabaseException
public Object clone() throws CloneNotSupportedException
StatementTreeObject
clone
in interface StatementTreeObject
clone
in class Object
CloneNotSupportedException
Copyright © 2015. All rights reserved.