org.axiondb.constraints
Class UniqueConstraint
java.lang.Object
org.axiondb.constraints.BaseConstraint
org.axiondb.constraints.BaseSelectableBasedConstraint
org.axiondb.constraints.UniqueConstraint
- All Implemented Interfaces:
- Serializable, Constraint, SelectableBasedConstraint
- Direct Known Subclasses:
- PrimaryKeyConstraint
public class UniqueConstraint
- extends BaseSelectableBasedConstraint
A UNIQUE constraint, which is violated when my collection of Selectable
s is
not unique within my table.
- Version:
- $Revision: 1.16 $ $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 |
UniqueConstraint
public UniqueConstraint(String name)
UniqueConstraint
public UniqueConstraint(String name,
String type)
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 BaseSelectableBasedConstraint
- 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
- Specified by:
evaluate
in class BaseSelectableBasedConstraint
- Throws:
AxionException
evaluate
public boolean evaluate(RowEvent event,
RowDecorator dec,
boolean wasDeferred)
throws AxionException
- Throws:
AxionException
evaluate
public boolean evaluate(RowIterator oldRows,
RowIterator newRows,
Table table)
throws AxionException
- Specified by:
evaluate
in interface Constraint
- Specified by:
evaluate
in class BaseSelectableBasedConstraint
- Throws:
AxionException
addFK
public void addFK(String name)
getFKs
public Iterator getFKs()