Interface ForeignKeyContributingSource
- All Known Subinterfaces:
JoinedSubclassEntitySource,PluralAttributeElementSourceManyToMany,PluralAttributeKeySource,SecondaryTableSource,SingularAttributeSourceManyToOne,SingularAttributeSourceOneToOne,SingularAttributeSourceToOne
- All Known Implementing Classes:
AbstractToOneAttributeSourceImpl,CompositeIdentifierSingularAttributeSourceManyToOneImpl,JoinedSubclassEntitySourceImpl,PluralAttributeElementSourceManyToManyImpl,PluralAttributeKeySourceImpl
public interface ForeignKeyContributingSource
Additional contract for things which describe foreign keys.
-
Method Summary
Modifier and TypeMethodDescriptionbooleanPrimarily exists to support JPA's@ForeignKey(NO_CONSTRAINT).Retrieve the name of the foreign key as supplied by the user, ornullif the user supplied none.booleanIs "cascade delete" enabled for the foreign key? In other words, if a record in the parent (referenced) table is deleted, should the corresponding records in the child table automatically be deleted?
-
Method Details
-
getExplicitForeignKeyName
String getExplicitForeignKeyName()Retrieve the name of the foreign key as supplied by the user, ornullif the user supplied none.- Returns:
- The user supplied foreign key name.
-
createForeignKeyConstraint
boolean createForeignKeyConstraint()Primarily exists to support JPA's@ForeignKey(NO_CONSTRAINT).- Returns:
trueif the FK constraint should be created,falseif not.
-
isCascadeDeleteEnabled
boolean isCascadeDeleteEnabled()Is "cascade delete" enabled for the foreign key? In other words, if a record in the parent (referenced) table is deleted, should the corresponding records in the child table automatically be deleted?- Returns:
true, if the cascade delete is enabled;false, otherwise.
-