Class EmbeddedForeignKeyDescriptor
java.lang.Object
org.hibernate.metamodel.mapping.internal.EmbeddedForeignKeyDescriptor
- All Implemented Interfaces:
Bindable,ForeignKeyDescriptor,JdbcMappingContainer,MappingModelExpressible,ModelPart,SelectableMappings,ValuedModelPart,ValueMapping,VirtualModelPart,JavaTypedExpressible
-
Nested Class Summary
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.ForeignKeyDescriptor
ForeignKeyDescriptor.Nature, ForeignKeyDescriptor.SideNested classes/interfaces inherited from interface org.hibernate.metamodel.mapping.ModelPart
ModelPart.JdbcValueBiConsumer<X,Y>, ModelPart.JdbcValueConsumer -
Field Summary
Fields inherited from interface org.hibernate.metamodel.mapping.ForeignKeyDescriptor
PART_NAME, TARGET_PART_NAME -
Constructor Summary
ConstructorsConstructorDescriptionEmbeddedForeignKeyDescriptor(String keyTable, SelectableMappings keySelectableMappings, EmbeddableValuedModelPart keyMappingType, String targetTable, SelectableMappings targetSelectableMappings, EmbeddableValuedModelPart targetMappingType, boolean hasConstraint, MappingModelCreationProcess creationProcess) EmbeddedForeignKeyDescriptor(EmbeddableValuedModelPart keyMappingType, EmbeddableValuedModelPart targetMappingType, String keyTable, SelectableMappings keySelectableMappings, String targetTable, SelectableMappings targetSelectableMappings, boolean hasConstraint, MappingModelCreationProcess creationProcess) -
Method Summary
Modifier and TypeMethodDescriptionvoidaddToCacheKey(MutableCacheKeyBuilder cacheKey, Object value, SharedSessionContractImplementor session) Add to the MutableCacheKey the values obtained disassembling the value and the hasCode generated from the disassembled value.voidapplySqlSelections(NavigablePath navigablePath, TableGroup tableGroup, DomainResultCreationState creationState) Apply SQL selections for a specific reference to this ModelPart outside the domain query's root select clause.voidapplySqlSelections(NavigablePath navigablePath, TableGroup tableGroup, DomainResultCreationState creationState, BiConsumer<SqlSelection, JdbcMapping> selectionConsumer) Apply SQL selections for a specific reference to this ModelPart outside the domain query's root select clause.<X,Y> int breakDownJdbcValues(Object domainValue, int offset, X x, Y y, ModelPart.JdbcValueBiConsumer<X, Y> valueConsumer, SharedSessionContractImplementor session) Breaks down the domain value to its constituent JDBC values.intCompare 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 targetdisassemble(Object value, SharedSessionContractImplementor session) Breaks down a value ofJinto its simple pieces.<X,Y> int forEachDisassembledJdbcValue(Object value, int offset, X x, Y y, Bindable.JdbcValuesBiConsumer<X, Y> valuesConsumer, SharedSessionContractImplementor session) LikeBindable.forEachDisassembledJdbcValue(Object, Object, Object, JdbcValuesBiConsumer, SharedSessionContractImplementor), but additionally receives an offset by which the selectionIndex is incremented when callingBindable.JdbcValuesBiConsumer.consume(int, Object, Object, Object, JdbcMapping).intforEachJdbcType(int offset, IndexedConsumer<JdbcMapping> action) Visit each JdbcMapping starting from the given offsetgenerateJoinPredicate(TableGroup targetSideTableGroup, TableGroup keySideTableGroup, SqlAstCreationState creationState) generateJoinPredicate(TableReference targetSideReference, TableReference keySideReference, SqlAstCreationState creationState) getAssociationKeyFromSide(Object targetObject, ForeignKeyDescriptor.Side side, SharedSessionContractImplementor session) JavaType<?>The Java type for this part.getJdbcMapping(int index) Descriptor for the type of this mappingThe type for this part.getSelectable(int columnIndex) Get the selectable at the given positionbooleanbooleanbooleanbooleanisKeyPart(ValuedModelPart modelPart) booleanisSimpleJoinPredicate(Predicate predicate) intvisitKeySelectables(int offset, SelectableConsumer consumer) intvisitTargetSelectables(int offset, 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 class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.hibernate.metamodel.mapping.Bindable
forEachDisassembledJdbcValue, forEachDisassembledJdbcValue, forEachDisassembledJdbcValue, forEachJdbcType, forEachJdbcValue, forEachJdbcValue, forEachJdbcValue, forEachJdbcValueMethods inherited from interface org.hibernate.metamodel.mapping.ForeignKeyDescriptor
forEachSelectable, getAssociationKeyFromSide, getContainingTableExpression, getPart, getPartName, getSide, visitKeySelectables, visitTargetSelectablesMethods inherited from interface org.hibernate.metamodel.mapping.ModelPart
areEqual, asAttributeMapping, asBasicValuedModelPart, asEntityMappingType, breakDownJdbcValues, decompose, decompose, isEntityIdentifierMappingMethods inherited from interface org.hibernate.metamodel.mapping.ValuedModelPart
forEachInsertable, forEachNonFormula, forEachSelectable, forEachUpdatable, getJdbcTypeCount, getSingleJdbcMappingMethods inherited from interface org.hibernate.metamodel.mapping.ValueMapping
getExpressibleJavaType, treatAsMethods inherited from interface org.hibernate.metamodel.mapping.VirtualModelPart
isVirtual
-
Constructor Details
-
EmbeddedForeignKeyDescriptor
public EmbeddedForeignKeyDescriptor(String keyTable, SelectableMappings keySelectableMappings, EmbeddableValuedModelPart keyMappingType, String targetTable, SelectableMappings targetSelectableMappings, EmbeddableValuedModelPart targetMappingType, boolean hasConstraint, MappingModelCreationProcess creationProcess) -
EmbeddedForeignKeyDescriptor
public EmbeddedForeignKeyDescriptor(EmbeddableValuedModelPart keyMappingType, EmbeddableValuedModelPart targetMappingType, String keyTable, SelectableMappings keySelectableMappings, String targetTable, SelectableMappings targetSelectableMappings, boolean hasConstraint, MappingModelCreationProcess creationProcess)
-
-
Method Details
-
getKeyTable
- Specified by:
getKeyTablein interfaceForeignKeyDescriptor
-
getTargetTable
- Specified by:
getTargetTablein interfaceForeignKeyDescriptor
-
getKeyPart
- Specified by:
getKeyPartin interfaceForeignKeyDescriptor
-
getTargetPart
- Specified by:
getTargetPartin interfaceForeignKeyDescriptor
-
isKeyPart
- Specified by:
isKeyPartin interfaceForeignKeyDescriptor
-
getKeySide
- Specified by:
getKeySidein interfaceForeignKeyDescriptor
-
getTargetSide
- Specified by:
getTargetSidein interfaceForeignKeyDescriptor
-
compare
Description copied from interface:ForeignKeyDescriptorCompare the 2 values- Specified by:
comparein interfaceForeignKeyDescriptor
-
withKeySelectionMapping
public ForeignKeyDescriptor withKeySelectionMapping(ManagedMappingType declaringType, TableGroupProducer declaringTableGroupProducer, IntFunction<SelectableMapping> selectableMappingAccess, MappingModelCreationProcess creationProcess) Description copied from interface:ForeignKeyDescriptorReturn a copy of this foreign key descriptor with the selectable mappings as provided by the given accessor.- Specified by:
withKeySelectionMappingin interfaceForeignKeyDescriptor
-
withTargetPart
Description copied from interface:ForeignKeyDescriptorReturn a copy of this foreign key descriptor with the target part as given by the argument.- Specified by:
withTargetPartin interfaceForeignKeyDescriptor
-
generateJoinPredicate
public Predicate generateJoinPredicate(TableGroup targetSideTableGroup, TableGroup keySideTableGroup, SqlAstCreationState creationState) - Specified by:
generateJoinPredicatein interfaceForeignKeyDescriptor
-
generateJoinPredicate
public Predicate generateJoinPredicate(TableReference targetSideReference, TableReference keySideReference, SqlAstCreationState creationState) - Specified by:
generateJoinPredicatein interfaceForeignKeyDescriptor
-
isSimpleJoinPredicate
- Specified by:
isSimpleJoinPredicatein interfaceForeignKeyDescriptor
-
getSelectable
Description copied from interface:SelectableMappingsGet the selectable at the given position- Specified by:
getSelectablein interfaceForeignKeyDescriptor- Specified by:
getSelectablein interfaceSelectableMappings
-
visitKeySelectables
- Specified by:
visitKeySelectablesin interfaceForeignKeyDescriptor
-
visitTargetSelectables
- Specified by:
visitTargetSelectablesin interfaceForeignKeyDescriptor
-
hasConstraint
public boolean hasConstraint()- Specified by:
hasConstraintin interfaceForeignKeyDescriptor
-
getAssociationKey
- Specified by:
getAssociationKeyin interfaceForeignKeyDescriptor
-
getMappedType
Description copied from interface:ValueMappingDescriptor for the type of this mapping- Specified by:
getMappedTypein interfaceValueMapping
-
getPartMappingType
Description copied from interface:ModelPartThe type for this part.- Specified by:
getPartMappingTypein interfaceModelPart
-
getJavaType
Description copied from interface:ModelPartThe Java type for this part. Generally equivalent toMappingType.getMappedJavaType()relative toModelPart.getPartMappingType()- Specified by:
getJavaTypein interfaceModelPart
-
findContainingEntityMapping
- Specified by:
findContainingEntityMappingin interfaceModelPart
-
getJdbcMapping
- Specified by:
getJdbcMappingin interfaceJdbcMappingContainer
-
forEachJdbcType
Description copied from interface:JdbcMappingContainerVisit each JdbcMapping starting from the given offset- Specified by:
forEachJdbcTypein interfaceJdbcMappingContainer
-
hasPartitionedSelectionMapping
public boolean hasPartitionedSelectionMapping()- Specified by:
hasPartitionedSelectionMappingin interfaceModelPart
-
isEmbedded
public boolean isEmbedded()- Specified by:
isEmbeddedin interfaceForeignKeyDescriptor
-