Package org.axonframework.eventstore.jpa

Examples of org.axonframework.eventstore.jpa.DomainEventEntry


                                                                                     MetaData.emptyInstance());

        SerializedObject<byte[]> payload = serializer.serialize(message.getPayload(), byte[].class);
        SerializedObject<byte[]> metaData = serializer.serialize(message.getMetaData(), byte[].class);

        SerializedDomainEventData data = new DomainEventEntry("Object", message, payload, metaData);

        SerializedDomainEventMessage<String> sdem = new SerializedDomainEventMessage<String>(data, serializer);

        assertEquals(sdem.getIdentifier(),
                     sdem.withMetaData(Collections.singletonMap("Key1", "Value1")).getIdentifier());
View Full Code Here


        template.execute(new TransactionCallbackWithoutResult() {
            @Override
            protected void doInTransactionWithoutResult(
                    TransactionStatus status) {
                DomainEventMessage firstEvent = aggregate2.getUncommittedEvents().next();
                entityManager.persist(new DomainEventEntry("type",
                                                           new GenericDomainEventMessage(
                                                                   "a",
                                                                   new DateTime(),
                                                                   "someValue",
                                                                   0,
                                                                   "",
                                                                   MetaData.emptyInstance()),
                                                           emptySerializedObject,
                                                           emptySerializedObject));
            }
        });
        template.execute(new TransactionCallbackWithoutResult() {
            @Override
            protected void doInTransactionWithoutResult(
                    TransactionStatus status) {
                entityManager.persist(new DomainEventEntry("type",
                                                           new GenericDomainEventMessage(
                                                                   "a",
                                                                   new DateTime(),
                                                                   "anotherValue",
                                                                   0,
View Full Code Here

        reset(eventEntryStore);
        GenericDomainEventMessage<String> eventMessage = new GenericDomainEventMessage<String>(
                UUID.randomUUID(), 0L, "Mock contents", MetaData.emptyInstance());
        when(eventEntryStore.fetchAggregateStream(anyString(), any(), anyInt(), anyInt()))
                .thenReturn(new ArrayList(Arrays.asList(new DomainEventEntry(
                        "Mock", eventMessage,
                        mockSerializedObject("Mock contents".getBytes()),
                        mockSerializedObject("Mock contents".getBytes())))).iterator());
        when(eventEntryStore.loadLastSnapshotEvent(anyString(), any()))
                .thenReturn(null);
View Full Code Here

TOP

Related Classes of org.axonframework.eventstore.jpa.DomainEventEntry

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.