import in.partake.model.dao.PartakeConnection;
import in.partake.service.IDBService;
public abstract class Transaction<T> {
public final T execute() throws DAOException, PartakeException {
IDBService dbService = PartakeApp.getDBService();
PartakeConnection con = dbService.getConnection();
try {
con.beginTransaction();
T result = doExecute(con, dbService.getDAOs());
if (con.isInTransaction()) {
con.commit();
}