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

Examples of org.apache.isis.runtimes.dflt.runtime.persistence.objectstore.transaction.DestroyObjectCommand


        assertFalse(objectStore.hasInstances(spec));
    }

    @Test
    public void validatesDestroyObjectCommand() throws Exception {
        final DestroyObjectCommand command = objectStore.createDestroyObjectCommand(adapter);
        command.execute(transaction);
        assertFalse(objectStore.hasInstances(spec));
    }
View Full Code Here


            @Override
            public void execute() {
                if (adapter.getVersion() == null) {
                    throw new ObjectPersistenceException("Object to be deleted does not have a version (maybe it should be resolved first): " + adapter);
                }
                final DestroyObjectCommand command = objectStore.createDestroyObjectCommand(adapter);
                getTransactionManager().addCommand(command);
            }

            @Override
            public void onSuccess() {
View Full Code Here

    }

    @Override
    public DestroyObjectCommand createDestroyObjectCommand(final ObjectAdapter object) {
        actions.addElement("destroyObject " + object);
        return new DestroyObjectCommand() {

            @Override
            public void execute(final PersistenceCommandContext context) throws ObjectPersistenceException {
            }
View Full Code Here

        };
    }

    @Override
    public DestroyObjectCommand createDestroyObjectCommand(final ObjectAdapter object) {
        return new DestroyObjectCommand() {
            @Override
            public void execute(final PersistenceCommandContext context) {
                final DatabaseConnector connection = ((SqlExecutionContext) context).getConnection();
                LOG.debug("  destroy object " + object);
                final ObjectMapping mapping = objectMappingLookup.getMapping(object, connection);
View Full Code Here

        };
    }

    @Override
    public DestroyObjectCommand createDestroyObjectCommand(final ObjectAdapter object) {
        return new DestroyObjectCommand() {
            @Override
            public void execute(final PersistenceCommandContext context) {
                final DatabaseConnector connection = ((SqlExecutionContext) context).getConnection();
                LOG.debug("  destroy object " + object);
                final ObjectMapping mapping = objectMappingLookup.getMapping(object, connection);
View Full Code Here

        assertFalse(objectStore.hasInstances(spec));
    }

    @Test
    public void validatesDestroyObjectCommand() throws Exception {
        final DestroyObjectCommand command = objectStore.createDestroyObjectCommand(adapter);
        command.execute(transaction);
        assertFalse(objectStore.hasInstances(spec));
    }
View Full Code Here

    }

    @Override
    public DestroyObjectCommand createDestroyObjectCommand(final ObjectAdapter object) {
        actions.addElement("destroyObject " + object);
        return new DestroyObjectCommand() {

            @Override
            public void execute(final PersistenceCommandContext context) throws ObjectPersistenceException {
            }
View Full Code Here

            public void execute() {
                if (adapter.getVersion() == null) {
                    throw new ObjectPersistenceException(
                        "Object to be deleted does not have a version (maybe it should be resolved first): " + adapter);
                }
                final DestroyObjectCommand command = objectStore.createDestroyObjectCommand(adapter);
                getTransactionManager().addCommand(command);
            }

            @Override
            public void onSuccess() {
View Full Code Here

TOP

Related Classes of org.apache.isis.runtimes.dflt.runtime.persistence.objectstore.transaction.DestroyObjectCommand

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.