org.axiondb.constraints

Class BaseConstraint

public abstract class BaseConstraint extends Object implements Constraint

Abstract base Constraint implementation.

Version: $Revision: 1.16 $ $Date: 2005/12/20 18:32:46 $

Author: Rodney Waldhoff James Strachan Ahimanikya Satapathy

Constructor Summary
BaseConstraint(String name, String type)
Creates a Constraint with the given name and type.
Method Summary
abstract booleanevaluate(RowEvent event)
StringgetName()
StringgetType()
booleanisDeferrable()
booleanisDeferred()
voidresolve(Database db, TableIdentifier table)
This base implementation is a no-op.
voidsetDeferrable(boolean deferrable)
voidsetDeferred(boolean deferred)
voidsetName(String name)
Sets the name of this constraint.
protected TableIdentifier[]toArray(TableIdentifier table)

Constructor Detail

BaseConstraint

public BaseConstraint(String name, String type)
Creates a Constraint with the given name and type.

Parameters: name the name of this constraint (see BaseConstraint) which may be null type the type of this constraint (see BaseConstraint), which should not be null

Method Detail

evaluate

public abstract boolean evaluate(RowEvent event)

getName

public String getName()

getType

public String getType()

isDeferrable

public boolean isDeferrable()

isDeferred

public boolean isDeferred()

resolve

public void resolve(Database db, TableIdentifier table)
This base implementation is a no-op.

setDeferrable

public void setDeferrable(boolean deferrable)

setDeferred

public void setDeferred(boolean deferred)

setName

public void setName(String name)
Sets the name of this constraint. When name is null a unique name is programatically generated.

toArray

protected TableIdentifier[] toArray(TableIdentifier table)