|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.clazzes.jdbc2xml.schema.ForeignKeyInfo
public class ForeignKeyInfo
This class implements all infos we need to describe a foreign key.
Constructor Summary | |
---|---|
ForeignKeyInfo()
Default constructor. |
|
ForeignKeyInfo(Attributes atts)
Initialize this object from SAX attributes. |
|
ForeignKeyInfo(String name,
String columns,
String foreignTable,
String foreignColumns)
Constructor using name, table and columns. |
Method Summary | |
---|---|
void |
addColumn(String column)
|
void |
addForeignColumn(String column)
|
List<String> |
getColumns()
|
short |
getDeferrability()
|
short |
getDeleteRule()
|
List<String> |
getForeignColumns()
|
String |
getForeignTable()
|
String |
getName()
|
String |
getPkName()
|
short |
getUpdateRule()
|
void |
setColumns(List<String> columns)
|
void |
setDeferrability(short deferrability)
|
void |
setDeleteRule(short deleteRule)
|
void |
setForeignColumns(List<String> foreignColumns)
|
void |
setForeignTable(String foreignTable)
|
void |
setName(String name)
|
void |
setPkName(String pkName)
|
void |
setUpdateRule(short updateRule)
|
Attributes |
toAttributes(SqlIdentifierMapper mapper)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ForeignKeyInfo()
public ForeignKeyInfo(String name, String columns, String foreignTable, String foreignColumns)
name
- The name of the foreign key.columns
- A comma-separated list of columns in the own table.foreignTable
- The name of the referenced foreign table.foreignColumns
- The referenced columns of the foreign table (comma-separated).public ForeignKeyInfo(Attributes atts)
atts
- A SAX attributes bag to set to this object.Method Detail |
---|
public Attributes toAttributes(SqlIdentifierMapper mapper)
public String getName()
public void setName(String name)
name
- the name to setpublic List<String> getColumns()
public void setColumns(List<String> columns)
columns
- the columns to setpublic void addColumn(String column)
column
- The column name to add to the list of columns.public String getPkName()
public void setPkName(String pkName)
pkName
- the pkName to setpublic String getForeignTable()
public void setForeignTable(String foreignTable)
foreignTable
- the foreignTable to setpublic List<String> getForeignColumns()
public void setForeignColumns(List<String> foreignColumns)
foreignColumns
- the foreignColumns to setpublic void addForeignColumn(String column)
column
- The column name to add to the list of foreign columns.public short getUpdateRule()
DatabaseMetaData.importedKeyCascade
,
DatabaseMetaData.importedKeyNoAction
,
DatabaseMetaData.importedKeyRestrict
,
DatabaseMetaData.importedKeySetDefault
,
DatabaseMetaData.importedKeySetNull
public void setUpdateRule(short updateRule)
updateRule
- the updateRule to setpublic short getDeleteRule()
DatabaseMetaData.importedKeyCascade
,
DatabaseMetaData.importedKeyNoAction
,
DatabaseMetaData.importedKeyRestrict
,
DatabaseMetaData.importedKeySetDefault
,
DatabaseMetaData.importedKeySetNull
public void setDeleteRule(short deleteRule)
deleteRule
- the deleteRule to setpublic short getDeferrability()
DatabaseMetaData.importedKeyInitiallyDeferred
,
DatabaseMetaData.importedKeyNotDeferrable
,
DatabaseMetaData.importedKeyInitiallyImmediate
public void setDeferrability(short deferrability)
deferrability
- The deferrability to set.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |