Skip to content

Commit

Permalink
HSEARCH-4283 Use OE#ENTITY_NAME in the SQL
Browse files Browse the repository at this point in the history
  • Loading branch information
fax4ever committed Jan 4, 2022
1 parent 4b65d86 commit cac828b
Showing 1 changed file with 5 additions and 3 deletions.
Expand Up @@ -6,6 +6,8 @@
*/
package org.hibernate.search.mapper.orm.coordination.outboxpolling.mapping.impl;

import static org.hibernate.search.mapper.orm.coordination.outboxpolling.event.impl.OutboxPollingOutboxEventAdditionalJaxbMappingProducer.ENTITY_NAME;

import java.lang.invoke.MethodHandles;
import java.util.Set;
import java.util.concurrent.atomic.AtomicInteger;
Expand All @@ -27,9 +29,9 @@ public class OutboxPollingSearchMappingImpl implements OutboxPollingSearchMappin

private static final Log log = LoggerFactory.make( Log.class, MethodHandles.lookup() );

private static final String COUNT_EVENTS_WITH_STATUS = "select count(e) from OutboxEvent e where e.status = :status";
private static final String UPDATE_EVENTS_WITH_STATUS = "update OutboxEvent e set e.status = :newStatus where e.status = :status";
private static final String DELETE_EVENTS_WITH_STATUS = "delete OutboxEvent e where e.status = :status";
private static final String COUNT_EVENTS_WITH_STATUS = "select count(e) from " + ENTITY_NAME + " e where e.status = :status";
private static final String UPDATE_EVENTS_WITH_STATUS = "update " + ENTITY_NAME + " e set e.status = :newStatus where e.status = :status";
private static final String DELETE_EVENTS_WITH_STATUS = "delete " + ENTITY_NAME + " e where e.status = :status";

private final TransactionHelper transactionHelper;
private final SessionFactoryImplementor sessionFactory;
Expand Down

0 comments on commit cac828b

Please sign in to comment.