All Downloads are FREE. Search and download functionalities are using the official Maven repository.

de.akquinet.jbosscc.needle.db.transaction.Runnable Maven / Gradle / Ivy

package de.akquinet.jbosscc.needle.db.transaction;

import javax.persistence.EntityManager;

/**
 * Interface for passing algorithms to executeInTransaction().
 * 
 * @param 
 *          - return type of run()
 */
public interface Runnable {
  /**
   * Operation to be automatically called inside executeInTransaction().
   * 
   * @param entityManager
   *          an {@link javax.persistence.EntityManager}
   * @return return value of the operation
   * @throws Exception
   *           thrown when something failed
   */
  T run(EntityManager entityManager) throws Exception;
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy