org.axiondb.constraints
Class ForeignKeyConstraint
java.lang.Object
org.axiondb.constraints.BaseConstraint
org.axiondb.constraints.ForeignKeyConstraint
- All Implemented Interfaces:
- Serializable, Constraint
public class ForeignKeyConstraint
- extends BaseConstraint
A FOREIGN KEY constraint
- Version:
- $Revision: 1.11 $ $Date: 2007/11/13 19:04:02 $
- See Also:
- Serialized Form
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
CASCADE
public static final int CASCADE
- See Also:
- Constant Field Values
RESTRICT
public static final int RESTRICT
- See Also:
- Constant Field Values
SETDEFAULT
public static final int SETDEFAULT
- See Also:
- Constant Field Values
SETNULL
public static final int SETNULL
- See Also:
- Constant Field Values
ForeignKeyConstraint
public ForeignKeyConstraint(String name)
ForeignKeyConstraint
public ForeignKeyConstraint(String name,
String type)
addColumns
public void addColumns(List list)
addForeignColumns
public void addForeignColumns(List list)
evaluate
public boolean evaluate(RowEvent event)
throws AxionException
- Description copied from interface:
Constraint
- Evaluate the given event under me. Returns
false
if the
constraint I represent has been violated.
- Specified by:
evaluate
in interface Constraint
- Specified by:
evaluate
in class BaseConstraint
- Throws:
AxionException
evaluate
public boolean evaluate(RowEvent event,
RowDecorator dec)
throws AxionException
- Description copied from interface:
Constraint
- Evaluate the given event under me. Returns
false
if the
constraint I represent has been violated.
- Throws:
AxionException
getChildTableColumns
public List getChildTableColumns()
getChildTableName
public String getChildTableName()
getOnDeleteActionType
public int getOnDeleteActionType()
getOnUpdateActionType
public int getOnUpdateActionType()
getParentTableColumns
public List getParentTableColumns()
getParentTableName
public String getParentTableName()
resolve
public void resolve(Database db,
TableIdentifier table)
throws AxionException
- Description copied from class:
BaseConstraint
- This base implementation is a no-op.
- Specified by:
resolve
in interface Constraint
- Overrides:
resolve
in class BaseConstraint
- Throws:
AxionException
setChildTable
public void setChildTable(Table table)
setChildTableName
public void setChildTableName(String tableName)
setOnDeleteActionType
public void setOnDeleteActionType(int actionType)
setOnUpdateActionType
public void setOnUpdateActionType(int actionType)
setParentTable
public void setParentTable(Table table)
setParentTableName
public void setParentTableName(String tableName)
evaluate
public boolean evaluate(RowIterator oldRows,
RowIterator newRows,
Table table)
throws AxionException
- Throws:
AxionException