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
Nested ClassesModifier and TypeInterfaceDescriptionstatic enumstatic interfaceNested 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
Fields -
Method Summary
Modifier and TypeMethodDescriptionintCompare 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 intforEachSelectable(int offset, SelectableConsumer consumer) Visits the FK "referring" columnsgenerateJoinPredicate(TableGroup targetSideTableGroup, TableGroup keySideTableGroup, SqlAstCreationState creationState) generateJoinPredicate(TableReference targetSideReference, TableReference keySideReference, SqlAstCreationState creationState) default ObjectgetAssociationKeyFromSide(Object targetObject, ForeignKeyDescriptor.Nature nature, SharedSessionContractImplementor session) getAssociationKeyFromSide(Object targetObject, ForeignKeyDescriptor.Side side, SharedSessionContractImplementor session) default StringThe table which contains the columns mapped by this valuedefault ValuedModelPartgetPart(ForeignKeyDescriptor.Nature nature) default StringThe local part name, which is generally the unqualified role namegetSelectable(int columnIndex) Get the selectable at the given positiondefault ForeignKeyDescriptor.SidegetSide(ForeignKeyDescriptor.Nature nature) booleanbooleanbooleanisKeyPart(ValuedModelPart modelPart) booleanisSimpleJoinPredicate(Predicate predicate) intvisitKeySelectables(int offset, SelectableConsumer consumer) default intvisitKeySelectables(SelectableConsumer consumer) intvisitTargetSelectables(int offset, SelectableConsumer consumer) default intvisitTargetSelectables(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, forEachJdbcValueMethods inherited from interface org.hibernate.type.descriptor.java.JavaTypedExpressible
addToCacheKeyMethods inherited from interface org.hibernate.metamodel.mapping.JdbcMappingContainer
forEachJdbcType, getJdbcMappingMethods inherited from interface org.hibernate.metamodel.mapping.ModelPart
applySqlSelections, applySqlSelections, areEqual, asAttributeMapping, asBasicValuedModelPart, asEntityMappingType, breakDownJdbcValues, breakDownJdbcValues, decompose, decompose, findContainingEntityMapping, getJavaType, getNavigableRole, getPartMappingType, hasPartitionedSelectionMapping, isEntityIdentifierMappingMethods inherited from interface org.hibernate.metamodel.mapping.ValuedModelPart
forEachInsertable, forEachNonFormula, forEachSelectable, forEachUpdatable, getJdbcTypeCount, getSingleJdbcMappingMethods inherited from interface org.hibernate.metamodel.mapping.ValueMapping
getExpressibleJavaType, getMappedType, treatAsMethods 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:ModelPartThe local part name, which is generally the unqualified role name- Specified by:
getPartNamein 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:ValuedModelPartThe table which contains the columns mapped by this value- Specified by:
getContainingTableExpressionin 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:SelectableMappingsGet the selectable at the given position- Specified by:
getSelectablein interfaceSelectableMappings
-
forEachSelectable
Visits the FK "referring" columns- Specified by:
forEachSelectablein interfaceModelPart- Specified by:
forEachSelectablein interfaceSelectableMappings- Specified by:
forEachSelectablein 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()
-