Class DynamicFetchBuilderLegacy
- java.lang.Object
-
- org.hibernate.query.results.dynamic.DynamicFetchBuilderLegacy
-
- All Implemented Interfaces:
NativeQuery.FetchReturn
,NativeQuery.ResultNode
,NativeQuery.ReturnProperty
,DynamicFetchBuilder
,DynamicFetchBuilderContainer
,FetchBuilder
public class DynamicFetchBuilderLegacy extends Object implements DynamicFetchBuilder, NativeQuery.FetchReturn, DynamicFetchBuilderContainer
-
-
Constructor Summary
Constructors Constructor Description DynamicFetchBuilderLegacy(String tableAlias, String ownerTableAlias, String fetchableName, List<String> columnNames, Map<String,FetchBuilder> fetchBuilderMap)
DynamicFetchBuilderLegacy(String tableAlias, String ownerTableAlias, String fetchableName, List<String> columnNames, Map<String,FetchBuilder> fetchBuilderMap, DynamicResultBuilderEntityStandard resultBuilderEntity)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description NativeQuery.ReturnProperty
addColumnAlias(String columnAlias)
Add a column alias to this property mapping.void
addFetchBuilder(String propertyName, FetchBuilder fetchBuilder)
DynamicFetchBuilder
addProperty(String propertyName)
Add a property, presumably with more than one column.DynamicFetchBuilderLegacy
addProperty(String propertyName, String columnAlias)
Add a simple property-to-one-column mapping.DynamicFetchBuilderContainer
addProperty(String propertyName, String... columnAliases)
Add a property mapped to multiple columnsFetch
buildFetch(FetchParent parent, NavigablePath fetchPath, JdbcValuesMetadata jdbcResultsMetadata, BiFunction<String,String,DynamicFetchBuilderLegacy> legacyFetchResolver, DomainResultCreationState domainResultCreationState)
DynamicFetchBuilderLegacy
cacheKeyInstance()
boolean
equals(Object o)
FetchBuilder
findFetchBuilder(String fetchableName)
Locate an explicit fetch definition for the named fetchableList<String>
getColumnAliases()
String
getFetchableName()
String
getOwnerAlias()
String
getTableAlias()
int
hashCode()
NativeQuery.FetchReturn
setLockMode(LockMode lockMode)
Set the lock mode for this return.void
visitFetchBuilders(BiConsumer<String,FetchBuilder> consumer)
-
-
-
Constructor Detail
-
DynamicFetchBuilderLegacy
public DynamicFetchBuilderLegacy(String tableAlias, String ownerTableAlias, String fetchableName, List<String> columnNames, Map<String,FetchBuilder> fetchBuilderMap)
-
DynamicFetchBuilderLegacy
public DynamicFetchBuilderLegacy(String tableAlias, String ownerTableAlias, String fetchableName, List<String> columnNames, Map<String,FetchBuilder> fetchBuilderMap, DynamicResultBuilderEntityStandard resultBuilderEntity)
-
-
Method Detail
-
getTableAlias
public String getTableAlias()
- Specified by:
getTableAlias
in interfaceNativeQuery.FetchReturn
-
getOwnerAlias
public String getOwnerAlias()
- Specified by:
getOwnerAlias
in interfaceNativeQuery.FetchReturn
-
getFetchableName
public String getFetchableName()
- Specified by:
getFetchableName
in interfaceNativeQuery.FetchReturn
-
cacheKeyInstance
public DynamicFetchBuilderLegacy cacheKeyInstance()
- Specified by:
cacheKeyInstance
in interfaceDynamicFetchBuilder
- Specified by:
cacheKeyInstance
in interfaceFetchBuilder
-
buildFetch
public Fetch buildFetch(FetchParent parent, NavigablePath fetchPath, JdbcValuesMetadata jdbcResultsMetadata, BiFunction<String,String,DynamicFetchBuilderLegacy> legacyFetchResolver, DomainResultCreationState domainResultCreationState)
- Specified by:
buildFetch
in interfaceFetchBuilder
-
addColumnAlias
public NativeQuery.ReturnProperty addColumnAlias(String columnAlias)
Description copied from interface:NativeQuery.ReturnProperty
Add a column alias to this property mapping.- Specified by:
addColumnAlias
in interfaceNativeQuery.ReturnProperty
- Parameters:
columnAlias
- The column alias.- Returns:
this
, for method chaining
-
getColumnAliases
public List<String> getColumnAliases()
- Specified by:
getColumnAliases
in interfaceDynamicFetchBuilder
-
setLockMode
public NativeQuery.FetchReturn setLockMode(LockMode lockMode)
Description copied from interface:NativeQuery.FetchReturn
Set the lock mode for this return.- Specified by:
setLockMode
in interfaceNativeQuery.FetchReturn
- Parameters:
lockMode
- The new lock mode.- Returns:
this
, for method chaining
-
addProperty
public DynamicFetchBuilderLegacy addProperty(String propertyName, String columnAlias)
Description copied from interface:NativeQuery.FetchReturn
Add a simple property-to-one-column mapping.- Specified by:
addProperty
in interfaceDynamicFetchBuilderContainer
- Specified by:
addProperty
in interfaceNativeQuery.FetchReturn
- Parameters:
propertyName
- The name of the property.columnAlias
- The name of the column- Returns:
this
, for method chaining
-
addProperty
public DynamicFetchBuilder addProperty(String propertyName)
Description copied from interface:NativeQuery.FetchReturn
Add a property, presumably with more than one column.- Specified by:
addProperty
in interfaceDynamicFetchBuilderContainer
- Specified by:
addProperty
in interfaceNativeQuery.FetchReturn
- Parameters:
propertyName
- The name of the property.- Returns:
- The config object for further control.
-
findFetchBuilder
public FetchBuilder findFetchBuilder(String fetchableName)
Description copied from interface:DynamicFetchBuilderContainer
Locate an explicit fetch definition for the named fetchable- Specified by:
findFetchBuilder
in interfaceDynamicFetchBuilderContainer
-
addProperty
public DynamicFetchBuilderContainer addProperty(String propertyName, String... columnAliases)
Description copied from interface:DynamicFetchBuilderContainer
Add a property mapped to multiple columns- Specified by:
addProperty
in interfaceDynamicFetchBuilderContainer
-
addFetchBuilder
public void addFetchBuilder(String propertyName, FetchBuilder fetchBuilder)
- Specified by:
addFetchBuilder
in interfaceDynamicFetchBuilderContainer
-
visitFetchBuilders
public void visitFetchBuilders(BiConsumer<String,FetchBuilder> consumer)
- Specified by:
visitFetchBuilders
in interfaceFetchBuilder
-
-