Package com.scooterframework.transaction

Examples of com.scooterframework.transaction.ImplicitTransactionManager


     * @param records a list of records to be added to the relation.
     * @param joinInputs a list of input data map for the through table.
     * @return updated AssociatedRecords.
     */
    public AssociatedRecords add(List<? extends ActiveRecord> records, List<Map<String, Object>> joinInputs) {
        ImplicitTransactionManager tm = TransactionManagerUtil.getImplicitTransactionManager();
        AssociatedRecords assocs = null;
        try {
            tm.beginTransactionImplicit();
           
            assocs = internal_add(records, joinInputs);
           
            tm.commitTransactionImplicit();
        }
        catch(GenericException ex) {
            tm.rollbackTransactionImplicit();
            throw ex;
        }
        finally {
            tm.releaseResourcesImplicit();
        }
        return assocs;
    }
View Full Code Here


     * @param records list of records to be detached.
     * @param keepJoinRecord if true, keep the join record. Otherwise, delete it.
     * @return updated AssociatedRecords.
     */
    public AssociatedRecords detach(List<? extends ActiveRecord> records, boolean keepJoinRecord) {
        ImplicitTransactionManager tm = TransactionManagerUtil.getImplicitTransactionManager();
        AssociatedRecords assocs = null;
        try {
            tm.beginTransactionImplicit();
           
            assocs = internal_detach(records, keepJoinRecord);
           
            tm.commitTransactionImplicit();
        }
        catch(GenericException ex) {
            tm.rollbackTransactionImplicit();
            throw ex;
        }
        finally {
            tm.releaseResourcesImplicit();
        }
        return assocs;
    }
View Full Code Here

     *
     * @param records a list of records to be deleted.
     * @return updated AssociatedRecords.
     */
    public AssociatedRecords delete(List<? extends ActiveRecord> records) {
        ImplicitTransactionManager tm = TransactionManagerUtil.getImplicitTransactionManager();
        AssociatedRecords assocs = null;
        try {
            tm.beginTransactionImplicit();
           
            assocs = internal_delete(records);
           
            tm.commitTransactionImplicit();
        }
        catch(GenericException ex) {
            tm.rollbackTransactionImplicit();
            throw ex;
        }
        finally {
            tm.releaseResourcesImplicit();
        }
        return assocs;
    }
View Full Code Here

     *
     * @param records a list of records to be added to the relation.
     * @return updated AssociatedRecords.
     */
    public AssociatedRecords add(List<? extends ActiveRecord> records) {
        ImplicitTransactionManager tm = TransactionManagerUtil.getImplicitTransactionManager();
        AssociatedRecords assocs = null;
        try {
            tm.beginTransactionImplicit();
           
            assocs = internal_add(records);
           
            tm.commitTransactionImplicit();
        }
        catch(GenericException ex) {
            tm.rollbackTransactionImplicit();
            throw ex;
        }
        finally {
            tm.releaseResourcesImplicit();
        }
        return assocs;
    }
View Full Code Here

     *
     * @param records list of records to be detached.
     * @return updated AssociatedRecords.
     */
    public AssociatedRecords detach(List<? extends ActiveRecord> records) {
        ImplicitTransactionManager tm = TransactionManagerUtil.getImplicitTransactionManager();
        AssociatedRecords assocs = null;
        try {
            tm.beginTransactionImplicit();
           
            assocs = internal_detach(records);
           
            tm.commitTransactionImplicit();
        }
        catch(GenericException ex) {
            tm.rollbackTransactionImplicit();
            throw ex;
        }
        finally {
            tm.releaseResourcesImplicit();
        }
        return assocs;
    }
View Full Code Here

     *
     * @param records a list of records to be deleted.
     * @return updated AssociatedRecords.
     */
    public AssociatedRecords delete(List<? extends ActiveRecord> records) {
        ImplicitTransactionManager tm = TransactionManagerUtil.getImplicitTransactionManager();
        AssociatedRecords assocs = null;
        try {
            tm.beginTransactionImplicit();
           
            assocs = intenal_delete(records);
           
            tm.commitTransactionImplicit();
        }
        catch(GenericException ex) {
            tm.rollbackTransactionImplicit();
            throw ex;
        }
        finally {
            tm.releaseResourcesImplicit();
        }
        return assocs;
    }
View Full Code Here

     * Adds the new records to the association.
     *
     * @return updated AssociatedRecords
     */
    public AssociatedRecords replace(List<? extends ActiveRecord> records) {
        ImplicitTransactionManager tm = TransactionManagerUtil.getImplicitTransactionManager();
        AssociatedRecords assocs = null;
        try {
            tm.beginTransactionImplicit();
           
            assocs = internal_replace(records);
           
            tm.commitTransactionImplicit();
        }
        catch(GenericException ex) {
            tm.rollbackTransactionImplicit();
            throw ex;
        }
        finally {
            tm.releaseResourcesImplicit();
        }
        return assocs;
    }
View Full Code Here

TOP

Related Classes of com.scooterframework.transaction.ImplicitTransactionManager

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.