@Test public void testExecute() { getEntityManager().createQuery("UPDATE DomainGroup SET publicgroup = false WHERE id=4 OR id=5").executeUpdate(); GetAllPrivateGroupIdsDbMapper sut = new GetAllPrivateGroupIdsDbMapper(); sut.setEntityManager(getEntityManager()); List<Long> domainGroupIds = sut.execute(null); Assert.assertEquals(2, domainGroupIds.size()); Assert.assertTrue(domainGroupIds.contains(4L)); Assert.assertTrue(domainGroupIds.contains(5L)); }
@Override public List<Long> execute(final Serializable ignored) { return getEntityManager().createQuery("SELECT id FROM DomainGroup g WHERE g.publicGroup = false") .getResultList(); }
GetAllPrivateGroupIdsDbMapper extends ReadMapper<Serializable, List<Long>> { @Override public List<Long> execute(final Serializable ignored) { return getEntityManager().createQuery("SELECT id FROM DomainGroup g WHERE g.publicGroup = false") .getResultList(); } }
GetAllPrivateGroupIdsDbMapper extends ReadMapper<Serializable, List<Long>> { @Override public List<Long> execute(final Serializable ignored) { return getEntityManager().createQuery("SELECT id FROM DomainGroup g WHERE g.publicGroup = false") .getResultList(); }  }
GetAllPrivateGroupIdsDbMapper extends ReadMapper<Serializable, List<Long>> { @Override public List<Long> execute(final Serializable ignored) { return getEntityManager().createQuery("SELECT id FROM DomainGroup g WHERE g.publicGroup = false") .getResultList(); }  @Override List<Long> execute(final Serializable ignored); }
GetAllPrivateGroupIdsDbMapper extends ReadMapper<Serializable, List<Long>> { @Override public List<Long> execute(final Serializable ignored) { return getEntityManager().createQuery("SELECT id FROM DomainGroup g WHERE g.publicGroup = false") .getResultList(); }  @Override List<Long> execute(final Serializable ignored);  }