Class ForeignKeyConstraint
java.lang.Object
com.github.tadukoo.database.mysql.syntax.ForeignKeyConstraint
Foreign Key Constraint represents a foreign key constraint in MySQL
- Version:
- Alpha v.0.3
- Author:
- Logan Ferree (Tadukoo)
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfaceThe Column Names part of building aForeignKeyConstraintstatic classA builder to use to make aForeignKeyConstraint.static interfaceTheOptionsand building part of building aForeignKeyConstraintstatic interfaceThe Reference Column Names part of building aForeignKeyConstraintstatic interfaceThe Reference Table part of building aForeignKeyConstraint -
Field Summary
FieldsModifier and TypeFieldDescriptionThe names of the columns for the foreign keyprivate final SQLReferenceOptionThereference optionfor on deleteprivate final SQLReferenceOptionThereference optionfor on updateThe names of the columns from the reference tableprivate final StringThe name of the reference table for the foreign key -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivateForeignKeyConstraint(List<String> columnNames, String referenceTable, List<String> referenceColumnNames, SQLReferenceOption onDeleteOption, SQLReferenceOption onUpdateOption) Constructs a newForeignKeyConstraintusing the given parameters -
Method Summary
-
Field Details
-
columnNames
The names of the columns for the foreign key -
referenceTable
The name of the reference table for the foreign key -
referenceColumnNames
The names of the columns from the reference table -
onDeleteOption
Thereference optionfor on delete -
onUpdateOption
Thereference optionfor on update
-
-
Constructor Details
-
ForeignKeyConstraint
private ForeignKeyConstraint(List<String> columnNames, String referenceTable, List<String> referenceColumnNames, SQLReferenceOption onDeleteOption, SQLReferenceOption onUpdateOption) Constructs a newForeignKeyConstraintusing the given parameters- Parameters:
columnNames- The names of the columns for the foreign keyreferenceTable- The name of the reference table for the foreign keyreferenceColumnNames- The names of the columns from the reference tableonDeleteOption- Thereference optionfor on deleteonUpdateOption- Thereference optionfor on update
-
-
Method Details
-
builder
- Returns:
- A new
builderto use to build aForeignKeyConstraint
-
getColumnNames
- Returns:
- The names of the columns for the foreign key
-
getReferenceTable
- Returns:
- The name of the reference table for the foreign key
-
getReferenceColumnNames
- Returns:
- The names of the columns from the reference table
-
getOnDeleteOption
- Returns:
- The
reference optionfor on delete
-
getOnUpdateOption
- Returns:
- The
reference optionfor on update
-
toString
-