org.axiondb.constraints
Class BaseSelectableBasedConstraint

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

public abstract class BaseSelectableBasedConstraint
extends BaseConstraint
implements SelectableBasedConstraint

Abstract base SelectableBasedConstraintimplementation.

Version:
$Revision: 1.11 $ $Date: 2004/08/07 10:14:41 $
See Also:
Serialized Form

Constructor Summary
BaseSelectableBasedConstraint(String name, String type)
          Creates a Constraintwith the given name and type .
 
Method Summary
 void addSelectable(Selectable sel)
           
abstract  boolean evaluate(RowEvent event)
          Evaluate the given event under me.
 Selectable getSelectable(int i)
           
 int getSelectableCount()
           
 List getSelectableList()
           
 Iterator getSelectables()
           
 void resolve(Database db, TableIdentifier table)
          This base implementation resolvesall of the Selectables in my list.
 
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

BaseSelectableBasedConstraint

public BaseSelectableBasedConstraint(String name,
                                     String type)
Creates a Constraintwith the given name and type .

Parameters:
name - the name of this constraint (see BaseConstraint.setName(java.lang.String)) which may be null
type - the type of this constraint (see BaseConstraint.getType()), which should not be null
Method Detail

evaluate

public abstract 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

addSelectable

public void addSelectable(Selectable sel)
Specified by:
addSelectable in interface SelectableBasedConstraint

getSelectableCount

public int getSelectableCount()
Specified by:
getSelectableCount in interface SelectableBasedConstraint

getSelectable

public Selectable getSelectable(int i)
Specified by:
getSelectable in interface SelectableBasedConstraint

getSelectableList

public List getSelectableList()

getSelectables

public Iterator getSelectables()

resolve

public void resolve(Database db,
                    TableIdentifier table)
             throws AxionException
This base implementation resolvesall of the Selectables in my list.

Specified by:
resolve in interface Constraint
Overrides:
resolve in class BaseConstraint
Throws:
AxionException