Package com.cedarsolutions.exception

Examples of com.cedarsolutions.exception.DaoException


    }

    /** Commit a transaction. */
    public void commit() {
        if (!this.transactional) {
           throw new DaoException("This Objectify instance is not transactional.");
        }

        if (this.getTxn().isActive()) {
            this.getTxn().commit();
        }
View Full Code Here


    }

    /** Rollback a transaction. */
    public void rollback() {
        if (!this.transactional) {
           throw new DaoException("This Objectify instance is not transactional.");
        }

        if (this.getTxn().isActive()) {
            this.getTxn().rollback();
        }
View Full Code Here

    /** Check that a transaction is a valid GAE transaction this DAO can use. */
    protected static GaeDaoTransaction checkTransactionType(IDaoTransaction transaction) {
        if (transaction == null) {
            throw new NullPointerException("transaction");
        } else if (!(transaction instanceof GaeDaoTransaction)) {
            throw new DaoException("A transaction of type GaeDaoTransaction is required, got " + transaction.getClass().getName());
        } else {
            return (GaeDaoTransaction) transaction;
        }
    }
View Full Code Here

    /** Create a DAO transaction based on a transactional Objectify proxy. */
    public GaeDaoTransaction(ObjectifyProxy objectify) {
        this.objectify = objectify;
        if (!this.objectify.isTransactional()) {
            throw new DaoException("Objectify proxy is not transactional.");
        }
    }
View Full Code Here

TOP

Related Classes of com.cedarsolutions.exception.DaoException

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.