Package org.hibernate.metamodel.mapping
Interface ForeignKeyDescriptor
-
- All Superinterfaces:
Bindable
,JavaTypedExpressible
,JdbcMappingContainer
,MappingModelExpressible
,ModelPart
,SelectableMappings
,ValuedModelPart
,ValueMapping
,VirtualModelPart
- All Known Implementing Classes:
EmbeddedForeignKeyDescriptor
,SimpleForeignKeyDescriptor
public interface ForeignKeyDescriptor extends VirtualModelPart, ValuedModelPart
Descriptor for foreign-keys
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static class
ForeignKeyDescriptor.Nature
static interface
ForeignKeyDescriptor.Side
-
Nested classes/interfaces inherited from interface org.hibernate.metamodel.mapping.Bindable
Bindable.JdbcValuesConsumer
-
Nested classes/interfaces inherited from interface org.hibernate.metamodel.mapping.ModelPart
ModelPart.IndexedJdbcValueConsumer, ModelPart.JdbcValueConsumer
-
-
Field Summary
Fields Modifier and Type Field Description static String
PART_NAME
static String
TARGET_PART_NAME
-
Method Summary
-
Methods inherited from interface org.hibernate.metamodel.mapping.Bindable
disassemble, forEachDisassembledJdbcValue, forEachDisassembledJdbcValue, forEachJdbcType, forEachJdbcValue, forEachJdbcValue
-
Methods inherited from interface org.hibernate.metamodel.mapping.JdbcMappingContainer
forEachJdbcType
-
Methods inherited from interface org.hibernate.metamodel.mapping.ModelPart
applySqlSelections, applySqlSelections, areEqual, asAttributeMapping, breakDownJdbcValues, createDomainResult, decompose, findContainingEntityMapping, getJavaType, getNavigableRole, getPartMappingType, hasPartitionedSelectionMapping
-
Methods inherited from interface org.hibernate.metamodel.mapping.ValuedModelPart
forEachInsertable, forEachSelectable, forEachUpdatable, getJdbcMappings, getJdbcTypeCount
-
Methods inherited from interface org.hibernate.metamodel.mapping.ValueMapping
getExpressibleJavaType, getMappedType, treatAs
-
Methods inherited from interface org.hibernate.metamodel.mapping.VirtualModelPart
isVirtual
-
-
-
-
Field Detail
-
PART_NAME
static final String PART_NAME
- See Also:
- Constant Field Values
-
TARGET_PART_NAME
static final String TARGET_PART_NAME
- See Also:
- Constant Field Values
-
-
Method Detail
-
getPartName
default String 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()
-
getPart
default ModelPart getPart(ForeignKeyDescriptor.Nature nature)
-
getKeySide
ForeignKeyDescriptor.Side getKeySide()
-
getTargetSide
ForeignKeyDescriptor.Side getTargetSide()
-
getSide
default ForeignKeyDescriptor.Side getSide(ForeignKeyDescriptor.Nature nature)
-
getContainingTableExpression
default String getContainingTableExpression()
Description copied from interface:ValuedModelPart
The table which contains the columns mapped by this value- Specified by:
getContainingTableExpression
in interfaceValuedModelPart
-
createKeyDomainResult
DomainResult<?> createKeyDomainResult(NavigablePath navigablePath, TableGroup tableGroup, FetchParent fetchParent, DomainResultCreationState creationState)
Create a DomainResult for the referring-side of the fk
-
createTargetDomainResult
DomainResult<?> createTargetDomainResult(NavigablePath navigablePath, TableGroup tableGroup, FetchParent fetchParent, DomainResultCreationState creationState)
Create a DomainResult for the target-side of the fk
-
createDomainResult
DomainResult<?> createDomainResult(NavigablePath navigablePath, TableGroup tableGroup, ForeignKeyDescriptor.Nature side, FetchParent fetchParent, DomainResultCreationState creationState)
-
generateJoinPredicate
Predicate generateJoinPredicate(TableGroup targetSideTableGroup, TableGroup keySideTableGroup, SqlExpressionResolver sqlExpressionResolver, SqlAstCreationContext creationContext)
-
generateJoinPredicate
Predicate generateJoinPredicate(TableReference targetSideReference, TableReference keySideReference, SqlExpressionResolver sqlExpressionResolver, SqlAstCreationContext creationContext)
-
isSimpleJoinPredicate
boolean isSimpleJoinPredicate(Predicate predicate)
-
getSelectable
SelectableMapping getSelectable(int columnIndex)
Description copied from interface:SelectableMappings
Get the selectable at the given position- Specified by:
getSelectable
in interfaceSelectableMappings
-
forEachSelectable
default int forEachSelectable(int offset, SelectableConsumer consumer)
Visits the FK "referring" columns- Specified by:
forEachSelectable
in interfaceModelPart
- Specified by:
forEachSelectable
in interfaceSelectableMappings
- Specified by:
forEachSelectable
in interfaceValuedModelPart
- See Also:
SelectableConsumer.accept(int, SelectableMapping)
-
getAssociationKeyFromSide
default Object getAssociationKeyFromSide(Object targetObject, ForeignKeyDescriptor.Nature nature, SharedSessionContractImplementor session)
-
getAssociationKeyFromSide
Object getAssociationKeyFromSide(Object targetObject, ForeignKeyDescriptor.Side side, SharedSessionContractImplementor session)
-
visitKeySelectables
int visitKeySelectables(int offset, SelectableConsumer consumer)
-
visitKeySelectables
default int visitKeySelectables(SelectableConsumer consumer)
-
visitTargetSelectables
int visitTargetSelectables(int offset, SelectableConsumer consumer)
-
visitTargetSelectables
default int visitTargetSelectables(SelectableConsumer consumer)
-
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.
-
getAssociationKey
AssociationKey getAssociationKey()
-
hasConstraint
boolean hasConstraint()
-
-