Package io.dropwizard.testing.common
Class DAOTest
java.lang.Object
io.dropwizard.testing.common.DAOTest
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionvoidafter()voidbefore()org.hibernate.SessionFactoryReturns the current active session factory for injecting to DAOsvoidinTransaction(Runnable action) Performs an action in a transaction<T> TinTransaction(Callable<T> call) Performs a call in a transaction
-
Method Details
-
before
- Throws:
Throwable
-
after
public void after() -
getSessionFactory
public org.hibernate.SessionFactory getSessionFactory()Returns the current active session factory for injecting to DAOs. `- Returns:
SessionFactorywith an open session.
-
inTransaction
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
Performs an action in a transaction- Parameters:
action- the action
-