de.akquinet.jbosscc.needle.db.transaction
Class VoidRunnable

java.lang.Object
  extended by de.akquinet.jbosscc.needle.db.transaction.VoidRunnable
All Implemented Interfaces:
Runnable<Object>

public abstract class VoidRunnable
extends Object
implements Runnable<Object>

Default implementation of Runnable. Does nothing.


Constructor Summary
VoidRunnable()
           
 
Method Summary
abstract  void doRun(javax.persistence.EntityManager entityManager)
          Hook method inside run().
 Object run(javax.persistence.EntityManager entityManager)
          Operation to be automatically called inside executeInTransaction().
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

VoidRunnable

public VoidRunnable()
Method Detail

run

public final Object run(javax.persistence.EntityManager entityManager)
                 throws Exception
Operation to be automatically called inside executeInTransaction().

Specified by:
run in interface Runnable<Object>
Parameters:
entityManager - an EntityManager
Returns:
return value of the operation
Throws:
Exception - thrown when something failed

doRun

public abstract void doRun(javax.persistence.EntityManager entityManager)
                    throws Exception
Hook method inside run().

Parameters:
entityManager - entityManager
Throws:
Exception - when something failed


Copyright © 2013 akquinet AG. All Rights Reserved.