EclipseLink 2.0.0_ 2.0.0.v20090626-r4569 API Reference

javax.persistence.spi
Interface PersistenceUtil


public interface PersistenceUtil

Utility interface between the application and the persistence provider(s).


Method Summary
 boolean isLoaded(java.lang.Object object)
          Determine the load state of an entity regardless of the persistence provider that created it.
 boolean isLoaded(java.lang.Object entity, java.lang.String attributeName)
          Determine the load state of a given persistent attribute regardless of the persistence provider that created the containing entity.
 

Method Detail

isLoaded

boolean isLoaded(java.lang.Object entity,
                 java.lang.String attributeName)
Determine the load state of a given persistent attribute regardless of the persistence provider that created the containing entity.

Parameters:
attributeName - name of attribute whose load state is to be determined
Returns:
false if entity's state has not been loaded or if the attribute state has not been loaded, otherwise true

isLoaded

boolean isLoaded(java.lang.Object object)
Determine the load state of an entity regardless of the persistence provider that created it. This method can be used to determine the load state of an entity passed as a reference. An entity is considered loaded if all attributes for which FetchType EAGER has been specified have been loaded. The isLoaded(Object, String) method should be used to determine the load state of an attribute. Not doing so might lead to unintended loading of state.

Returns:
false if the entity has not be loaded, otherwise true.

EclipseLink 2.0.0_ 2.0.0.v20090626-r4569 API Reference