Examples of TransactionalClosureAbstract


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

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

        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

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

    }

    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

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

        // 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

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

    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

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

        // 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

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

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

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

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

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

        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

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

        if (adapter.isTransient()) {
            // NOT !adapter.isPersistent();
            // (value adapters are neither persistent or transient)
            underlyingFacet.remove(adapter, referencedAdapter);
        } else {
            getTransactionManager().executeWithinTransaction(new TransactionalClosureAbstract() {
                @Override
                public void execute() {
                    underlyingFacet.remove(adapter, referencedAdapter);
                }
            });
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.