public class ForeignKey extends Object
Constructor and Description |
---|
ForeignKey() |
Modifier and Type | Method and Description |
---|---|
void |
addColumn(int pos,
String field)
Adds a column to the key
|
void |
addForeignColumn(int pos,
String field)
Adds a foreign column which has to be matched be the local ones.
|
boolean |
equals(Object obj) |
List<String> |
getColumns()
Returns the columns that make up the key.
|
List<String> |
getForeignColumns()
Returns the columns matched in the referenced table.
|
String |
getForeignTable()
Returns the name of the referenced table.
|
String |
getName()
Returns the name of the foreign key.
|
int |
hashCode() |
void |
setForeignTable(String foreignTable)
Sets the name of the referenced table.
|
void |
setName(String name)
Sets the name of the foreign key.
|
String |
toString() |
public String getName()
public void setName(String name)
name
- then name of the foreign keypublic String getForeignTable()
public void setForeignTable(String foreignTable)
foreignTable
- the name of the referenced tablepublic List<String> getColumns()
public List<String> getForeignColumns()
public void addColumn(int pos, String field)
pos
- the position to add atfield
- the field or column to addpublic void addForeignColumn(int pos, String field)
pos
- the position to add atfield
- the field or column to addCopyright © 2018. All rights reserved.