nl.knowledgeplaza.util.jpa
Class EclipselinkUtil
java.lang.Object
nl.knowledgeplaza.util.jpa.JpaUtil
nl.knowledgeplaza.util.jpa.EclipselinkUtil
public class EclipselinkUtil
- extends JpaUtil
|
Field Summary |
static java.lang.String |
SOURCECODE_VERSION
Standard variable for determining version of a class file. |
|
Method Summary |
static org.eclipse.persistence.jpa.JpaEntityManager |
castToJpaEntityManager(javax.persistence.EntityManager entityManager)
Cast to JpaEntityManager, but first see if this is the EntityManagerExtender proxy |
static java.lang.Number |
getNextSequenceNumberValue(javax.persistence.EntityManager entityManager,
java.lang.Class clazz)
Allocate a new PK |
static java.lang.Object |
getSingleResultOrDefault(javax.persistence.Query lQuery,
java.lang.Object d)
getSingleResult throws an exception if nothing is found. |
static java.lang.Object |
getSingleResultOrNull(javax.persistence.Query lQuery)
getSingleResult throws an exception if nothing is found. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SOURCECODE_VERSION
public static final java.lang.String SOURCECODE_VERSION
- Standard variable for determining version of a class file.
- See Also:
- Constant Field Values
EclipselinkUtil
public EclipselinkUtil()
getSingleResultOrNull
public static java.lang.Object getSingleResultOrNull(javax.persistence.Query lQuery)
- getSingleResult throws an exception if nothing is found.
The method returns null in that case.
- Parameters:
lQuery -
- Returns:
getSingleResultOrDefault
public static java.lang.Object getSingleResultOrDefault(javax.persistence.Query lQuery,
java.lang.Object d)
- getSingleResult throws an exception if nothing is found.
The method returns the default in that case.
- Parameters:
lQuery -
- Returns:
castToJpaEntityManager
public static org.eclipse.persistence.jpa.JpaEntityManager castToJpaEntityManager(javax.persistence.EntityManager entityManager)
- Cast to JpaEntityManager, but first see if this is the EntityManagerExtender proxy
- Parameters:
entityManager -
- Returns:
getNextSequenceNumberValue
public static java.lang.Number getNextSequenceNumberValue(javax.persistence.EntityManager entityManager,
java.lang.Class clazz)
- Allocate a new PK
- Parameters:
entityManager - clazz -
- Returns:
Copyright © 2010. All Rights Reserved.