Purpose: Define a foreign key from one table to another. This support composite foreign keys can constraint options.
| Modifier and Type | Field and Description |
|---|---|
| protected boolean | |
| protected String | |
| protected String | |
| protected boolean | |
| protected List | |
| protected List | |
| protected String |
| Access | Constructor and Description |
|---|---|
| public | |
| public |
| Modifier and Type | Method and Description |
|---|---|
| public void | |
| public void | |
| public void | appendDBString(Writer writer, AbstractSession session)
INTERNAL: Append the database field definition string to the table creation statement. |
| public void | |
| public boolean | |
| public void | |
| public String | |
| public String | |
| public List | |
| public List | |
| public String | |
| public boolean | |
| public boolean | |
| public void | |
| public void | |
| public void | |
| public void | setShouldCascadeOnDelete(boolean shouldCascadeOnDelete)
PUBLIC: Enables delete cascading on the database. |
| public void | |
| public void | |
| public void | |
| public boolean |
| disableForeignKey | back to summary |
|---|---|
| protected boolean disableForeignKey | |
| foreignKeyDefinition | back to summary |
|---|---|
| protected String foreignKeyDefinition | |
| name | back to summary |
|---|---|
| protected String name | |
| shouldCascadeOnDelete | back to summary |
|---|---|
| protected boolean shouldCascadeOnDelete | |
| sourceFields | back to summary |
|---|---|
| protected List<String> sourceFields | |
| targetFields | back to summary |
|---|---|
| protected List<String> targetFields | |
| targetTable | back to summary |
|---|---|
| protected String targetTable | |
| ForeignKeyConstraint | back to summary |
|---|---|
| public ForeignKeyConstraint() | |
| ForeignKeyConstraint | back to summary |
|---|---|
| public ForeignKeyConstraint(String name, String sourceField, String targetField, String targetTable) | |
| addSourceField | back to summary |
|---|---|
| public void addSourceField(String sourceField) | |
| addTargetField | back to summary |
|---|---|
| public void addTargetField(String targetField) | |
| appendDBString | back to summary |
|---|---|
| public void appendDBString(Writer writer, AbstractSession session) INTERNAL: Append the database field definition string to the table creation statement. | |
| cascadeOnDelete | back to summary |
|---|---|
| public void cascadeOnDelete() PUBLIC: Enables delete cascading on the database. This must be used carefully, i.e. only private relationships. | |
| disableForeignKey | back to summary |
|---|---|
| public boolean disableForeignKey() | |
| dontCascadeOnDelete | back to summary |
|---|---|
| public void dontCascadeOnDelete() PUBLIC: Disables delete cascading on the database, this is the default. | |
| getForeignKeyDefinition | back to summary |
|---|---|
| public String getForeignKeyDefinition() | |
| getName | back to summary |
|---|---|
| public String getName() | |
| getSourceFields | back to summary |
|---|---|
| public List | |
| getTargetFields | back to summary |
|---|---|
| public List | |
| getTargetTable | back to summary |
|---|---|
| public String getTargetTable() | |
| hasForeignKeyDefinition | back to summary |
|---|---|
| public boolean hasForeignKeyDefinition() | |
| isDisableForeignKey | back to summary |
|---|---|
| public boolean isDisableForeignKey() | |
| setDisableForeignKey | back to summary |
|---|---|
| public void setDisableForeignKey(boolean disableForeignKey) | |
| setForeignKeyDefinition | back to summary |
|---|---|
| public void setForeignKeyDefinition(String foreignKeyDefinition) | |
| setName | back to summary |
|---|---|
| public void setName(String name) | |
| setShouldCascadeOnDelete | back to summary |
|---|---|
| public void setShouldCascadeOnDelete(boolean shouldCascadeOnDelete) PUBLIC: Enables delete cascading on the database. This must be used carefully, i.e. only private relationships. | |
| setSourceFields | back to summary |
|---|---|
| public void setSourceFields(List<String> sourceFields) | |
| setTargetFields | back to summary |
|---|---|
| public void setTargetFields(List<String> targetFields) | |
| setTargetTable | back to summary |
|---|---|
| public void setTargetTable(String targetTable) | |
| shouldCascadeOnDelete | back to summary |
|---|---|
| public boolean shouldCascadeOnDelete() | |