public List<InvestigationalNewDrug> findOrganizationHeldIND(String number, String nciCode) {
   HQLQuery q =
       new HQLQuery(
           "SELECT holder.investigationalNewDrug FROM gov.nih.nci.cabig.caaers.domain.OrganizationHeldIND holder");
   q.join("holder.investigationalNewDrug as ind");
   q.leftJoin("holder.organization as org");
   q.andWhere("org.nciInstituteCode = :nciCode and str(ind.indNumber) = :indNumber");
   return getHibernateTemplate()
       .findByNamedParam(
           q.getQueryString(),
           new String[] {"nciCode", "indNumber"},
           new String[] {nciCode, number});
 }
示例#2
0
 public List<T> findByIds(List<Integer> ids) {
   HQLQuery query =
       new HQLQuery("select o from " + domainClass().getName() + " o where id in (:ids)");
   query.setParameterList("ids", ids);
   return (List<T>) search(query);
 }