@Test public void testExecute() { List<Long> list = new ArrayList<Long>(Arrays.asList(GROUP_ID1)); list.add(new Long(GROUP_ID1)); List<DomainGroupModelView> results = mapper.execute(list); assertEquals(1, results.size()); assertEquals("E Group 1 Name", results.get(0).getName()); }
@Override public List<DomainGroupModelView> execute(final List<Long> inRequest) { List<Long> ids = inRequest; if (ids == null || ids.size() == 0) { return new ArrayList<DomainGroupModelView>(); } Criteria criteria = domainGroupQueryStrategy.getCriteria(getHibernateSession()); criteria.add(Restrictions.in("this.id", ids)); return criteria.list(); }
GetGroupsByIdsDbMapper extends BaseArgDomainMapper<List<Long>, List<DomainGroupModelView>> { @Override public List<DomainGroupModelView> execute(final List<Long> inRequest) { List<Long> ids = inRequest; if (ids == null || ids.size() == 0) { return new ArrayList<DomainGroupModelView>(); } Criteria criteria = domainGroupQueryStrategy.getCriteria(getHibernateSession()); criteria.add(Restrictions.in("this.id", ids)); return criteria.list(); } }
GetGroupsByIdsDbMapper extends BaseArgDomainMapper<List<Long>, List<DomainGroupModelView>> { @Override public List<DomainGroupModelView> execute(final List<Long> inRequest) { List<Long> ids = inRequest; if (ids == null || ids.size() == 0) { return new ArrayList<DomainGroupModelView>(); } Criteria criteria = domainGroupQueryStrategy.getCriteria(getHibernateSession()); criteria.add(Restrictions.in("this.id", ids)); return criteria.list(); } GetGroupsByIdsDbMapper(final DomainGroupQueryStrategy inDomainGroupQueryStrategy); }
GetGroupsByIdsDbMapper extends BaseArgDomainMapper<List<Long>, List<DomainGroupModelView>> { @Override public List<DomainGroupModelView> execute(final List<Long> inRequest) { List<Long> ids = inRequest; if (ids == null || ids.size() == 0) { return new ArrayList<DomainGroupModelView>(); } Criteria criteria = domainGroupQueryStrategy.getCriteria(getHibernateSession()); criteria.add(Restrictions.in("this.id", ids)); return criteria.list(); } GetGroupsByIdsDbMapper(final DomainGroupQueryStrategy inDomainGroupQueryStrategy); @Override List<DomainGroupModelView> execute(final List<Long> inRequest); }
GetGroupsByIdsDbMapper extends BaseArgDomainMapper<List<Long>, List<DomainGroupModelView>> { @Override public List<DomainGroupModelView> execute(final List<Long> inRequest) { List<Long> ids = inRequest; if (ids == null || ids.size() == 0) { return new ArrayList<DomainGroupModelView>(); } Criteria criteria = domainGroupQueryStrategy.getCriteria(getHibernateSession()); criteria.add(Restrictions.in("this.id", ids)); return criteria.list(); } GetGroupsByIdsDbMapper(final DomainGroupQueryStrategy inDomainGroupQueryStrategy); @Override List<DomainGroupModelView> execute(final List<Long> inRequest);  }