Class BasicResultAssembler<J>
- java.lang.Object
-
- org.hibernate.sql.results.graph.basic.BasicResultAssembler<J>
-
- All Implemented Interfaces:
DomainResultAssembler<J>
- Direct Known Subclasses:
CoercingResultAssembler
public class BasicResultAssembler<J> extends Object implements DomainResultAssembler<J>
-
-
Field Summary
Fields Modifier and Type Field Description protected JavaType<J>
assembledJavaType
protected int
valuesArrayPosition
-
Constructor Summary
Constructors Constructor Description BasicResultAssembler(int valuesArrayPosition, JavaType<J> assembledJavaType)
BasicResultAssembler(int valuesArrayPosition, JavaType<J> assembledJavaType, BasicValueConverter<J,?> valueConverter, boolean unwrapRowProcessingState)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description J
assemble(RowProcessingState rowProcessingState)
The main "assembly" contract.Object
extractRawValue(RowProcessingState rowProcessingState)
Access to the raw value (unconverted, if a converter applied)static <X> BasicResultAssembler<X>
from(SqlSelection selection, JavaType<X> javaType)
JavaType<J>
getAssembledJavaType()
The JavaType describing the Java type that this assembler assembles.BasicValueConverter<J,?>
getValueConverter()
Exposed for testing purposesvoid
resolveState(RowProcessingState rowProcessingState)
This method is used to resolve the assembler's state, i.e.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.hibernate.sql.results.graph.DomainResultAssembler
forEachResultAssembler, getInitializer
-
-
-
-
Constructor Detail
-
BasicResultAssembler
public BasicResultAssembler(int valuesArrayPosition, JavaType<J> assembledJavaType)
-
BasicResultAssembler
public BasicResultAssembler(int valuesArrayPosition, JavaType<J> assembledJavaType, BasicValueConverter<J,?> valueConverter, boolean unwrapRowProcessingState)
-
-
Method Detail
-
from
public static <X> BasicResultAssembler<X> from(SqlSelection selection, JavaType<X> javaType)
-
extractRawValue
public Object extractRawValue(RowProcessingState rowProcessingState)
Access to the raw value (unconverted, if a converter applied)
-
assemble
public J assemble(RowProcessingState rowProcessingState)
Description copied from interface:DomainResultAssembler
The main "assembly" contract. Assemble the result and return it.- Specified by:
assemble
in interfaceDomainResultAssembler<J>
-
resolveState
public void resolveState(RowProcessingState rowProcessingState)
Description copied from interface:DomainResultAssembler
This method is used to resolve the assembler's state, i.e. reading the result values, with some performance optimization when we don't need the result object itself- Specified by:
resolveState
in interfaceDomainResultAssembler<J>
-
getAssembledJavaType
public JavaType<J> getAssembledJavaType()
Description copied from interface:DomainResultAssembler
The JavaType describing the Java type that this assembler assembles.- Specified by:
getAssembledJavaType
in interfaceDomainResultAssembler<J>
-
getValueConverter
@Internal public BasicValueConverter<J,?> getValueConverter()
Exposed for testing purposes
-
-