org.axiondb.constraints
Class PrimaryKeyConstraint

java.lang.Object
  extended by org.axiondb.constraints.BaseConstraint
      extended by org.axiondb.constraints.BaseSelectableBasedConstraint
          extended by org.axiondb.constraints.UniqueConstraint
              extended by org.axiondb.constraints.PrimaryKeyConstraint
All Implemented Interfaces:
Serializable, Constraint, SelectableBasedConstraint

public class PrimaryKeyConstraint
extends UniqueConstraint

A PRIMARY KEY constraint, which is violated whenever any of my Selectables are null or my collection of Selectables is not unique.

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

Constructor Summary
PrimaryKeyConstraint(String name)
           
 
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

PrimaryKeyConstraint

public PrimaryKeyConstraint(String name)
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
Overrides:
evaluate in class UniqueConstraint
Throws:
AxionException