Class DAOTest

java.lang.Object
io.dropwizard.testing.common.DAOTest

public class DAOTest extends Object
  • Method Details

    • before

      public void before() throws Throwable
      Throws:
      Throwable
    • after

      public void after()
    • getSessionFactory

      public org.hibernate.SessionFactory getSessionFactory()
      Returns the current active session factory for injecting to DAOs. `
      Returns:
      SessionFactory with an open session.
    • inTransaction

      public <T> T inTransaction(Callable<T> call)
      Performs a call in a transaction
      Type Parameters:
      T - the type of the returned result
      Parameters:
      call - the call
      Returns:
      the result of the call
    • inTransaction

      public void inTransaction(Runnable action)
      Performs an action in a transaction
      Parameters:
      action - the action