|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.axiondb.constraints.BaseConstraint
Abstract base Constraint
implementation.
Constructor Summary | |
BaseConstraint(String name,
String type)
Creates a Constraint with the
given name and type. |
Method Summary | |
abstract boolean |
evaluate(RowEvent event)
Evaluate the given event under me. |
String |
getName()
Get my name. |
String |
getType()
Get a human-readable descrption of the type of constraint I represent. |
boolean |
isDeferrable()
Return whether or not I am deferrable. |
boolean |
isDeferred()
Return whether or not I am deferred. |
void |
resolve(Database db,
TableIdentifier table)
This base implementation is a no-op. |
void |
setDeferrable(boolean deferrable)
Set whether or not I am deferrable. |
void |
setDeferred(boolean deferred)
Set whether or not I am deferred. |
void |
setName(String name)
Sets the name of this constraint. |
protected TableIdentifier[] |
toArray(TableIdentifier table)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public BaseConstraint(String name, String type)
Constraint
with the
given name and type.
name
- the name of this constraint (see setName(java.lang.String)
)
which may be null
type
- the type of this constraint (see getType()
),
which should not be null
Method Detail |
public abstract boolean evaluate(RowEvent event) throws AxionException
Constraint
false
if the
constraint I represent has been violated.
evaluate
in interface Constraint
AxionException
public void resolve(Database db, TableIdentifier table) throws AxionException
resolve
in interface Constraint
AxionException
public String getName()
Constraint
getName
in interface Constraint
public void setName(String name)
null
a unique
name is programatically generated.
setName
in interface Constraint
public String getType()
Constraint
getType
in interface Constraint
public boolean isDeferred()
Constraint
isDeferred
in interface Constraint
public void setDeferred(boolean deferred) throws AxionException
Constraint
deferrable
and deferred is true
.
setDeferred
in interface Constraint
AxionException
public boolean isDeferrable()
Constraint
isDeferrable
in interface Constraint
public void setDeferrable(boolean deferrable)
Constraint
setDeferrable
in interface Constraint
protected TableIdentifier[] toArray(TableIdentifier table)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |