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 TypeMethodDescriptionboolean
Primarily exists to support JPA's@ForeignKey(NO_CONSTRAINT)
.Retrieve the name of the foreign key as supplied by the user, ornull
if the user supplied none.boolean
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?
-
Method Details
-
getExplicitForeignKeyName
String getExplicitForeignKeyName()Retrieve the name of the foreign key as supplied by the user, ornull
if the user supplied none.- Returns:
- The user supplied foreign key name.
-
createForeignKeyConstraint
boolean createForeignKeyConstraint()Primarily exists to support JPA's@ForeignKey(NO_CONSTRAINT)
.- Returns:
true
if the FK constraint should be created,false
if 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.
-