org.axiondb.constraints
Class PrimaryKeyConstraint
java.lang.Object
org.axiondb.constraints.BaseConstraint
org.axiondb.constraints.BaseSelectableBasedConstraint
org.axiondb.constraints.UniqueConstraint
org.axiondb.constraints.PrimaryKeyConstraint
- All Implemented Interfaces:
- java.io.Serializable, Constraint, SelectableBasedConstraint
public class PrimaryKeyConstraint
- extends UniqueConstraint
A PRIMARY KEY constraint, which is violated whenever any of my Selectable
s are
null
or my collection of Selectable
s is not
unique
.
- Version:
- $Revision: 1.15 $ $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 |
PrimaryKeyConstraint
public PrimaryKeyConstraint(java.lang.String name)
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
- Overrides:
evaluate
in class UniqueConstraint
- 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.
- Specified by:
evaluate
in interface Constraint
- Overrides:
evaluate
in class UniqueConstraint
- Throws:
AxionException
evaluate
public boolean evaluate(RowIterator oldRows,
RowIterator newRows,
Table table)
throws AxionException
- Specified by:
evaluate
in interface Constraint
- Overrides:
evaluate
in class UniqueConstraint
- Throws:
AxionException