org.axiondb.constraints
Class UniqueConstraint

java.lang.Object
  extended byorg.axiondb.constraints.BaseConstraint
      extended byorg.axiondb.constraints.BaseSelectableBasedConstraint
          extended byorg.axiondb.constraints.UniqueConstraint
All Implemented Interfaces:
Constraint, SelectableBasedConstraint, Serializable
Direct Known Subclasses:
PrimaryKeyConstraint

public class UniqueConstraint
extends BaseSelectableBasedConstraint

A UNIQUE constraint, which is violated when my collection of Selectables is not unique within my table.

Version:
$Revision: 1.13 $ $Date: 2004/09/09 23:47:45 $
See Also:
Serialized Form

Constructor Summary
UniqueConstraint(String name)
           
UniqueConstraint(String name, String type)
           
 
Method Summary
 boolean evaluate(RowEvent event)
          Evaluate the given event under me.
 
Methods inherited from class org.axiondb.constraints.BaseSelectableBasedConstraint
addSelectable, getSelectable, getSelectableCount, getSelectableList, getSelectables, resolve
 
Methods inherited from class org.axiondb.constraints.BaseConstraint
getName, getType, isDeferrable, isDeferred, setDeferrable, setDeferred, setName, toArray
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.axiondb.Constraint
getName, getType, isDeferrable, isDeferred, setDeferrable, setDeferred, setName
 

Constructor Detail

UniqueConstraint

public UniqueConstraint(String name)

UniqueConstraint

public UniqueConstraint(String name,
                        String type)
Method Detail

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