public final class PersistenceUtilHelper extends 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(Object reference)
Determine if the given object reference represents loaded state.
|
static javax.persistence.spi.LoadState |
isLoadedWithoutReference(Object entity,
String attributeName,
PersistenceUtilHelper.MetadataCache cache)
Is the given attribute (by name) loaded?
|
static javax.persistence.spi.LoadState |
isLoadedWithReference(Object entity,
String attributeName,
PersistenceUtilHelper.MetadataCache cache)
Is the given attribute (by name) loaded?
|
public static javax.persistence.spi.LoadState isLoaded(Object reference)
HibernateProxy, we return LoadState.LOADED if
LazyInitializer.isUninitialized() returns false; else we return
LoadState.NOT_LOADED
LoadState.LOADED if
FieldInterceptor.isInitialized() returns true;
else 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(Object entity, 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(Object entity, String attributeName, PersistenceUtilHelper.MetadataCache cache)
entity - The entityattributeName - The name of the attribute to checkcache - The cache we maintain of attribute resolutionsCopyright © 2016. All rights reserved.