Examples of SaveObjectCommand


Examples of org.apache.isis.core.runtime.persistence.objectstore.transaction.SaveObjectCommand

    }

    @Ignore // DKH: refactor to use contract tests (see in-memory object store for basis)
    @Test
    public void validatesObjectStoreHasInstances() throws Exception {
        final SaveObjectCommand command = objectStore.createSaveObjectCommand(adapter1);
        objectStore.execute(Collections.<PersistenceCommand> singletonList(command));
        assertTrue(objectStore.hasInstances(specification));
    }
View Full Code Here

Examples of org.apache.isis.core.runtime.persistence.objectstore.transaction.SaveObjectCommand

    }

    @Ignore // DKH: refactor to use contract tests (see in-memory object store for basis)
    @Test
    public void validatesObjectStoreIfFixtureIsInstalled() throws Exception {
        final SaveObjectCommand command = objectStore.createSaveObjectCommand(adapter1);
        objectStore.execute(Collections.<PersistenceCommand> singletonList(command));
        objectStore.open();
        assertTrue(objectStore.isFixturesInstalled());
    }
View Full Code Here

Examples of org.apache.isis.core.runtime.persistence.objectstore.transaction.SaveObjectCommand

    }

    @Ignore // DKH: refactor to use contract tests (see in-memory object store for basis)
    @Test
    public void validatesObjectStoreGetObject() throws Exception {
        final SaveObjectCommand command = objectStore.createSaveObjectCommand(adapter1);
        objectStore.execute(Collections.<PersistenceCommand> singletonList(command));
        final ObjectAdapter retrievedAdapter = objectStore.loadInstanceAndAdapt((TypedOid) adapter1.getOid());
        assertTrue(retrievedAdapter.getOid().equals(adapter1.getOid()));
    }
View Full Code Here

Examples of org.apache.isis.core.runtime.persistence.objectstore.transaction.SaveObjectCommand

            }
        };
    }

    private SaveObjectCommand createSaveCommand(final ObjectAdapter object, final String name) {
        return new SaveObjectCommand() {
            @Override
            public void execute(final PersistenceCommandContext context) throws ObjectPersistenceException {
            }

            @Override
View Full Code Here

Examples of org.apache.isis.core.runtime.persistence.objectstore.transaction.SaveObjectCommand

            }
        };
    }

    private SaveObjectCommand createSaveCommandThatAborts(final ObjectAdapter object, final String name) {
        return new SaveObjectCommand() {
            @Override
            public void execute(final PersistenceCommandContext context) throws ObjectPersistenceException {
                throw new ObjectPersistenceException();
            }
View Full Code Here

Examples of org.apache.isis.core.runtime.persistence.objectstore.transaction.SaveObjectCommand

                CallbackUtils.callCallback(adapter, UpdatingCallbackFacet.class);
            }

            @Override
            public void execute() {
                final SaveObjectCommand saveObjectCommand = objectStore.createSaveObjectCommand(adapter);
                getTransactionManager().addCommand(saveObjectCommand);
            }

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

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

        assertFalse(objectStore.hasInstances(spec));
    }

    @Test
    public void validatesSaveObjectCommand() throws Exception {
        final SaveObjectCommand command = objectStore.createSaveObjectCommand(adapter);
        command.execute(transaction);
        assertTrue(objectStore.hasInstances(spec));
    }
View Full Code Here

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

        assertTrue(objectStore.hasInstances(spec));
    }

    @Test
    public void validatesGettingObjectStoreInstances() throws Exception {
        final SaveObjectCommand command = objectStore.createSaveObjectCommand(adapter);
        objectStore.execute(Collections.<PersistenceCommand> singletonList(command));
        final ObjectAdapter[] array = objectStore.getInstances(persistenceHelper);
        assertTrue(array.length == 1);
    }
View Full Code Here

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

        assertTrue(objectStore.name().equals("XML"));
    }

    @Test
    public void validatesObjectStoreHasInstances() throws Exception {
        final SaveObjectCommand command = objectStore.createSaveObjectCommand(adapter);
        objectStore.execute(Collections.<PersistenceCommand> singletonList(command));
        assertTrue(objectStore.hasInstances(spec));
    }
View Full Code Here

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

        assertTrue(objectStore.hasInstances(spec));
    }

    @Test
    public void validatesObjectStoreIfFixtureIsInstalled() throws Exception {
        final SaveObjectCommand command = objectStore.createSaveObjectCommand(adapter);
        objectStore.execute(Collections.<PersistenceCommand> singletonList(command));
        objectStore.open();
        assertTrue(objectStore.isFixturesInstalled());
    }
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.