Class AnonymousTupleBasicValuedModelPart
java.lang.Object
org.hibernate.query.sqm.tuple.internal.AnonymousTupleBasicValuedModelPart
- All Implemented Interfaces:
BasicValuedMapping,BasicValuedModelPart,Bindable,JdbcMappingContainer,MappingModelExpressible,MappingType,ModelPart,OwnedValuedModelPart,SelectableMapping,SelectableMappings,SqlExpressible,SqlTypedMapping,ValuedModelPart,ValueMapping,Fetchable,JavaTypedExpressible
- Direct Known Subclasses:
AnonymousTupleBasicEntityIdentifierMapping
@Incubating
public class AnonymousTupleBasicValuedModelPart
extends Object
implements OwnedValuedModelPart, MappingType, BasicValuedModelPart
-
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.ModelPart
ModelPart.JdbcValueBiConsumer<X,Y>, ModelPart.JdbcValueConsumer -
Constructor Summary
ConstructorsConstructorDescriptionAnonymousTupleBasicValuedModelPart(MappingType declaringType, String partName, String selectionExpression, SqmExpressible<?> expressible, JdbcMapping jdbcMapping, int fetchableIndex) AnonymousTupleBasicValuedModelPart(MappingType declaringType, String partName, SelectableMapping selectableMapping, SqmExpressible<?> expressible, int fetchableIndex) -
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.<T> DomainResult<T> createDomainResult(NavigablePath navigablePath, TableGroup tableGroup, String resultVariable, DomainResultCreationState creationState) Create a DomainResult for a specific reference to this ModelPart.disassemble(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 offsetintforEachJdbcType(IndexedConsumer<JdbcMapping> action) Visit each of JdbcMapping<X,Y> int forEachJdbcValue(Object value, int offset, X x, Y y, Bindable.JdbcValuesBiConsumer<X, Y> valuesConsumer, SharedSessionContractImplementor session) Visit each constituent JDBC value extracted from the entity instance itself.intforEachSelectable(int offset, SelectableConsumer consumer) Visits each selectable mapping with the selectable index offset by the given value.BasicFetch<?> generateFetch(FetchParent fetchParent, NavigablePath fetchablePath, FetchTiming fetchTiming, boolean selected, String resultVariable, DomainResultCreationState creationState) Generates a Fetch of this fetchableThe table which contains the columns mapped by this valueThe selection's read expression accounting for formula treatment as well asColumnTransformer.read()The selection's write expression accountingColumnTransformer.write()intThe key that identifies this Fetchable within aFetchableContainer.The name of the fetchable.JavaType<?> The Java type for this part.Anything that is expressible at the SQL AST level would be of basic type.The configured fetch timing and styleJavaType<?> The descriptor descriptor for the mapped Java typeDescriptor for the type of this mappingThe type for this part.The local part name, which is generally the unqualified role namegetScale()The selection's expression.booleanbooleanIs the mapping a formula instead of a physical column?booleanbooleanIs the mapping considered nullable?booleanbooleanMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.hibernate.metamodel.mapping.BasicValuedModelPart
asBasicValuedModelPart, forEachSelectable, getJdbcMapping, getJdbcTypeCount, getSelectable, getSingleJdbcMappingMethods inherited from interface org.hibernate.metamodel.mapping.Bindable
forEachDisassembledJdbcValue, forEachDisassembledJdbcValue, forEachDisassembledJdbcValue, forEachJdbcValue, forEachJdbcValue, forEachJdbcValueMethods inherited from interface org.hibernate.sql.results.graph.Fetchable
asAttributeMapping, incrementFetchDepth, isSelectable, resolveCircularFetchMethods inherited from interface org.hibernate.metamodel.mapping.ModelPart
areEqual, asEntityMappingType, breakDownJdbcValues, decompose, decompose, isEntityIdentifierMapping, isVirtualMethods inherited from interface org.hibernate.metamodel.mapping.SqlTypedMapping
isLob, toSizeMethods inherited from interface org.hibernate.metamodel.mapping.ValuedModelPart
forEachInsertable, forEachNonFormula, forEachUpdatable, getJdbcTypeCount, getSingleJdbcMappingMethods inherited from interface org.hibernate.metamodel.mapping.ValueMapping
getExpressibleJavaType, treatAs
-
Constructor Details
-
AnonymousTupleBasicValuedModelPart
public AnonymousTupleBasicValuedModelPart(MappingType declaringType, String partName, String selectionExpression, SqmExpressible<?> expressible, JdbcMapping jdbcMapping, int fetchableIndex) -
AnonymousTupleBasicValuedModelPart
public AnonymousTupleBasicValuedModelPart(MappingType declaringType, String partName, SelectableMapping selectableMapping, SqmExpressible<?> expressible, int fetchableIndex)
-
-
Method Details
-
getPartMappingType
Description copied from interface:ModelPartThe type for this part.- Specified by:
getPartMappingTypein interfaceBasicValuedModelPart- 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
-
getMappedJavaType
Description copied from interface:MappingTypeThe descriptor descriptor for the mapped Java type- Specified by:
getMappedJavaTypein interfaceMappingType
-
getDeclaringType
- Specified by:
getDeclaringTypein interfaceOwnedValuedModelPart
-
getPartName
Description copied from interface:ModelPartThe local part name, which is generally the unqualified role name- Specified by:
getPartNamein interfaceModelPart
-
findContainingEntityMapping
- Specified by:
findContainingEntityMappingin interfaceModelPart
-
getSelectableName
- Specified by:
getSelectableNamein interfaceSelectableMapping
-
getSelectablePath
- Specified by:
getSelectablePathin interfaceSelectableMapping
-
getWriteExpression
- Specified by:
getWriteExpressionin interfaceSelectableMapping
-
getJdbcMapping
Description copied from interface:SqlExpressibleAnything that is expressible at the SQL AST level would be of basic type.- Specified by:
getJdbcMappingin interfaceBasicValuedMapping- Specified by:
getJdbcMappingin interfaceSqlExpressible- Specified by:
getJdbcMappingin interfaceSqlTypedMapping
-
getContainingTableExpression
Description copied from interface:ValuedModelPartThe table which contains the columns mapped by this value- Specified by:
getContainingTableExpressionin interfaceSelectableMapping- Specified by:
getContainingTableExpressionin interfaceValuedModelPart
-
getSelectionExpression
Description copied from interface:SelectableMappingThe selection's expression. This is the column name or formula- Specified by:
getSelectionExpressionin interfaceSelectableMapping
-
getCustomReadExpression
Description copied from interface:SelectableMappingThe selection's read expression accounting for formula treatment as well asColumnTransformer.read()- Specified by:
getCustomReadExpressionin interfaceSelectableMapping
-
getCustomWriteExpression
Description copied from interface:SelectableMappingThe selection's write expression accountingColumnTransformer.write()- Specified by:
getCustomWriteExpressionin interfaceSelectableMapping
-
isFormula
public boolean isFormula()Description copied from interface:SelectableMappingIs the mapping a formula instead of a physical column?- Specified by:
isFormulain interfaceSelectableMapping
-
isNullable
public boolean isNullable()Description copied from interface:SelectableMappingIs the mapping considered nullable?- Specified by:
isNullablein interfaceSelectableMapping
-
isInsertable
public boolean isInsertable()- Specified by:
isInsertablein interfaceSelectableMapping
-
isUpdateable
public boolean isUpdateable()- Specified by:
isUpdateablein interfaceSelectableMapping
-
isPartitioned
public boolean isPartitioned()- Specified by:
isPartitionedin interfaceSelectableMapping
-
hasPartitionedSelectionMapping
public boolean hasPartitionedSelectionMapping()- Specified by:
hasPartitionedSelectionMappingin interfaceBasicValuedModelPart- Specified by:
hasPartitionedSelectionMappingin interfaceModelPart
-
getColumnDefinition
- Specified by:
getColumnDefinitionin interfaceSqlTypedMapping
-
getLength
- Specified by:
getLengthin interfaceSqlTypedMapping
-
getPrecision
- Specified by:
getPrecisionin interfaceSqlTypedMapping
-
getScale
- Specified by:
getScalein interfaceSqlTypedMapping
-
getTemporalPrecision
- Specified by:
getTemporalPrecisionin interfaceSqlTypedMapping
-
getMappedType
Description copied from interface:ValueMappingDescriptor for the type of this mapping- Specified by:
getMappedTypein interfaceValueMapping
-
getFetchableName
Description copied from interface:FetchableThe name of the fetchable. This is the part's "local name".- Specified by:
getFetchableNamein interfaceFetchable- See Also:
-
getFetchableKey
public int getFetchableKey()Description copied from interface:FetchableThe key that identifies this Fetchable within aFetchableContainer. If this Fetchable is part ofFetchableContainer.visitFetchables(IndexedConsumer, EntityMappingType), the values is guaranteed to be between 0 (inclusive) andFetchableContainer.getNumberOfFetchableKeys()(exclusive). Other Fetchable objects may have a special negative value.The main intent of this key is to index e.g.
Fetchobjects in an array.- Specified by:
getFetchableKeyin interfaceFetchable
-
getMappedFetchOptions
Description copied from interface:FetchableThe configured fetch timing and style- Specified by:
getMappedFetchOptionsin interfaceFetchable
-
forEachJdbcType
Description copied from interface:JdbcMappingContainerVisit each JdbcMapping starting from the given offset- Specified by:
forEachJdbcTypein interfaceJdbcMappingContainer
-
forEachSelectable
Description copied from interface:ModelPartVisits each selectable mapping with the selectable index offset by the given value. Returns the amount of jdbc types that have been visited.- Specified by:
forEachSelectablein interfaceBasicValuedModelPart- Specified by:
forEachSelectablein interfaceModelPart- Specified by:
forEachSelectablein interfaceSelectableMappings- Specified by:
forEachSelectablein interfaceValuedModelPart- See Also:
-
forEachJdbcType
Description copied from interface:BindableVisit each of JdbcMapping- Specified by:
forEachJdbcTypein interfaceBindable- Specified by:
forEachJdbcTypein interfaceJdbcMappingContainer
-