public final class PersistenceUtilHelper
extends java.lang.Object
PersistenceUtil.isLoaded(Object)PersistenceUtil.isLoaded(Object, String)ProviderUtil.isLoaded(Object)ProviderUtil.isLoadedWithReference(Object, String)ProviderUtil.isLoadedWithoutReference(Object, String)li>
| Modifier and Type | Class and Description |
|---|---|
static interface |
PersistenceUtilHelper.AttributeAccess |
static class |
PersistenceUtilHelper.AttributeExtractionException |
static class |
PersistenceUtilHelper.ClassMetadataCache |
static class |
PersistenceUtilHelper.FieldAttributeAccess |
static class |
PersistenceUtilHelper.MetadataCache
Cache hierarchy and member resolution in a weak hash map
|
static class |
PersistenceUtilHelper.MethodAttributeAccess |
| Modifier and Type | Method and Description |
|---|---|
static javax.persistence.spi.LoadState |
isLoaded(java.lang.Object reference)
Determine if the given object reference represents loaded state.
|
static javax.persistence.spi.LoadState |
isLoadedWithoutReference(java.lang.Object entity,
java.lang.String attributeName,
PersistenceUtilHelper.MetadataCache cache)
Is the given attribute (by name) loaded? This form must take care to not access the attribute (trigger
initialization).
|
static javax.persistence.spi.LoadState |
isLoadedWithReference(java.lang.Object entity,
java.lang.String attributeName,
PersistenceUtilHelper.MetadataCache cache)
Is the given attribute (by name) loaded? This form must take care to not access the attribute (trigger
initialization).
|
public static javax.persistence.spi.LoadState isLoaded(java.lang.Object reference)
HibernateProxy, we return LoadState.LOADED if
LazyInitializer.isUninitialized() returns false; else we return
LoadState.NOT_LOADED
LoadState.LOADED if
LazyAttributeLoadingInterceptor.hasAnyUninitializedAttributes() returns false;
otherwise we return LoadState.NOT_LOADED
PersistentCollection, we return LoadState.LOADED if
PersistentCollection.wasInitialized() returns true; else
we return LoadState.NOT_LOADED
LoadState.UNKNOWN
reference - The object reference to check.public static javax.persistence.spi.LoadState isLoadedWithoutReference(java.lang.Object entity,
java.lang.String attributeName,
PersistenceUtilHelper.MetadataCache cache)
entity - The entityattributeName - The name of the attribute to checkcache - The cache we maintain of attribute resolutionspublic static javax.persistence.spi.LoadState isLoadedWithReference(java.lang.Object entity,
java.lang.String attributeName,
PersistenceUtilHelper.MetadataCache cache)
entity - The entityattributeName - The name of the attribute to checkcache - The cache we maintain of attribute resolutionsCopyright © 2001-2018 Red Hat, Inc. All Rights Reserved.