public class ForeignKeyConstraintClause extends ConstraintClause
[ CONSTRAINT <name> ] FOREIGN KEY [ (<col1> ...) ] REFERENCES <refRable> [ (<refCol1> ...) ]
.Modifier and Type | Class and Description |
---|---|
static class |
ForeignKeyConstraintClause.ReferentialAction
Enum representing the referential action to be taken on update/delete.
|
ConstraintClause.CheckTime, ConstraintClause.Type
Modifier and Type | Field and Description |
---|---|
protected Object |
_onDeleteAction |
protected Object |
_onUpdateAction |
protected SqlObjectList<SqlObject> |
_refColumns |
protected SqlObject |
_refTable |
_checkTime, _columns, _name, _type
ALL_SYMBOL, NULL_VALUE, QUESTION_MARK
Modifier | Constructor and Description |
---|---|
|
ForeignKeyConstraintClause(ForeignKeyConstraint fkConstraint) |
protected |
ForeignKeyConstraintClause(Object name,
List<?> columns,
Object refTableStr,
List<?> refColumnStrs) |
|
ForeignKeyConstraintClause(Object name,
Object refTableStr) |
Modifier and Type | Method and Description |
---|---|
ForeignKeyConstraintClause |
addColumns(Column... columns)
Adds a column to the constraint definition.
|
ForeignKeyConstraintClause |
addCustomColumns(Object... columnStrs)
Adds a custom column to the constraint definition.
|
ForeignKeyConstraintClause |
addCustomRefColumns(Object... columnStrs)
Adds a custom referenced column to the foreign key constraint definition.
|
ForeignKeyConstraintClause |
addRefColumns(Column... columns)
Adds a referenced column to the foreign key constraint definition.
|
void |
appendTo(AppendableExt app)
Appends this object to the given AppendableExt.
|
protected void |
collectSchemaObjects(ValidationContext vContext)
Used during Query.validate() calls to collect the dbschema objects
referenced in a query.
|
ForeignKeyConstraintClause |
setOnDeleteAction(Object action)
Sets the referential action to be taken on delete.
|
ForeignKeyConstraintClause |
setOnUpdateAction(Object action)
Sets the referential action to be taken on update.
|
checkCondition, checkCondition, foreignKey, foreignKey, from, notNull, notNull, postAppendTo, preAppendTo, primaryKey, primaryKey, setCheckTime, unique, unique
collectSchemaObjects, doValidate, toString
toString, toString
protected SqlObject _refTable
protected SqlObjectList<SqlObject> _refColumns
protected Object _onDeleteAction
protected Object _onUpdateAction
public ForeignKeyConstraintClause(ForeignKeyConstraint fkConstraint)
public ForeignKeyConstraintClause addColumns(Column... columns)
ConstraintClause
addColumns
in class ConstraintClause
public ForeignKeyConstraintClause addCustomColumns(Object... columnStrs)
ConstraintClause
Object
-> SqlObject
conversions handled by
Converter.CUSTOM_COLUMN_TO_OBJ
.
addCustomColumns
in class ConstraintClause
public ForeignKeyConstraintClause addRefColumns(Column... columns)
public ForeignKeyConstraintClause addCustomRefColumns(Object... columnStrs)
Object
-> SqlObject
conversions handled by
Converter.CUSTOM_COLUMN_TO_OBJ
.
public ForeignKeyConstraintClause setOnDeleteAction(Object action)
public ForeignKeyConstraintClause setOnUpdateAction(Object action)
protected void collectSchemaObjects(ValidationContext vContext)
SqlObject
collectSchemaObjects
in class ConstraintClause
vContext
- handle to the current validation contextpublic void appendTo(AppendableExt app) throws IOException
Appendee
appendTo
in interface Appendee
appendTo
in class ConstraintClause
app
- the AppendableExt to which this class should append itselfIOException
- if the append failsCopyright © 2006–2021 OpenHMS. All rights reserved.