public class NucleusJPAHelper extends Object
| Modifier and Type | Field and Description |
|---|---|
protected static org.datanucleus.util.Localiser |
LOCALISER
Localisation utility for output messages
|
| Constructor and Description |
|---|
NucleusJPAHelper() |
| Modifier and Type | Method and Description |
|---|---|
static String[] |
getDirtyFields(Object obj,
javax.jdo.PersistenceManager em)
Accessor for the names of the dirty fields of the persistable object.
|
static javax.persistence.EntityManager |
getEntityManager(Object obj)
Accessor for the EntityManager for the supplied (persistable) object.
|
static javax.jdo.spi.JDOImplHelper |
getJDOImplHelper()
Get the JDOImplHelper instance.
|
static javax.persistence.PersistenceException |
getJPAExceptionForJDOException(javax.jdo.JDOException jdoe)
Convenience method to convert a JDO exception into a JPA exception.
|
static javax.persistence.PersistenceException |
getJPAExceptionForNucleusException(org.datanucleus.exceptions.NucleusException ne)
Convenience method to convert a Nucleus exception into a JPA exception.
|
static String[] |
getLoadedFields(Object obj,
javax.persistence.EntityManager em)
Accessor for the names of the loaded fields of the persistable object.
|
static String |
getObjectState(Object obj)
Convenience method to return a string of the state of an object.
|
static boolean |
isDeleted(Object obj)
Convenience accessor for whether the object is deleted.
|
static boolean |
isDetached(Object obj)
Convenience accessor for whether the object is detached.
|
static boolean |
isPersistent(Object obj)
Convenience accessor for whether the object is persistent.
|
static boolean |
isTransactional(Object obj)
Convenience accessor for whether the object is transactional.
|
protected static final org.datanucleus.util.Localiser LOCALISER
public static javax.persistence.EntityManager getEntityManager(Object obj)
obj - The persistable objectpublic static boolean isPersistent(Object obj)
obj - The objectpublic static boolean isDeleted(Object obj)
obj - The objectpublic static boolean isDetached(Object obj)
obj - The objectpublic static boolean isTransactional(Object obj)
obj - The objectpublic static String getObjectState(Object obj)
obj - The objectpublic static String[] getDirtyFields(Object obj, javax.jdo.PersistenceManager em)
obj - The persistable objectem - The Entity Manager (only required if the object is detached)public static String[] getLoadedFields(Object obj, javax.persistence.EntityManager em)
obj - Persistable objectem - The Entity Manager (only required if the object is detached)public static javax.persistence.PersistenceException getJPAExceptionForJDOException(javax.jdo.JDOException jdoe)
jdoe - JDOExceptionpublic static javax.persistence.PersistenceException getJPAExceptionForNucleusException(org.datanucleus.exceptions.NucleusException ne)
ne - NucleusExceptionpublic static javax.jdo.spi.JDOImplHelper getJDOImplHelper()
Copyright © 2012. All Rights Reserved.