Package in.partake.model.dao

Examples of in.partake.model.dao.PartakeConnection


        connections = new HashSet<PartakeConnection>();
    }

    @Override
    protected PartakeConnection getConnectionImpl(String name) throws DAOException {
        final PartakeConnection con;
        if (this.preparedConnection != null) {
            con = preparedConnection;
            preparedConnection = null;
        } else {
            con = new MockConnection(this);
View Full Code Here


public abstract class DBAccess<T> {
    public final T execute() throws DAOException, PartakeException {
        IDBService dbService = PartakeApp.getDBService();

        PartakeConnection con = dbService.getConnection();
        try {
            return doExecute(con, dbService.getDAOs());
        } finally {
            con.invalidate();
        }
    }
View Full Code Here

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();
            }

            return result;
        } finally {
          try {
            if (con.isInTransaction())
              con.rollback();
          } finally {
            con.invalidate();
          }
        }
    }
View Full Code Here

TOP

Related Classes of in.partake.model.dao.PartakeConnection

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.