|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.torque.engine.database.model.ForeignKey
public class ForeignKey
A class for information about foreign keys of a table.
Constructor Summary | |
---|---|
ForeignKey()
|
Method Summary | |
---|---|
void |
addOption(java.lang.String key,
java.lang.String value)
Add an XML Specified option key/value pair to this element's option set. |
void |
addReference(org.xml.sax.Attributes attrib)
Adds a new reference entry to the foreign key |
void |
addReference(java.lang.String local,
java.lang.String foreign)
Adds a new reference entry to the foreign key |
java.lang.String |
getForeignColumnNames()
Returns a comma delimited string of foreign column names |
java.util.List |
getForeignColumns()
Returns the list of foreign column names. |
java.util.Hashtable |
getForeignLocalMapping()
Utility method to get foreign column names to local column names mapping for this foreign key. |
java.lang.String |
getForeignTableName()
Get the foreignTableName of the FK |
java.lang.String |
getLocalColumnNames()
Returns a comma delimited string of local column names |
java.util.List |
getLocalColumns()
Returns the list of local column names. |
java.util.Hashtable |
getLocalForeignMapping()
Utility method to get local column names to foreign column names mapping for this foreign key. |
java.lang.String |
getName()
Returns the name attribute. |
java.lang.String |
getOnDelete()
Returns the onDelete attribute |
java.lang.String |
getOnUpdate()
Returns the onUpdate attribute |
java.lang.String |
getOption(java.lang.String key)
Get the value that was associated with this key in an XML option element. |
java.util.Map |
getOptions()
Gets the full ordered hashtable array of items specified by XML option statements under this element. |
Table |
getTable()
Get the parent Table of the foreign key |
java.lang.String |
getTableName()
Returns the name of the table the foreign key is in |
boolean |
hasOnDelete()
Returns whether or not the onDelete attribute is set |
boolean |
hasOnUpdate()
Returns whether or not the onUpdate attribute is set |
void |
loadFromXML(org.xml.sax.Attributes attrib)
Imports foreign key from an XML specification |
void |
setForeignTableName(java.lang.String tableName)
Set the foreignTableName of the FK |
void |
setName(java.lang.String name)
Sets the name attribute. |
void |
setOnDelete(java.lang.String value)
Sets the onDelete attribute |
void |
setOnUpdate(java.lang.String value)
Sets the onUpdate attribute |
void |
setTable(Table parent)
Set the parent Table of the foreign key |
java.lang.String |
toString()
String representation of the foreign key. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public ForeignKey()
Method Detail |
---|
public void loadFromXML(org.xml.sax.Attributes attrib)
attrib
- the xml attributespublic boolean hasOnUpdate()
public boolean hasOnDelete()
public java.lang.String getOnUpdate()
public java.lang.String getOnDelete()
public void setOnDelete(java.lang.String value)
value
- the onDelete attributepublic void setOnUpdate(java.lang.String value)
value
- the onUpdate attributepublic java.lang.String getName()
public void setName(java.lang.String name)
name
- the namepublic java.lang.String getForeignTableName()
public void setForeignTableName(java.lang.String tableName)
tableName
- the name of the foreign tablepublic void setTable(Table parent)
parent
- the tablepublic Table getTable()
public java.lang.String getTableName()
public void addReference(org.xml.sax.Attributes attrib)
attrib
- the xml attributespublic void addReference(java.lang.String local, java.lang.String foreign)
local
- name of the local columnforeign
- name of the foreign columnpublic java.lang.String getLocalColumnNames()
public java.lang.String getForeignColumnNames()
public java.util.List getLocalColumns()
public java.util.Hashtable getLocalForeignMapping()
public java.util.List getForeignColumns()
public java.util.Hashtable getForeignLocalMapping()
public java.lang.String toString()
toString
in class java.lang.Object
public void addOption(java.lang.String key, java.lang.String value)
key
- the key of the option.value
- the value of the option.public java.lang.String getOption(java.lang.String key)
key
- the key of the option.
public java.util.Map getOptions()
Note, this is not thread save but since it's only used for generation which is single threaded, there should be minimum danger using this in Velocity.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |