Package com.gengoai.sql.constraint
Class ForeignKeyConstraint
- java.lang.Object
-
- com.gengoai.sql.constraint.Constraint
-
- com.gengoai.sql.constraint.ForeignKeyConstraint
-
- All Implemented Interfaces:
Serializable
public class ForeignKeyConstraint extends Constraint
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected List<SQLElement>
columns
protected Deferrable
deferred
protected SQLElement
foreignTable
protected List<SQLElement>
foreignTableColumns
protected ForeignKeyAction
onDelete
protected ForeignKeyAction
onUpdate
-
Fields inherited from class com.gengoai.sql.constraint.Constraint
name
-
-
Constructor Summary
Constructors Constructor Description ForeignKeyConstraint(String name, @NonNull Collection<SQLElement> columns, @NonNull SQLElement foreignTable, @NonNull Collection<SQLElement> foreignTableColumns)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description List<SQLElement>
getColumns()
List<SQLElement>
getForeignTableColumns()
ForeignKeyConstraint
initiallyDeferred()
ForeignKeyConstraint
initiallyImmediateDeferred()
ForeignKeyConstraint
notDeferred()
ForeignKeyConstraint
onDelete(ForeignKeyAction action)
ForeignKeyConstraint
onUpdate(ForeignKeyAction action)
-
Methods inherited from class com.gengoai.sql.constraint.Constraint
constraint
-
-
-
-
Field Detail
-
columns
protected final List<SQLElement> columns
-
foreignTableColumns
protected final List<SQLElement> foreignTableColumns
-
foreignTable
protected final SQLElement foreignTable
-
onUpdate
protected ForeignKeyAction onUpdate
-
onDelete
protected ForeignKeyAction onDelete
-
deferred
protected Deferrable deferred
-
-
Constructor Detail
-
ForeignKeyConstraint
public ForeignKeyConstraint(String name, @NonNull @NonNull Collection<SQLElement> columns, @NonNull @NonNull SQLElement foreignTable, @NonNull @NonNull Collection<SQLElement> foreignTableColumns)
-
-
Method Detail
-
getColumns
public List<SQLElement> getColumns()
-
getForeignTableColumns
public List<SQLElement> getForeignTableColumns()
-
initiallyDeferred
public ForeignKeyConstraint initiallyDeferred()
-
initiallyImmediateDeferred
public ForeignKeyConstraint initiallyImmediateDeferred()
-
notDeferred
public ForeignKeyConstraint notDeferred()
-
onDelete
public ForeignKeyConstraint onDelete(ForeignKeyAction action)
-
onUpdate
public ForeignKeyConstraint onUpdate(ForeignKeyAction action)
-
-