public final class PersistenceUtilHelper extends Object
| 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 LoadState | 
isLoaded(Object reference)
Determine if the given object reference represents loaded state. 
 | 
static LoadState | 
isLoadedWithoutReference(Object entity,
                        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 LoadState | 
isLoadedWithReference(Object entity,
                     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 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 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 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 © 2001-2015 Red Hat, Inc. All Rights Reserved.