com.force.sdk.jpa
Class BaseEntity
java.lang.Object
com.force.sdk.jpa.BaseEntity
public final class BaseEntity
- extends Object
Utility for allowing merges on transient objects, i.e. objects that have not necessarily
been persisted or retrieved via the EntityManager
- Author:
- Fiaz Hossain
Method Summary |
static
|
initialiseForTransientMerge(javax.persistence.EntityManager em,
T obj)
Initialise an object of type T to be available for a merge() call even if it has not
been persisted or retrieved, by injecting a custom state manager into the object. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
initialiseForTransientMerge
public static <T> T initialiseForTransientMerge(javax.persistence.EntityManager em,
T obj)
- Initialise an object of type T to be available for a merge() call even if it has not
been persisted or retrieved, by injecting a custom state manager into the object.
- Type Parameters:
T
- the type of a PersistenceCapable entity- Parameters:
em
- the entity manager used for persistingobj
- the object being persisted
- Returns:
- the object that is now ready for a transient merge
Copyright © 2011. All Rights Reserved.