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
Modifier and TypeClassDescriptionstatic interface
The Column Names part of building aForeignKeyConstraint
static class
A builder to use to make aForeignKeyConstraint
.static interface
TheOptions
and building part of building aForeignKeyConstraint
static interface
The Reference Column Names part of building aForeignKeyConstraint
static interface
The Reference Table part of building aForeignKeyConstraint
-
Field Summary
Modifier and TypeFieldDescriptionThe names of the columns for the foreign keyprivate final SQLReferenceOption
Thereference option
for on deleteprivate final SQLReferenceOption
Thereference option
for on updateThe names of the columns from the reference tableprivate final String
The name of the reference table for the foreign key -
Constructor Summary
ModifierConstructorDescriptionprivate
ForeignKeyConstraint
(List<String> columnNames, String referenceTable, List<String> referenceColumnNames, SQLReferenceOption onDeleteOption, SQLReferenceOption onUpdateOption) Constructs a newForeignKeyConstraint
using 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 option
for on delete -
onUpdateOption
Thereference option
for on update
-
-
Constructor Details
-
ForeignKeyConstraint
private ForeignKeyConstraint(List<String> columnNames, String referenceTable, List<String> referenceColumnNames, SQLReferenceOption onDeleteOption, SQLReferenceOption onUpdateOption) Constructs a newForeignKeyConstraint
using 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 option
for on deleteonUpdateOption
- Thereference option
for on update
-
-
Method Details
-
builder
- Returns:
- A new
builder
to 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 option
for on delete
-
getOnUpdateOption
- Returns:
- The
reference option
for on update
-
toString
-