|
Ontimize 5.2072EN | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.ontimize.db.sql.SQLConstraint
com.ontimize.db.sql.SQLForeignKey
| Field Summary | |
protected static java.lang.String |
FOREIGN_KEY
|
protected java.util.List |
foreignColumns
The list of columns of the referenced table in where the constraint is applied. |
protected static java.lang.String |
REFERENCES
|
protected java.lang.String |
secondaryTable
The name of the referenced table |
| Fields inherited from class com.ontimize.db.sql.SQLConstraint |
columns, CONSTRAINT, constraintName |
| Constructor Summary | |
SQLForeignKey(java.lang.String constraintName)
|
|
SQLForeignKey(java.lang.String secondaryTable,
java.util.Hashtable keys)
|
|
SQLForeignKey(java.lang.String constraintName,
java.lang.String secondaryTable,
java.util.Hashtable keys)
|
|
| Method Summary | |
java.util.List |
getForeignColumns()
This method returns the list of column/s of the referenced table that are going to be used into the constraint. |
java.lang.String |
getSecondaryTable()
Returns the name of the referenced table. |
void |
setKeys(java.util.Hashtable keys)
|
void |
setSecondaryTable(java.lang.String secondaryTable)
This method sets the name of the referenced table of the Foreign key. |
java.lang.String |
toString()
This method returns the SQL Statement to add a Foreign Key constraint to a database table. |
| Methods inherited from class com.ontimize.db.sql.SQLConstraint |
getColumnList, getColumns, getConstraintName, setConstraintName |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
protected static final java.lang.String FOREIGN_KEY
protected static final java.lang.String REFERENCES
protected java.lang.String secondaryTable
protected java.util.List foreignColumns
| Constructor Detail |
public SQLForeignKey(java.lang.String secondaryTable,
java.util.Hashtable keys)
secondaryTable - The table, in which the restriction is made,keys - Must contains a pair key-value, where key is the table column
and value is the name of reference column.
public SQLForeignKey(java.lang.String constraintName,
java.lang.String secondaryTable,
java.util.Hashtable keys)
constraintName - The name of the constraint.secondaryTable - The table, in which the restriction is made,keys - Must contains a pair key-value, where key is the table column
and value is the name of reference column.public SQLForeignKey(java.lang.String constraintName)
constraintName - The name of the constraint.| Method Detail |
public java.util.List getForeignColumns()
String with the column/s between parenthesispublic void setKeys(java.util.Hashtable keys)
keys - Must contains a pair key-value, where key is the table column
and value is the name of reference column.public java.lang.String getSecondaryTable()
String with the name of the referenced table.public void setSecondaryTable(java.lang.String secondaryTable)
secondaryTable - String with the name of the referenced table.public java.lang.String toString()
String with the SQL Statement
|
Ontimize | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||