@Test public void execute() { final long entityId = 42L; List<FeedSubscriber> feedSubs = getFeeds.execute( new GetFeedSubscriberRequest(0L, entityId, EntityType.PERSON, 0)); assertEquals(4, feedSubs.size()); sut.execute(new FindByIdRequest("FeedSubscriber", 1L)); List<FeedSubscriber> feedSubs2 = getFeeds.execute( new GetFeedSubscriberRequest(0L, entityId, EntityType.PERSON, 0)); assertEquals(3, feedSubs2.size()); assertEquals(2L, feedSubs2.get(0).getId()); assertEquals(3L, feedSubs2.get(1).getId()); assertEquals(4L, feedSubs2.get(2).getId()); }
public Boolean execute(final FindByIdRequest inRequest) { Query q = getEntityManager().createQuery( "DELETE from " + inRequest.getEntityName() + " where id = :domainEntityId"); q.setParameter("domainEntityId", inRequest.getEntityId()); q.executeUpdate(); return Boolean.TRUE; }
DeleteByIdMapper extends BaseArgDomainMapper<FindByIdRequest, Boolean> { public Boolean execute(final FindByIdRequest inRequest) { Query q = getEntityManager().createQuery( "DELETE from " + inRequest.getEntityName() + " where id = :domainEntityId"); q.setParameter("domainEntityId", inRequest.getEntityId()); q.executeUpdate(); return Boolean.TRUE; } }
DeleteByIdMapper extends BaseArgDomainMapper<FindByIdRequest, Boolean> { public Boolean execute(final FindByIdRequest inRequest) { Query q = getEntityManager().createQuery( "DELETE from " + inRequest.getEntityName() + " where id = :domainEntityId"); q.setParameter("domainEntityId", inRequest.getEntityId()); q.executeUpdate(); return Boolean.TRUE; }  }
DeleteByIdMapper extends BaseArgDomainMapper<FindByIdRequest, Boolean> { public Boolean execute(final FindByIdRequest inRequest) { Query q = getEntityManager().createQuery( "DELETE from " + inRequest.getEntityName() + " where id = :domainEntityId"); q.setParameter("domainEntityId", inRequest.getEntityId()); q.executeUpdate(); return Boolean.TRUE; }  Boolean execute(final FindByIdRequest inRequest); }
DeleteByIdMapper extends BaseArgDomainMapper<FindByIdRequest, Boolean> { public Boolean execute(final FindByIdRequest inRequest) { Query q = getEntityManager().createQuery( "DELETE from " + inRequest.getEntityName() + " where id = :domainEntityId"); q.setParameter("domainEntityId", inRequest.getEntityId()); q.executeUpdate(); return Boolean.TRUE; }  Boolean execute(final FindByIdRequest inRequest);  }