Package org.hibernate.metamodel.mapping
Interface ForeignKeyDescriptor
- All Superinterfaces:
Bindable
,JavaTypedExpressible
,JdbcMappingContainer
,MappingModelExpressible
,ModelPart
,SelectableMappings
,ValuedModelPart
,ValueMapping
,VirtualModelPart
- All Known Implementing Classes:
EmbeddedForeignKeyDescriptor
,SimpleForeignKeyDescriptor
Descriptor for foreign-keys
-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic enum
static interface
Nested classes/interfaces inherited from interface org.hibernate.metamodel.mapping.Bindable
Bindable.JdbcValuesBiConsumer<X,
Y>, Bindable.JdbcValuesConsumer Nested classes/interfaces inherited from interface org.hibernate.metamodel.mapping.ModelPart
ModelPart.JdbcValueBiConsumer<X,
Y>, ModelPart.JdbcValueConsumer -
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptionint
Compare the 2 values<T> DomainResult<T>
createDomainResult
(NavigablePath navigablePath, TableGroup targetTableGroup, String resultVariable, DomainResultCreationState creationState) Create a DomainResult for the referring-side of the fk The table group must be the one containing the target.DomainResult<?>
createKeyDomainResult
(NavigablePath navigablePath, TableGroup targetTableGroup, ForeignKeyDescriptor.Nature fromSide, FetchParent fetchParent, DomainResultCreationState creationState) Create a DomainResult for the referring-side of the fk The table group must be the one containing the target.DomainResult<?>
createKeyDomainResult
(NavigablePath navigablePath, TableGroup targetTableGroup, FetchParent fetchParent, DomainResultCreationState creationState) Create a DomainResult for the referring-side of the fk The table group must be the one containing the target.DomainResult<?>
createTargetDomainResult
(NavigablePath navigablePath, TableGroup targetTableGroup, FetchParent fetchParent, DomainResultCreationState creationState) Create a DomainResult for the target-side of the fk The table group must be the one containing the targetdefault int
forEachSelectable
(int offset, SelectableConsumer consumer) Visits the FK "referring" columnsgenerateJoinPredicate
(TableGroup targetSideTableGroup, TableGroup keySideTableGroup, SqlAstCreationState creationState) generateJoinPredicate
(TableReference targetSideReference, TableReference keySideReference, SqlAstCreationState creationState) default Object
getAssociationKeyFromSide
(Object targetObject, ForeignKeyDescriptor.Nature nature, SharedSessionContractImplementor session) getAssociationKeyFromSide
(Object targetObject, ForeignKeyDescriptor.Side side, SharedSessionContractImplementor session) default String
The table which contains the columns mapped by this valuedefault ValuedModelPart
getPart
(ForeignKeyDescriptor.Nature nature) default String
The local part name, which is generally the unqualified role namegetSelectable
(int columnIndex) Get the selectable at the given positiondefault ForeignKeyDescriptor.Side
getSide
(ForeignKeyDescriptor.Nature nature) boolean
boolean
boolean
isKeyPart
(ValuedModelPart modelPart) boolean
isSimpleJoinPredicate
(Predicate predicate) int
visitKeySelectables
(int offset, SelectableConsumer consumer) default int
visitKeySelectables
(SelectableConsumer consumer) int
visitTargetSelectables
(int offset, SelectableConsumer consumer) default int
visitTargetSelectables
(SelectableConsumer consumer) withKeySelectionMapping
(ManagedMappingType declaringType, TableGroupProducer declaringTableGroupProducer, IntFunction<SelectableMapping> selectableMappingAccess, MappingModelCreationProcess creationProcess) Return a copy of this foreign key descriptor with the selectable mappings as provided by the given accessor.withTargetPart
(ValuedModelPart targetPart) Return a copy of this foreign key descriptor with the target part as given by the argument.Methods inherited from interface org.hibernate.metamodel.mapping.Bindable
addToCacheKey, disassemble, forEachDisassembledJdbcValue, forEachDisassembledJdbcValue, forEachDisassembledJdbcValue, forEachDisassembledJdbcValue, forEachJdbcType, forEachJdbcValue, forEachJdbcValue, forEachJdbcValue, forEachJdbcValue
Methods inherited from interface org.hibernate.type.descriptor.java.JavaTypedExpressible
addToCacheKey
Methods inherited from interface org.hibernate.metamodel.mapping.JdbcMappingContainer
forEachJdbcType, getJdbcMapping
Methods inherited from interface org.hibernate.metamodel.mapping.ModelPart
applySqlSelections, applySqlSelections, areEqual, asAttributeMapping, asBasicValuedModelPart, asEntityMappingType, breakDownJdbcValues, breakDownJdbcValues, decompose, decompose, findContainingEntityMapping, getJavaType, getNavigableRole, getPartMappingType, hasPartitionedSelectionMapping, isEntityIdentifierMapping
Methods inherited from interface org.hibernate.metamodel.mapping.ValuedModelPart
forEachInsertable, forEachNonFormula, forEachSelectable, forEachUpdatable, getJdbcTypeCount, getSingleJdbcMapping
Methods inherited from interface org.hibernate.metamodel.mapping.ValueMapping
getExpressibleJavaType, getMappedType, treatAs
Methods inherited from interface org.hibernate.metamodel.mapping.VirtualModelPart
isVirtual
-
Field Details
-
PART_NAME
- See Also:
-
TARGET_PART_NAME
- See Also:
-
-
Method Details
-
getPartName
Description copied from interface:ModelPart
The local part name, which is generally the unqualified role name- Specified by:
getPartName
in interfaceModelPart
-
getKeyTable
String getKeyTable() -
getTargetTable
String getTargetTable() -
getKeyPart
ValuedModelPart getKeyPart() -
getTargetPart
ValuedModelPart getTargetPart() -
isKeyPart
-
getPart
-
getKeySide
ForeignKeyDescriptor.Side getKeySide() -
getTargetSide
ForeignKeyDescriptor.Side getTargetSide() -
getSide
-
getContainingTableExpression
Description copied from interface:ValuedModelPart
The table which contains the columns mapped by this value- Specified by:
getContainingTableExpression
in interfaceValuedModelPart
-
compare
Compare the 2 values -
generateJoinPredicate
Predicate generateJoinPredicate(TableGroup targetSideTableGroup, TableGroup keySideTableGroup, SqlAstCreationState creationState) -
generateJoinPredicate
Predicate generateJoinPredicate(TableReference targetSideReference, TableReference keySideReference, SqlAstCreationState creationState) -
isSimpleJoinPredicate
-
getSelectable
Description copied from interface:SelectableMappings
Get the selectable at the given position- Specified by:
getSelectable
in interfaceSelectableMappings
-
forEachSelectable
Visits the FK "referring" columns- Specified by:
forEachSelectable
in interfaceModelPart
- Specified by:
forEachSelectable
in interfaceSelectableMappings
- Specified by:
forEachSelectable
in interfaceValuedModelPart
- See Also:
-
visitKeySelectables
-
visitKeySelectables
-
visitTargetSelectables
-
visitTargetSelectables
-
withKeySelectionMapping
ForeignKeyDescriptor withKeySelectionMapping(ManagedMappingType declaringType, TableGroupProducer declaringTableGroupProducer, IntFunction<SelectableMapping> selectableMappingAccess, MappingModelCreationProcess creationProcess) Return a copy of this foreign key descriptor with the selectable mappings as provided by the given accessor. -
withTargetPart
Return a copy of this foreign key descriptor with the target part as given by the argument. -
getAssociationKey
AssociationKey getAssociationKey() -
hasConstraint
boolean hasConstraint() -
isEmbedded
boolean isEmbedded()
-