Class DynamicResultBuilderEntityCalculated
- java.lang.Object
-
- org.hibernate.query.results.dynamic.DynamicResultBuilderEntityCalculated
-
- All Implemented Interfaces:
NativeQuery.ResultNode
,NativeQuery.ReturnableResultNode
,NativeQuery.RootReturn
,DynamicResultBuilder
,DynamicResultBuilderEntity
,ResultBuilder
,ResultBuilderEntityValued
public class DynamicResultBuilderEntityCalculated extends Object implements DynamicResultBuilderEntity, NativeQuery.RootReturn
An entity-valued DynamicResultBuilder for cases when the user has not supplied specific column to attribute mappings. Hibernate uses the column names mapped by the entity mapping itself to read the entity values.
-
-
Constructor Summary
Constructors Constructor Description DynamicResultBuilderEntityCalculated(EntityMappingType entityMapping, String tableAlias, LockMode explicitLockMode)
-
Method Summary
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.hibernate.query.results.ResultBuilder
visitFetchBuilders
-
-
-
-
Constructor Detail
-
DynamicResultBuilderEntityCalculated
public DynamicResultBuilderEntityCalculated(EntityMappingType entityMapping, String tableAlias, LockMode explicitLockMode)
-
-
Method Detail
-
getJavaType
public Class<?> getJavaType()
- Specified by:
getJavaType
in interfaceResultBuilder
-
getEntityMapping
public EntityMappingType getEntityMapping()
- Specified by:
getEntityMapping
in interfaceNativeQuery.RootReturn
-
getTableAlias
public String getTableAlias()
- Specified by:
getTableAlias
in interfaceNativeQuery.RootReturn
-
getNavigablePath
public NavigablePath getNavigablePath()
- Specified by:
getNavigablePath
in interfaceNativeQuery.RootReturn
-
getLockMode
public LockMode getLockMode()
- Specified by:
getLockMode
in interfaceNativeQuery.RootReturn
-
setLockMode
public NativeQuery.RootReturn setLockMode(LockMode lockMode)
Description copied from interface:NativeQuery.RootReturn
Set the lock mode for this return.- Specified by:
setLockMode
in interfaceNativeQuery.RootReturn
- Parameters:
lockMode
- The new lock mode.- Returns:
this
, for method chaining
-
addIdColumnAliases
public NativeQuery.RootReturn addIdColumnAliases(String... aliases)
- Specified by:
addIdColumnAliases
in interfaceNativeQuery.RootReturn
-
getDiscriminatorAlias
public String getDiscriminatorAlias()
- Specified by:
getDiscriminatorAlias
in interfaceNativeQuery.RootReturn
-
setDiscriminatorAlias
public NativeQuery.RootReturn setDiscriminatorAlias(String columnAlias)
Description copied from interface:NativeQuery.RootReturn
Name the column alias that identifies the entity's discriminator.- Specified by:
setDiscriminatorAlias
in interfaceNativeQuery.RootReturn
- Parameters:
columnAlias
- The discriminator column alias- Returns:
this
, for method chaining
-
addProperty
public NativeQuery.RootReturn addProperty(String propertyName, String columnAlias)
Description copied from interface:NativeQuery.RootReturn
Add a simple property-to-one-column mapping.- Specified by:
addProperty
in interfaceNativeQuery.RootReturn
- Parameters:
propertyName
- The name of the property.columnAlias
- The name of the column- Returns:
this
, for method chaining
-
addProperty
public NativeQuery.ReturnProperty addProperty(String propertyName)
Description copied from interface:NativeQuery.RootReturn
Add a property, presumably with more than one column.- Specified by:
addProperty
in interfaceNativeQuery.RootReturn
- Parameters:
propertyName
- The name of the property.- Returns:
- The config object for further control.
-
cacheKeyInstance
public DynamicResultBuilderEntityCalculated cacheKeyInstance()
- Specified by:
cacheKeyInstance
in interfaceDynamicResultBuilder
- Specified by:
cacheKeyInstance
in interfaceResultBuilder
-
buildResult
public EntityResult buildResult(JdbcValuesMetadata jdbcResultsMetadata, int resultPosition, BiFunction<String,String,DynamicFetchBuilderLegacy> legacyFetchResolver, DomainResultCreationState domainResultCreationState)
- Specified by:
buildResult
in interfaceDynamicResultBuilderEntity
- Specified by:
buildResult
in interfaceResultBuilder
- Specified by:
buildResult
in interfaceResultBuilderEntityValued
-
-