Package org.hibernate.query.derived
Class AnonymousTupleBasicValuedModelPart
- java.lang.Object
-
- org.hibernate.query.derived.AnonymousTupleBasicValuedModelPart
-
- All Implemented Interfaces:
BasicValuedMapping
,BasicValuedModelPart
,Bindable
,JdbcMappingContainer
,MappingModelExpressible
,MappingType
,ModelPart
,SelectableMapping
,SqlExpressible
,SqlTypedMapping
,ValueMapping
,Fetchable
,JavaTypedExpressible
- Direct Known Subclasses:
AnonymousTupleBasicEntityIdentifierMapping
public class AnonymousTupleBasicValuedModelPart extends Object implements ModelPart, MappingType, BasicValuedModelPart
-
-
Nested Class Summary
-
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.JdbcValueConsumer
-
-
Constructor Summary
Constructors Constructor Description AnonymousTupleBasicValuedModelPart(String partName, String selectionExpression, SqmExpressible<?> expressible, JdbcMapping jdbcMapping)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
applySqlSelections(NavigablePath navigablePath, TableGroup tableGroup, DomainResultCreationState creationState)
Apply SQL selections for a specific reference to this ModelPart outside the domain query's root select clause.void
applySqlSelections(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.void
breakDownJdbcValues(Object domainValue, ModelPart.JdbcValueConsumer valueConsumer, SharedSessionContractImplementor session)
<T> DomainResult<T>
createDomainResult(NavigablePath navigablePath, TableGroup tableGroup, String resultVariable, DomainResultCreationState creationState)
Create a DomainResult for a specific reference to this ModelPart.Object
disassemble(Object value, SharedSessionContractImplementor session)
EntityMappingType
findContainingEntityMapping()
int
forEachDisassembledJdbcValue(Object value, Clause clause, int offset, Bindable.JdbcValuesConsumer valuesConsumer, SharedSessionContractImplementor session)
int
forEachJdbcType(int offset, IndexedConsumer<JdbcMapping> action)
Visit each JdbcMapping starting from the given offsetint
forEachJdbcType(IndexedConsumer<JdbcMapping> action)
Visit each of JdbcMappingint
forEachJdbcValue(Object value, Clause clause, int offset, Bindable.JdbcValuesConsumer valuesConsumer, SharedSessionContractImplementor session)
int
forEachSelectable(int offset, SelectableConsumer consumer)
BasicFetch
generateFetch(FetchParent fetchParent, NavigablePath fetchablePath, FetchTiming fetchTiming, boolean selected, String resultVariable, DomainResultCreationState creationState)
Generates a Fetch of this fetchableString
getColumnDefinition()
String
getContainingTableExpression()
String
getCustomReadExpression()
String
getCustomWriteExpression()
String
getFetchableName()
The name of the fetchableJavaType<?>
getJavaType()
JdbcMapping
getJdbcMapping()
Anything that is expressible at the SQL AST level would be of basic type.Long
getLength()
FetchOptions
getMappedFetchOptions()
The configured fetch timing and styleJavaType<?>
getMappedJavaType()
MappingType
getMappedType()
Descriptor for the type of this mappingNavigableRole
getNavigableRole()
MappingType
getPartMappingType()
String
getPartName()
Integer
getPrecision()
Integer
getScale()
String
getSelectionExpression()
boolean
isFormula()
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.hibernate.metamodel.mapping.BasicValuedMapping
getJdbcMappings, getJdbcTypeCount
-
Methods inherited from interface org.hibernate.metamodel.mapping.Bindable
forEachDisassembledJdbcValue, forEachJdbcValue
-
Methods inherited from interface org.hibernate.sql.results.graph.Fetchable
asAttributeMapping, incrementFetchDepth, resolveCircularFetch
-
Methods inherited from interface org.hibernate.metamodel.mapping.ModelPart
areEqual, forEachSelectable
-
Methods inherited from interface org.hibernate.metamodel.mapping.ValueMapping
getExpressibleJavaType, treatAs
-
-
-
-
Constructor Detail
-
AnonymousTupleBasicValuedModelPart
public AnonymousTupleBasicValuedModelPart(String partName, String selectionExpression, SqmExpressible<?> expressible, JdbcMapping jdbcMapping)
-
-
Method Detail
-
getPartMappingType
public MappingType getPartMappingType()
- Specified by:
getPartMappingType
in interfaceBasicValuedModelPart
- Specified by:
getPartMappingType
in interfaceModelPart
-
getJavaType
public JavaType<?> getJavaType()
- Specified by:
getJavaType
in interfaceModelPart
-
getMappedJavaType
public JavaType<?> getMappedJavaType()
- Specified by:
getMappedJavaType
in interfaceMappingType
-
getPartName
public String getPartName()
- Specified by:
getPartName
in interfaceModelPart
-
getNavigableRole
public NavigableRole getNavigableRole()
- Specified by:
getNavigableRole
in interfaceModelPart
- See Also:
ModelPart.getPartName()
-
findContainingEntityMapping
public EntityMappingType findContainingEntityMapping()
- Specified by:
findContainingEntityMapping
in interfaceModelPart
-
getJdbcMapping
public JdbcMapping getJdbcMapping()
Description copied from interface:SqlExpressible
Anything that is expressible at the SQL AST level would be of basic type.- Specified by:
getJdbcMapping
in interfaceBasicValuedMapping
- Specified by:
getJdbcMapping
in interfaceSqlExpressible
- Specified by:
getJdbcMapping
in interfaceSqlTypedMapping
-
getContainingTableExpression
public String getContainingTableExpression()
- Specified by:
getContainingTableExpression
in interfaceSelectableMapping
-
getSelectionExpression
public String getSelectionExpression()
- Specified by:
getSelectionExpression
in interfaceSelectableMapping
-
getCustomReadExpression
public String getCustomReadExpression()
- Specified by:
getCustomReadExpression
in interfaceSelectableMapping
-
getCustomWriteExpression
public String getCustomWriteExpression()
- Specified by:
getCustomWriteExpression
in interfaceSelectableMapping
-
isFormula
public boolean isFormula()
- Specified by:
isFormula
in interfaceSelectableMapping
-
getColumnDefinition
public String getColumnDefinition()
- Specified by:
getColumnDefinition
in interfaceSqlTypedMapping
-
getLength
public Long getLength()
- Specified by:
getLength
in interfaceSqlTypedMapping
-
getPrecision
public Integer getPrecision()
- Specified by:
getPrecision
in interfaceSqlTypedMapping
-
getScale
public Integer getScale()
- Specified by:
getScale
in interfaceSqlTypedMapping
-
getMappedType
public MappingType getMappedType()
Description copied from interface:ValueMapping
Descriptor for the type of this mapping- Specified by:
getMappedType
in interfaceValueMapping
-
getFetchableName
public String getFetchableName()
Description copied from interface:Fetchable
The name of the fetchable- Specified by:
getFetchableName
in interfaceFetchable
-
getMappedFetchOptions
public FetchOptions getMappedFetchOptions()
Description copied from interface:Fetchable
The configured fetch timing and style- Specified by:
getMappedFetchOptions
in interfaceFetchable
-
createDomainResult
public <T> DomainResult<T> createDomainResult(NavigablePath navigablePath, TableGroup tableGroup, String resultVariable, DomainResultCreationState creationState)
Description copied from interface:ModelPart
Create a DomainResult for a specific reference to this ModelPart.- Specified by:
createDomainResult
in interfaceModelPart
-
generateFetch
public BasicFetch generateFetch(FetchParent fetchParent, NavigablePath fetchablePath, FetchTiming fetchTiming, boolean selected, String resultVariable, DomainResultCreationState creationState)
Description copied from interface:Fetchable
Generates a Fetch of this fetchable- Specified by:
generateFetch
in interfaceFetchable
- Parameters:
fetchParent
- The parent of the Fetch we are generatingfetchablePath
- The overall path within the graphfetchTiming
- The requested fetch timing
-
applySqlSelections
public void applySqlSelections(NavigablePath navigablePath, TableGroup tableGroup, DomainResultCreationState creationState)
Description copied from interface:ModelPart
Apply SQL selections for a specific reference to this ModelPart outside the domain query's root select clause.- Specified by:
applySqlSelections
in interfaceModelPart
-
applySqlSelections
public void applySqlSelections(NavigablePath navigablePath, TableGroup tableGroup, DomainResultCreationState creationState, BiConsumer<SqlSelection,JdbcMapping> selectionConsumer)
Description copied from interface:ModelPart
Apply SQL selections for a specific reference to this ModelPart outside the domain query's root select clause.- Specified by:
applySqlSelections
in interfaceModelPart
-
forEachDisassembledJdbcValue
public int forEachDisassembledJdbcValue(Object value, Clause clause, int offset, Bindable.JdbcValuesConsumer valuesConsumer, SharedSessionContractImplementor session)
- Specified by:
forEachDisassembledJdbcValue
in interfaceBindable
-
forEachJdbcType
public int forEachJdbcType(int offset, IndexedConsumer<JdbcMapping> action)
Description copied from interface:JdbcMappingContainer
Visit each JdbcMapping starting from the given offset- Specified by:
forEachJdbcType
in interfaceJdbcMappingContainer
-
breakDownJdbcValues
public void breakDownJdbcValues(Object domainValue, ModelPart.JdbcValueConsumer valueConsumer, SharedSessionContractImplementor session)
- Specified by:
breakDownJdbcValues
in interfaceModelPart
-
disassemble
public Object disassemble(Object value, SharedSessionContractImplementor session)
- Specified by:
disassemble
in interfaceBindable
- See Also:
As an example, consider the following domain model: ````
-
forEachJdbcValue
public int forEachJdbcValue(Object value, Clause clause, int offset, Bindable.JdbcValuesConsumer valuesConsumer, SharedSessionContractImplementor session)
- Specified by:
forEachJdbcValue
in interfaceBindable
-
forEachSelectable
public int forEachSelectable(int offset, SelectableConsumer consumer)
- Specified by:
forEachSelectable
in interfaceModelPart
-
forEachJdbcType
public int forEachJdbcType(IndexedConsumer<JdbcMapping> action)
Description copied from interface:Bindable
Visit each of JdbcMapping- Specified by:
forEachJdbcType
in interfaceBindable
- Specified by:
forEachJdbcType
in interfaceJdbcMappingContainer
-
-