Examples of AssociationValueEntry


Examples of org.axonframework.saga.repository.jpa.AssociationValueEntry

    @Test
    public void testLoadUncachedSaga_ByAssociationValue() {
        String identifier = UUID.randomUUID().toString();
        StubSaga saga = new StubSaga(identifier);
        entityManager.persist(new SagaEntry(saga, serializer));
        entityManager.persist(new AssociationValueEntry(serializer.typeForClass(saga.getClass()).getName(),
                                                        identifier, new AssociationValue("key", "value")));
        entityManager.flush();
        entityManager.clear();
        Set<String> loaded = repository.find(StubSaga.class, new AssociationValue("key", "value"));
        assertEquals(1, loaded.size());
View Full Code Here

Examples of org.axonframework.saga.repository.jpa.AssociationValueEntry

    public void testLoadSaga_AssociationValueRemoved() {
        String identifier = UUID.randomUUID().toString();
        StubSaga saga = new StubSaga(identifier);
        saga.registerAssociationValue(new AssociationValue("key", "value"));
        entityManager.persist(new SagaEntry(saga, serializer));
        entityManager.persist(new AssociationValueEntry(serializer.typeForClass(saga.getClass()).getName(),
                                                        identifier, new AssociationValue("key", "value")));
        entityManager.flush();
        entityManager.clear();
        StubSaga loaded = (StubSaga) repository.load(identifier);
        loaded.removeAssociationValue("key", "value");
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.