@Test public void testExecuteAllOrgsAndMixedPublicPrivateGroups() { getEntityManager().createQuery("UPDATE DomainGroup set publicGroup=false WHERE id IN(3,5,7)").executeUpdate(); final Set<Long> groupIds = sut.execute(null); assertEquals(3, groupIds.size()); assertTrue(groupIds.contains(3L)); assertTrue(groupIds.contains(5L)); assertTrue(groupIds.contains(7L)); }
@Override @SuppressWarnings("unchecked") public Set<Long> execute(final Serializable ignored) { HashSet<Long> groupIds = new HashSet<Long>(); Query q = getEntityManager().createQuery("SELECT id FROM DomainGroup WHERE publicGroup = false"); groupIds.addAll(q.getResultList()); return groupIds; }
GetPrivateGroupIds extends ReadMapper<Serializable, Set<Long>> { @Override @SuppressWarnings("unchecked") public Set<Long> execute(final Serializable ignored) { HashSet<Long> groupIds = new HashSet<Long>(); Query q = getEntityManager().createQuery("SELECT id FROM DomainGroup WHERE publicGroup = false"); groupIds.addAll(q.getResultList()); return groupIds; } }
GetPrivateGroupIds extends ReadMapper<Serializable, Set<Long>> { @Override @SuppressWarnings("unchecked") public Set<Long> execute(final Serializable ignored) { HashSet<Long> groupIds = new HashSet<Long>(); Query q = getEntityManager().createQuery("SELECT id FROM DomainGroup WHERE publicGroup = false"); groupIds.addAll(q.getResultList()); return groupIds; }  }
GetPrivateGroupIds extends ReadMapper<Serializable, Set<Long>> { @Override @SuppressWarnings("unchecked") public Set<Long> execute(final Serializable ignored) { HashSet<Long> groupIds = new HashSet<Long>(); Query q = getEntityManager().createQuery("SELECT id FROM DomainGroup WHERE publicGroup = false"); groupIds.addAll(q.getResultList()); return groupIds; }  @Override @SuppressWarnings("unchecked") Set<Long> execute(final Serializable ignored); }
GetPrivateGroupIds extends ReadMapper<Serializable, Set<Long>> { @Override @SuppressWarnings("unchecked") public Set<Long> execute(final Serializable ignored) { HashSet<Long> groupIds = new HashSet<Long>(); Query q = getEntityManager().createQuery("SELECT id FROM DomainGroup WHERE publicGroup = false"); groupIds.addAll(q.getResultList()); return groupIds; }  @Override @SuppressWarnings("unchecked") Set<Long> execute(final Serializable ignored);  }