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
All Methods Instance Methods Abstract Methods Modifier and Type Method Description boolean
createForeignKeyConstraint()
Primarily exists to support JPA's@ForeignKey(NO_CONSTRAINT)
.String
getExplicitForeignKeyName()
Retrieve the name of the foreign key as supplied by the user, ornull
if the user supplied none.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?
-
-
-
Method Detail
-
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.
-
-