Package org.apache.isis.core.runtime.system.transaction

Examples of org.apache.isis.core.runtime.system.transaction.TransactionalClosureAbstract


    // //////////////////////////////////////

   
    private void execute(final IsisTransactionManager transactionManager, final Command command) {
        transactionManager.executeWithinTransaction(new TransactionalClosureAbstract() {
            @Override
            public void execute() {
                commandContext.setCommand(command);
                try {
View Full Code Here


     * transaction handling.
     */
    protected void doExecute(final Object context) {
        final PersistenceSession persistenceSession = getPersistenceSession();
        final IsisTransactionManager transactionManager = getTransactionManager(persistenceSession);
        transactionManager.executeWithinTransaction(new TransactionalClosureAbstract() {
            @Override
            public void execute() {
                doExecuteWithTransaction(context);
            }
        });
View Full Code Here

        if (adapter.isTransient()) {
            // NOT !adapter.isPersistent();
            // (value adapters are neither persistent or transient)
            underlyingFacet.clearProperty(adapter);
        } else {
            getTransactionManager().executeWithinTransaction(new TransactionalClosureAbstract() {
                @Override
                public void execute() {
                    underlyingFacet.clearProperty(adapter);
                }
            });
View Full Code Here

        if (adapter.isTransient()) {
            // NOT !adapter.isPersistent();
            // (value adapters are neither persistent or transient)
            underlyingFacet.setProperty(adapter, referencedAdapter);
        } else {
            getTransactionManager().executeWithinTransaction(new TransactionalClosureAbstract() {
                @Override
                public void execute() {
                    underlyingFacet.setProperty(adapter, referencedAdapter);
                }
            });
View Full Code Here

            }
        }
    }

    private void resolveImmediatelyFromPersistenceLayer(final ObjectAdapter adapter) {
        getTransactionManager().executeWithinTransaction(new TransactionalClosureAbstract() {
            @Override
            public void preExecute() {
                CallbackUtils.callCallback(adapter, LoadingCallbackFacet.class);
            }
View Full Code Here

        }
        resolveFieldFromPersistenceLayer(objectAdapter, field);
    }

    private void resolveFieldFromPersistenceLayer(final ObjectAdapter objectAdapter, final ObjectAssociation field) {
        getTransactionManager().executeWithinTransaction(new TransactionalClosureAbstract() {
            @Override
            public void execute() {
                objectStore.resolveField(objectAdapter, field);
            }
        });
View Full Code Here

        makePersistentInPersistenceLayer(adapter);
    }

    protected void makePersistentInPersistenceLayer(final ObjectAdapter adapter) {
        getTransactionManager().executeWithinTransaction(new TransactionalClosureAbstract() {
            @Override
            public void preExecute() {
                // callbacks are called by the persist algorithm
            }
View Full Code Here

        getUpdateNotifier().addChangedObject(adapter);
    }

    private void addObjectChangedForPersistenceLayer(final ObjectAdapter adapter) {
        LOG.debug("object change to be persisted " + adapter.getOid());
        getTransactionManager().executeWithinTransaction(new TransactionalClosureAbstract() {
            @Override
            public void preExecute() {
                CallbackUtils.callCallback(adapter, UpdatingCallbackFacet.class);
            }
View Full Code Here

        }
        destroyObjectInPersistenceLayer(adapter);
    }

    private void destroyObjectInPersistenceLayer(final ObjectAdapter adapter) {
        getTransactionManager().executeWithinTransaction(new TransactionalClosureAbstract() {
            @Override
            public void preExecute() {
                CallbackUtils.callCallback(adapter, RemovingCallbackFacet.class);
            }
View Full Code Here

TOP

Related Classes of org.apache.isis.core.runtime.system.transaction.TransactionalClosureAbstract

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.