Examples of DbConnection


Examples of org.apache.turbine.util.db.pool.DBConnection

     * @exception Exception, a generic exception.
     */
    public static DBConnection beginTransaction(String dbName)
        throws Exception
    {
        DBConnection dbCon = TurbineDB.getConnection( dbName );
        if ( dbCon.getConnection().getMetaData().supportsTransactions() )
        {
            dbCon.setAutoCommit(false);
        }
       
        return dbCon;
    }
View Full Code Here

Examples of org.apache.turbine.util.db.pool.DBConnection

    public static void deleteAll( String table,
                                  String column,
                                  int value )
        throws Exception
    {
        DBConnection dbCon = null;
        try
        {
            // Get a connection to the db.
            dbCon = TurbineDB.getConnection();
View Full Code Here

Examples of org.apache.turbine.util.db.pool.DBConnection

     * @exception Exception, a generic exception.
     */
    public static void doDelete(Criteria criteria)
        throws Exception
    {
        DBConnection dbCon = null;
        try
        {
            // Get a connection to the db.
            dbCon = TurbineDB.getConnection( criteria.getDbName() );
            doDelete(criteria, dbCon);
View Full Code Here

Examples of org.apache.turbine.util.db.pool.DBConnection

     * @exception Exception, a generic exception.
     */
    public static ObjectKey doInsert(Criteria criteria)
        throws Exception
    {
        DBConnection dbCon = null;
        ObjectKey id = null;

        // Transaction stuff added for postgres.
        boolean doTransaction = (TurbineDB.getDB(criteria.getDbName()).
            objectDataNeedsTrans() &&
View Full Code Here

Examples of org.apache.turbine.util.db.pool.DBConnection

        Vector results = null;
        if (TurbineDB.getDB(criteria.getDbName())
              .objectDataNeedsTrans() &&
              criteria.containsObjectColumn(criteria.getDbName()))
        {
            DBConnection dbCon = beginTransaction(criteria.getDbName());
            try
            {
                results = executeQuery( createQueryString(criteria),
                                        criteria.isSingleRecord(), dbCon );
                commitTransaction(dbCon);
View Full Code Here

Examples of org.apache.turbine.util.db.pool.DBConnection

                                      int numberOfResults,
                                      String dbName,
                                      boolean singleRecord)
        throws Exception
    {
        DBConnection db = null;
        Vector results = null;
        try
        {
            // get a connection to the db
            db = TurbineDB.getConnection( dbName );
View Full Code Here

Examples of org.apache.turbine.util.db.pool.DBConnection

    {
        // Transaction stuff added for postgres.
        boolean doTransaction = (TurbineDB.getDB(updateValues.getDbName())
            .objectDataNeedsTrans() &&
            updateValues.containsObjectColumn(updateValues.getDbName()));
        DBConnection db = null;
        try
        {
            // Get a connection to the db.
            if (doTransaction)
            {
View Full Code Here

Examples of org.apache.turbine.util.db.pool.DBConnection

    {
        // Transaction stuff added for postgres.
        boolean doTransaction = (TurbineDB.getDB(updateValues.getDbName())
            .objectDataNeedsTrans() &&
            updateValues.containsObjectColumn(selectCriteria.getDbName()));
        DBConnection db = null;
        try
        {
            // Get a connection to the db.
            if (doTransaction)
                db = beginTransaction(selectCriteria.getDbName());
View Full Code Here

Examples of org.apache.turbine.util.db.pool.DBConnection

     * @exception Exception, a generic exception.  */
    public static int executeStatement(String stmt,
                                       String dbName)
        throws Exception
    {
        DBConnection db = null;
        int rowCount = -1;
        try
        {
            // Get a connection to the db.
            db = TurbineDB.getConnection( dbName );
View Full Code Here

Examples of org.apache.turbine.util.db.pool.DBConnection

    /**
     * Do a Prepared Statement select according to the given criteria
     */
    public static Vector doPSSelect(Criteria criteria) throws Exception
    {
        DBConnection dbCon = TurbineDB.getConnection( criteria.getDbName() );
        Vector v = null;

        try
        {
            v = doPSSelect (criteria,dbCon);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.