org.apache.ws.jaxme.sqls

Interface ForeignKey

public interface ForeignKey extends ColumnSet

Interface of a foreign key.

Author: Jochen Wiedmann

Nested Class Summary
static interfaceForeignKey.ColumnLink
static classForeignKey.Mode
Method Summary
voidaddColumnLink(Column pColumn, Column pReferencedColumn)

Adds a reference between the given columns.

voidaddColumnLink(Column.Name pName, Column.Name pReferencedName)

Adds a reference between the given columns.

voidaddColumnLink(String pName, String pReferencedName)

Adds a reference between the given columns.

IteratorgetColumnLinks()

Returns all column references in the foreign key.

ForeignKey.ModegetOnDelete()

Returns the OnDelete mode.

ForeignKey.ModegetOnUpdate()

Returns the OnUpdate mode.

ColumnSetgetReferencedColumns()

Returns the set of referenced columns.

TablegetReferencedTable()

Returns the referenced table.

voidsetOnDelete(ForeignKey.Mode pMode)

Sets the OnDelete mode.

voidsetOnUpdate(ForeignKey.Mode pMode)

Sets the OnUpdate mode.

Method Detail

addColumnLink

public void addColumnLink(Column pColumn, Column pReferencedColumn)

Adds a reference between the given columns.

Parameters: pColumn A column of the table, on which the foreign key is defined pReferencedColumn A column of the referenced table

addColumnLink

public void addColumnLink(Column.Name pName, Column.Name pReferencedName)

Adds a reference between the given columns.

Parameters: pName Column name of the table, on which the foreign key is defined pReferencedName Column name of the referenced table.

addColumnLink

public void addColumnLink(String pName, String pReferencedName)

Adds a reference between the given columns.

Parameters: pName Column name of the table, on which the foreign key is defined pReferencedName Column name of the referenced table.

getColumnLinks

public Iterator getColumnLinks()

Returns all column references in the foreign key. Any instance returned by the {@link Iterator} is an instance of {@link ForeignKey.ColumnLink}.

getOnDelete

public ForeignKey.Mode getOnDelete()

Returns the OnDelete mode.

getOnUpdate

public ForeignKey.Mode getOnUpdate()

Returns the OnUpdate mode.

getReferencedColumns

public ColumnSet getReferencedColumns()

Returns the set of referenced columns.

getReferencedTable

public Table getReferencedTable()

Returns the referenced table.

setOnDelete

public void setOnDelete(ForeignKey.Mode pMode)

Sets the OnDelete mode.

setOnUpdate

public void setOnUpdate(ForeignKey.Mode pMode)

Sets the OnUpdate mode.