org.jboss.dna.common.jdbc.model.api
Interface ForeignKey

All Superinterfaces:
CoreMetaData, DatabaseNamedObject, SchemaObject, Serializable
All Known Implementing Classes:
ForeignKeyBean

public interface ForeignKey
extends SchemaObject

Provides database table's foreing key specific metadata.

Author:
Sergiy Litsenko

Method Summary
 void addColumn(ForeignKeyColumn column)
          Adds ForeignKeyColumn
 void deleteColumn(ForeignKeyColumn column)
          deletes ForeignKeyColumn
 ForeignKeyColumn findColumnByName(String columnName)
          Returns table column for specified column name or null
 Set<ForeignKeyColumn> getColumns()
          Retrieves foreign key columns
 KeyDeferrabilityType getDeferrability()
          Can the evaluation of foreign key constraints be deferred until commit
 KeyModifyRuleType getDeleteRule()
          What happens to a foreign key when the primary key is deleted
 PrimaryKey getSourcePrimaryKey()
          Returns the PK of scope table.
 Table getSourceTable()
          Returns the scope table of a foreign key.
 KeyModifyRuleType getUpdateRule()
          What happens to a foreign key when the primary key is updated
 void setDeferrability(KeyDeferrabilityType deferrability)
          Can the evaluation of foreign key constraints be deferred until commit
 void setDeleteRule(KeyModifyRuleType deleteRule)
          What happens to a foreign key when the primary key is deleted
 void setSourcePrimaryKey(PrimaryKey primaryKey)
          Sets the PK of scope table.
 void setSourceTable(Table sourceTable)
          Sets the scope table of a foreign key.
 void setUpdateRule(KeyModifyRuleType updateRule)
          What happens to a foreign key when the primary key is updated
 
Methods inherited from interface org.jboss.dna.common.jdbc.model.api.SchemaObject
getCatalog, getSchema, setCatalog, setSchema
 
Methods inherited from interface org.jboss.dna.common.jdbc.model.api.DatabaseNamedObject
addExtraProperty, deleteExtraProperty, getExtraProperties, getExtraProperty, getName, getRemarks, setName, setRemarks
 

Method Detail

getColumns

Set<ForeignKeyColumn> getColumns()
Retrieves foreign key columns

Returns:
foreign key columns

addColumn

void addColumn(ForeignKeyColumn column)
Adds ForeignKeyColumn

Parameters:
column - the ForeignKeyColumn

deleteColumn

void deleteColumn(ForeignKeyColumn column)
deletes ForeignKeyColumn

Parameters:
column - the ForeignKeyColumn

findColumnByName

ForeignKeyColumn findColumnByName(String columnName)
Returns table column for specified column name or null

Parameters:
columnName - the name of column
Returns:
table column for specified column name or null.

getSourceTable

Table getSourceTable()
Returns the scope table of a foreign key.

Returns:
the scope table of a foreign key.

setSourceTable

void setSourceTable(Table sourceTable)
Sets the scope table of a foreign key.

Parameters:
sourceTable - the scope table of a foreign key.

getSourcePrimaryKey

PrimaryKey getSourcePrimaryKey()
Returns the PK of scope table.

Returns:
the PK of scope table.

setSourcePrimaryKey

void setSourcePrimaryKey(PrimaryKey primaryKey)
Sets the PK of scope table.

Parameters:
primaryKey - the PK of scope table.

getUpdateRule

KeyModifyRuleType getUpdateRule()
What happens to a foreign key when the primary key is updated

Returns:
what happens to a foreign key when the primary key is updated

setUpdateRule

void setUpdateRule(KeyModifyRuleType updateRule)
What happens to a foreign key when the primary key is updated

Parameters:
updateRule - what happens to a foreign key when the primary key is updated

getDeleteRule

KeyModifyRuleType getDeleteRule()
What happens to a foreign key when the primary key is deleted

Returns:
what happens to a foreign key when the primary key is deleted

setDeleteRule

void setDeleteRule(KeyModifyRuleType deleteRule)
What happens to a foreign key when the primary key is deleted

Parameters:
deleteRule - what happens to a foreign key when the primary key is deleted

getDeferrability

KeyDeferrabilityType getDeferrability()
Can the evaluation of foreign key constraints be deferred until commit

Returns:
the evaluation of foreign key constraints be deferred until commit

setDeferrability

void setDeferrability(KeyDeferrabilityType deferrability)
Can the evaluation of foreign key constraints be deferred until commit

Parameters:
deferrability - the evaluation of foreign key constraints be deferred until commit


Copyright © 2008-Present JBoss a division of Red Hat. All Rights Reserved.