public class PersistenceUnitUtilImpl extends Object implements PersistenceUnitUtil, Serializable
| Constructor and Description |
|---|
PersistenceUnitUtilImpl(SessionFactoryImplementor sessionFactory) |
| Modifier and Type | Method and Description |
|---|---|
Object |
getIdentifier(Object entity)
Return the id of the entity.
|
boolean |
isLoaded(Object entity)
Determine the load state of an entity belonging to the
persistence unit.
|
boolean |
isLoaded(Object entity,
String attributeName)
Determine the load state of a given persistent attribute
of an entity belonging to the persistence unit.
|
public PersistenceUnitUtilImpl(SessionFactoryImplementor sessionFactory)
public boolean isLoaded(Object entity, String attributeName)
PersistenceUnitUtilisLoaded in interface PersistenceUnitUtilisLoaded in interface PersistenceUtilentity - entity instance containing the attributeattributeName - name of attribute whose load state is
to be determinedpublic boolean isLoaded(Object entity)
PersistenceUnitUtilFetchType.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.
isLoaded in interface PersistenceUnitUtilisLoaded in interface PersistenceUtilentity - entity instance whose load state is to be determinedpublic Object getIdentifier(Object entity)
PersistenceUnitUtilgetIdentifier in interface PersistenceUnitUtilentity - entity instanceCopyright © 2019 JBoss by Red Hat. All rights reserved.