org.jboss.picketlink.idm.internal.jpa
Class JPATemplate

java.lang.Object
  extended by org.jboss.picketlink.idm.internal.jpa.JPATemplate

public class JPATemplate
extends Object

This class provides a template method to execute operations on the EntityManager instance. It already provides some exception handling, logging and gives more control about how the EntityManager is used.

Author:
Pedro Silva

Constructor Summary
JPATemplate()
           
 
Method Summary
 Object execute(JPACallback callback)
           Executes the specified JPACallback.
 void setEntityManager(javax.persistence.EntityManager entityManager)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JPATemplate

public JPATemplate()
Method Detail

execute

public Object execute(JPACallback callback)

Executes the specified JPACallback.

Parameters:
callback -
Returns:

setEntityManager

public void setEntityManager(javax.persistence.EntityManager entityManager)


Copyright © 2012. All Rights Reserved.