Package org.apache.isis.runtimes.dflt.runtime.transaction

Examples of org.apache.isis.runtimes.dflt.runtime.transaction.TransactionalClosureAbstract


        final IdentityData identityData = encoderDecoder.encodeIdentityData(object);
        reloadFromPersistenceLayer(identityData);
    }

    private void reloadFromPersistenceLayer(final IdentityData identityData) {
        getTransactionManager().executeWithinTransaction(new TransactionalClosureAbstract() {
            @Override
            public void execute() {
                final ResolveObjectRequest request = new ResolveObjectRequest(getAuthenticationSession(), identityData);
                final ResolveObjectResponse response = serverFacade.resolveImmediately(request);
                final ObjectData update = response.getObjectData();
View Full Code Here


        resolveImmediatelyFromPersistenceLayer(adapter);
    }

    private void resolveImmediatelyFromPersistenceLayer(final ObjectAdapter adapter) {
        final IdentityData adapterData = encoderDecoder.encodeIdentityData(adapter);
        getTransactionManager().executeWithinTransaction(new TransactionalClosureAbstract() {
            @Override
            public void execute() {
                final ResolveObjectRequest request = new ResolveObjectRequest(getAuthenticationSession(), adapterData);
                // unlike the server-side implementation we don't invoke the
                // callbacks
View Full Code Here

    }

    private void resolveFieldFromPersistenceLayer(final ObjectAdapter adapter, final ObjectAssociation field) {
        final IdentityData adapterData = encoderDecoder.encodeIdentityData(adapter);
        final String fieldId = field.getId();
        getTransactionManager().executeWithinTransaction(new TransactionalClosureAbstract() {
            @Override
            public void execute() {
                final ResolveFieldRequest request = new ResolveFieldRequest(getAuthenticationSession(), adapterData, fieldId);
                final ResolveFieldResponse response = serverFacade.resolveField(request);
                final Data data = response.getData();
View Full Code Here

        // TODO: the PSOS has more checks; should we do the same?
        makePersistentInPersistenceLayer(object);
    }

    protected void makePersistentInPersistenceLayer(final ObjectAdapter object) {
        getTransactionManager().executeWithinTransaction(new TransactionalClosureAbstract() {
            @Override
            public void execute() {

                // the two implementations (proxy vs object store) vary here.
                // the object store does not make this call directly, it
View Full Code Here

    private void addObjectChangedToPresentationLayer(final ObjectAdapter adapter) {
        getUpdateNotifier().addChangedObject(adapter);
    }

    private void addObjectChangedToPersistenceLayer(final ObjectAdapter adapter) {
        getTransactionManager().executeWithinTransaction(new TransactionalClosureAbstract() {
            @Override
            public void execute() {
                getTransactionManager().addObjectChanged(adapter);
            }
        });
View Full Code Here

        // TODO need to do garbage collection instead
        // Isis.getObjectLoader().unloaded(object);
    }

    protected void destroyObjectInPersistenceLayer(final ObjectAdapter object) {
        getTransactionManager().executeWithinTransaction(new TransactionalClosureAbstract() {
            @Override
            public void execute() {
                getTransactionManager().addDestroyObject(object);
            }
        });
View Full Code Here

        final IdentityData identityData = encoderDecoder.encodeIdentityData(object);
        reloadFromPersistenceLayer(identityData);
    }

    private void reloadFromPersistenceLayer(final IdentityData identityData) {
        getTransactionManager().executeWithinTransaction(new TransactionalClosureAbstract() {
            @Override
            public void execute() {
                final ResolveObjectRequest request = new ResolveObjectRequest(getAuthenticationSession(), identityData);
                final ResolveObjectResponse response = serverFacade.resolveImmediately(request);
                final ObjectData update = response.getObjectData();
View Full Code Here

        resolveImmediatelyFromPersistenceLayer(adapter);
    }

    private void resolveImmediatelyFromPersistenceLayer(final ObjectAdapter adapter) {
        final IdentityData adapterData = encoderDecoder.encodeIdentityData(adapter);
        getTransactionManager().executeWithinTransaction(new TransactionalClosureAbstract() {
            @Override
            public void execute() {
                final ResolveObjectRequest request = new ResolveObjectRequest(getAuthenticationSession(), adapterData);
                // unlike the server-side implementation we don't invoke the callbacks
                // for loading and loaded (they will already have been called in the server)
View Full Code Here

    }

    private void resolveFieldFromPersistenceLayer(final ObjectAdapter adapter, final ObjectAssociation field) {
        final IdentityData adapterData = encoderDecoder.encodeIdentityData(adapter);
        final String fieldId = field.getId();
        getTransactionManager().executeWithinTransaction(new TransactionalClosureAbstract() {
            @Override
            public void execute() {
                final ResolveFieldRequest request =
                    new ResolveFieldRequest(getAuthenticationSession(), adapterData, fieldId);
                final ResolveFieldResponse response = serverFacade.resolveField(request);
View Full Code Here

        // TODO: the PSOS has more checks; should we do the same?
        makePersistentInPersistenceLayer(object);
    }

    protected void makePersistentInPersistenceLayer(final ObjectAdapter object) {
        getTransactionManager().executeWithinTransaction(new TransactionalClosureAbstract() {
            @Override
            public void execute() {

                // the two implementations (proxy vs object store) vary here.
                // the object store does not make this call directly, it
View Full Code Here

TOP

Related Classes of org.apache.isis.runtimes.dflt.runtime.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.