public class EntityManagerProvider extends Object
Provides useful methods to properly manage EntityManager
instances and related metadata when using in
conjunction with the JPAIdentityStore
.
Constructor and Description |
---|
EntityManagerProvider() |
Modifier and Type | Method and Description |
---|---|
EntityManager |
getEntityManager()
Returns an
EntityManager if produced by the application. |
Class<?>[] |
getMappedEntities() |
boolean |
hasMappedEntities()
Indicates if the
getEntityManager() is configured with any entity class annotated
with the PicketLink IDM JPA Annotations. |
void |
init() |
@Inject public void init()
public EntityManager getEntityManager()
Returns an EntityManager
if produced by the application.
The entity manager is returned based on the following rules:
PicketLink
qualifier, it will be used.
EntityManager
instance or null if none was found.public Class<?>[] getMappedEntities()
public boolean hasMappedEntities()
Indicates if the getEntityManager()
is configured with any entity class annotated
with the PicketLink IDM JPA Annotations.
If true, it usually means that the application is configured with a JPA Identity Store.
Copyright © 2014. All rights reserved.