Top Constructors Methods
org.hibernate.loader.ast.internal

public Class LoaderHelper

extends Object
Class Inheritance
Imports
java.lang.reflect.Array, java.util.List, org.hibernate.LockMode, .LockOptions, .ObjectDeletedException, org.hibernate.cache.spi.access.EntityDataAccess, .SoftLock, org.hibernate.engine.spi.EntityEntry, .LoadQueryInfluencers, .SessionFactoryImplementor, .SharedSessionContractImplementor, .Status, .SubselectFetch, org.hibernate.event.spi.EventSource, org.hibernate.loader.LoaderLogging, org.hibernate.metamodel.mapping.BasicValuedModelPart, .EntityMappingType, .JdbcMapping, org.hibernate.persister.entity.EntityPersister, org.hibernate.sql.ast.tree.expression.JdbcParameter, org.hibernate.sql.ast.tree.select.SelectStatement, org.hibernate.sql.exec.internal.JdbcParameterBindingImpl, .JdbcParameterBindingsImpl, org.hibernate.sql.exec.spi.JdbcOperationQuerySelect, .JdbcParameterBindings, .JdbcParametersList, org.hibernate.sql.results.internal.RowTransformerStandardImpl, org.hibernate.sql.results.spi.ListResultsConsumer, org.hibernate.type.descriptor.java.JavaType

Author
Steve Ebersole

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public static <X> X[]
createTypedArray(Class<X>
The type of the array elements. See Class#getComponentType()
elementClass
,
int
The length to which the array should be created. This is usually zero for Hibernate uses
length
)

Creates a typed array, as opposed to a generic Object[] that holds the typed values

public static Boolean
getReadOnlyFromLoadQueryInfluencers(SharedSessionContractImplementor session)

Determine if the influencers associated with the given Session indicate read-only

public static Boolean
getReadOnlyFromLoadQueryInfluencers(LoadQueryInfluencers loadQueryInfluencers)

Determine if given influencers indicate read-only

public static <
The type of the model part to load
R
,
The type of the keys
K
>
List<R>
loadByArrayParameter(K[] idsToInitialize, SelectStatement sqlAst, JdbcOperationQuerySelect jdbcOperation, JdbcParameter jdbcParameter, JdbcMapping arrayJdbcMapping, Object entityId, Object entityInstance, EntityMappingType rootEntityDescriptor, LockOptions lockOptions, Boolean readOnly, SharedSessionContractImplementor session)

Load one or more instances of a model part (an entity or collection) based on a SQL ARRAY parameter to specify the keys (as opposed to the more traditional SQL IN predicate approach).

public static <
The key type
K
>
K[]
normalizeKeys(K[]
The keys to normalize
keys
,
BasicValuedModelPart
The ModelPart describing the key
keyPart
,
SharedSessionContractImplementor session, SessionFactoryImplementor sessionFactory)

Deprecated as a consequence of SessionFactoryImplementor being deprecated.
Normalize an array of keys (primary, foreign or natural).
public static void
upgradeLock(Object object, EntityEntry entry, LockOptions lockOptions, EventSource session)

Ensure the LockMode associated with the entity in relation to a persistence context is great or equal to the requested mode.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

LoaderHelperback to summary
public LoaderHelper()

Method Detail

createTypedArrayback to summary
public static <X> X[] createTypedArray(Class<X> elementClass, int length)

Creates a typed array, as opposed to a generic Object[] that holds the typed values

Parameters
elementClass:Class<X>

The type of the array elements. See Class#getComponentType()

length:int

The length to which the array should be created. This is usually zero for Hibernate uses

getReadOnlyFromLoadQueryInfluencersback to summary
public static Boolean getReadOnlyFromLoadQueryInfluencers(SharedSessionContractImplementor session)

Determine if the influencers associated with the given Session indicate read-only

getReadOnlyFromLoadQueryInfluencersback to summary
public static Boolean getReadOnlyFromLoadQueryInfluencers(LoadQueryInfluencers loadQueryInfluencers)

Determine if given influencers indicate read-only

loadByArrayParameterback to summary
public static <R, K> List<R> loadByArrayParameter(K[] idsToInitialize, SelectStatement sqlAst, JdbcOperationQuerySelect jdbcOperation, JdbcParameter jdbcParameter, JdbcMapping arrayJdbcMapping, Object entityId, Object entityInstance, EntityMappingType rootEntityDescriptor, LockOptions lockOptions, Boolean readOnly, SharedSessionContractImplementor session)

Load one or more instances of a model part (an entity or collection) based on a SQL ARRAY parameter to specify the keys (as opposed to the more traditional SQL IN predicate approach).

Parameters
<R>
The type of the model part to load
<K>
The type of the keys
normalizeKeysback to summary
public static <K> K[] normalizeKeys(K[] keys, BasicValuedModelPart keyPart, SharedSessionContractImplementor session, SessionFactoryImplementor sessionFactory)

Deprecated

as a consequence of SessionFactoryImplementor being deprecated. See corresponding docs for further information.

Normalize an array of keys (primary, foreign or natural).

If the array is already typed as the key type, keys is simply returned.

Otherwise, a new typed array is created and the contents copied from keys to this new array. If key coercion is enabled, the values will be coerced to the key type.

Parameters
<K>
The key type
keys:K[]

The keys to normalize

keyPart:BasicValuedModelPart

The ModelPart describing the key

upgradeLockback to summary
public static void upgradeLock(Object object, EntityEntry entry, LockOptions lockOptions, EventSource session)

Ensure the LockMode associated with the entity in relation to a persistence context is great or equal to the requested mode.