Class XEntityManagerUtils
java.lang.Object
de.xima.fc.dao.utils.XEntityManagerUtils
Utility class for
EntityManagers.- Since:
- 8.3.0
- Author:
- XIMA MEDIA GmbH
-
Method Summary
Modifier and TypeMethodDescriptionstatic voiddetachEntityIfPresent(javax.persistence.EntityManager em, Class<?> entityType, Object primaryKey) Attempts to detach the entity from the entity manager, if it contains the entity.static voiddetachEntityIfPresent(javax.persistence.EntityManager em, Object entity) Attempts to detach the entity from the entity manager, if it contains the entity.
-
Method Details
-
detachEntityIfPresent
Attempts to detach the entity from the entity manager, if it contains the entity.- Parameters:
em- The entity manager on which to operate.entity- The entity to detach.
-
detachEntityIfPresent
public static void detachEntityIfPresent(javax.persistence.EntityManager em, Class<?> entityType, Object primaryKey) Attempts to detach the entity from the entity manager, if it contains the entity.- Parameters:
em- The entity manager on which to operate.entityType- The type of the entity.primaryKey- The primary key of the entity.
-