From 0dccde8a15f0541fdf6be715ee2c203a147b26bb Mon Sep 17 00:00:00 2001 From: danhaywood Date: Tue, 1 Oct 2019 13:02:16 +0100 Subject: [PATCH] #115 - adds query defns for OutboxEvent entity --- .../publishmq/dom/jdo/events/OutboxEvent.java | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/modules/spi/publishmq/impl/jdo/src/main/java/org/isisaddons/module/publishmq/dom/jdo/events/OutboxEvent.java b/modules/spi/publishmq/impl/jdo/src/main/java/org/isisaddons/module/publishmq/dom/jdo/events/OutboxEvent.java index 14c6ed912..92250223f 100644 --- a/modules/spi/publishmq/impl/jdo/src/main/java/org/isisaddons/module/publishmq/dom/jdo/events/OutboxEvent.java +++ b/modules/spi/publishmq/impl/jdo/src/main/java/org/isisaddons/module/publishmq/dom/jdo/events/OutboxEvent.java @@ -7,6 +7,20 @@ @javax.jdo.annotations.PersistenceCapable( schema = "isispublishmq", table="OutboxEvent") +@javax.jdo.annotations.Queries( { + @javax.jdo.annotations.Query( + name="findByTransactionIdAndSequence", language="JDOQL", + value="SELECT " + + "FROM org.isisaddons.module.publishmq.dom.jdo.events.OutboxEvent " + + "WHERE transactionId == :transactionId " + + "&& sequence == :sequence "), + @javax.jdo.annotations.Query( + name="findOldest", language="JDOQL", + value="SELECT " + + "FROM org.isisaddons.module.publishmq.dom.jdo.events.OutboxEvent " + + "ORDER BY timestamp ASC, transactionId ASC, sequence ASC " + + "RANGE 0,30") +}) @DomainObject( editing = Editing.DISABLED, objectType = "isispublishmq.OutboxEvent"