org.axiondb.constraints
Class ForeignKeyConstraint

java.lang.Object
  extended by org.axiondb.constraints.BaseConstraint
      extended by org.axiondb.constraints.ForeignKeyConstraint
All Implemented Interfaces:
Serializable, Constraint

public class ForeignKeyConstraint
extends BaseConstraint

A FOREIGN KEY constraint

Version:
$Revision: 1.11 $ $Date: 2007/11/13 19:04:02 $
See Also:
Serialized Form

Field Summary
static int CASCADE
           
static int RESTRICT
           
static int SETDEFAULT
           
static int SETNULL
           
 
Constructor Summary
ForeignKeyConstraint(String name)
           
ForeignKeyConstraint(String name, String type)
           
 
Method Summary
 void addColumns(List list)
           
 void addForeignColumns(List list)
           
 boolean evaluate(RowEvent event)
          Evaluate the given event under me.
 boolean evaluate(RowEvent event, RowDecorator dec)
          Evaluate the given event under me.
 boolean evaluate(RowIterator oldRows, RowIterator newRows, Table table)
           
 List getChildTableColumns()
           
 String getChildTableName()
           
 int getOnDeleteActionType()
           
 int getOnUpdateActionType()
           
 List getParentTableColumns()
           
 String getParentTableName()
           
 void resolve(Database db, TableIdentifier table)
          This base implementation is a no-op.
 void setChildTable(Table table)
           
 void setChildTableName(String tableName)
           
 void setOnDeleteActionType(int actionType)
           
 void setOnUpdateActionType(int actionType)
           
 void setParentTable(Table table)
           
 void setParentTableName(String tableName)
           
 
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
 

Field Detail

CASCADE

public static final int CASCADE
See Also:
Constant Field Values

RESTRICT

public static final int RESTRICT
See Also:
Constant Field Values

SETDEFAULT

public static final int SETDEFAULT
See Also:
Constant Field Values

SETNULL

public static final int SETNULL
See Also:
Constant Field Values
Constructor Detail

ForeignKeyConstraint

public ForeignKeyConstraint(String name)

ForeignKeyConstraint

public ForeignKeyConstraint(String name,
                            String type)
Method Detail

addColumns

public void addColumns(List list)

addForeignColumns

public void addForeignColumns(List list)

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 BaseConstraint
Throws:
AxionException

evaluate

public boolean evaluate(RowEvent event,
                        RowDecorator dec)
                 throws AxionException
Description copied from interface: Constraint
Evaluate the given event under me. Returns false if the constraint I represent has been violated.

Throws:
AxionException

getChildTableColumns

public List getChildTableColumns()

getChildTableName

public String getChildTableName()

getOnDeleteActionType

public int getOnDeleteActionType()

getOnUpdateActionType

public int getOnUpdateActionType()

getParentTableColumns

public List getParentTableColumns()

getParentTableName

public String getParentTableName()

resolve

public void resolve(Database db,
                    TableIdentifier table)
             throws AxionException
Description copied from class: BaseConstraint
This base implementation is a no-op.

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

setChildTable

public void setChildTable(Table table)

setChildTableName

public void setChildTableName(String tableName)

setOnDeleteActionType

public void setOnDeleteActionType(int actionType)

setOnUpdateActionType

public void setOnUpdateActionType(int actionType)

setParentTable

public void setParentTable(Table table)

setParentTableName

public void setParentTableName(String tableName)

evaluate

public boolean evaluate(RowIterator oldRows,
                        RowIterator newRows,
                        Table table)
                 throws AxionException
Throws:
AxionException