org.axiondb.constraints
Class CheckConstraint
java.lang.Object
org.axiondb.constraints.BaseConstraint
org.axiondb.constraints.CheckConstraint
- All Implemented Interfaces:
- Serializable, Constraint
public class CheckConstraint
- extends BaseConstraint
A CHECK constraint, which is violated whenever the given
condition
is violated.
- Version:
- $Revision: 1.17 $ $Date: 2005/12/20 18:32:46 $
- See Also:
- Serialized Form
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
CheckConstraint
public CheckConstraint(String name)
setCondition
public void setCondition(Selectable where)
getCondition
public Selectable getCondition()
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
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
evaluate
public boolean evaluate(RowIterator oldRows,
RowIterator newRows,
Table table)
throws AxionException
- Throws:
AxionException