public class ForeignKeyConstraint extends BaseConstraint
Modifier and Type | Field and Description |
---|---|
static int |
CASCADE |
static int |
RESTRICT |
static int |
SETDEFAULT |
static int |
SETNULL |
Constructor and Description |
---|
ForeignKeyConstraint(java.lang.String name) |
ForeignKeyConstraint(java.lang.String name,
java.lang.String type) |
Modifier and Type | Method and Description |
---|---|
void |
addColumns(java.util.List list) |
void |
addForeignColumns(java.util.List list) |
boolean |
evaluate(RowEvent event)
Evaluate the given event under me.
|
boolean |
evaluate(RowEvent event,
RowDecorator dec)
Evaluate the given event under me.
|
boolean |
evaluate(RowIterator oldRows,
RowIterator newRows,
Table table) |
java.util.List |
getChildTableColumns() |
java.lang.String |
getChildTableName() |
int |
getOnDeleteActionType() |
int |
getOnUpdateActionType() |
java.util.List |
getParentTableColumns() |
java.lang.String |
getParentTableName() |
void |
resolve(Database db,
TableIdentifier table)
This base implementation is a no-op.
|
void |
setChildTable(Table table) |
void |
setChildTableName(java.lang.String tableName) |
void |
setOnDeleteActionType(int actionType) |
void |
setOnUpdateActionType(int actionType) |
void |
setParentTable(Table table) |
void |
setParentTableName(java.lang.String tableName) |
getName, getType, isDeferrable, isDeferred, setDeferrable, setDeferred, setName, toArray
public static final int CASCADE
public static final int RESTRICT
public static final int SETDEFAULT
public static final int SETNULL
public ForeignKeyConstraint(java.lang.String name)
public ForeignKeyConstraint(java.lang.String name, java.lang.String type)
public void addColumns(java.util.List list)
public void addForeignColumns(java.util.List list)
public boolean evaluate(RowEvent event) throws AxionException
Constraint
false
if the
constraint I represent has been violated.evaluate
in interface Constraint
evaluate
in class BaseConstraint
AxionException
public boolean evaluate(RowEvent event, RowDecorator dec) throws AxionException
Constraint
false
if the
constraint I represent has been violated.AxionException
public java.util.List getChildTableColumns()
public java.lang.String getChildTableName()
public int getOnDeleteActionType()
public int getOnUpdateActionType()
public java.util.List getParentTableColumns()
public java.lang.String getParentTableName()
public void resolve(Database db, TableIdentifier table) throws AxionException
BaseConstraint
resolve
in interface Constraint
resolve
in class BaseConstraint
AxionException
public void setChildTable(Table table)
public void setChildTableName(java.lang.String tableName)
public void setOnDeleteActionType(int actionType)
public void setOnUpdateActionType(int actionType)
public void setParentTable(Table table)
public void setParentTableName(java.lang.String tableName)
public boolean evaluate(RowIterator oldRows, RowIterator newRows, Table table) throws AxionException
AxionException