Ejemplo n.º 1
0
  public DischargeSupplementaryNotesVo getSupplementary(CareContextRefVo voCareContextRefVo) {
    if (voCareContextRefVo == null)
      throw new CodingRuntimeException("voCareContextRefVo Filter not provided for list call. ");

    if (voCareContextRefVo != null) {
      DomainFactory factory = getDomainFactory();
      StringBuffer hql = new StringBuffer(" from DischargeSupplementaryNotes ds where ");
      String andStr = " ";

      ArrayList<String> markers = new ArrayList<String>();
      ArrayList<Serializable> values = new ArrayList<Serializable>();

      hql.append(andStr + " ds.careContext.id = :careContextId");
      markers.add("careContextId");
      values.add(voCareContextRefVo.getID_CareContext());
      andStr = " and ";

      List list = factory.find(hql.toString(), markers, values);
      if (list != null && list.size() > 0) {
        DischargeSupplementaryNotesVoCollection voColl =
            DischargeSupplementaryNotesVoAssembler
                .createDischargeSupplementaryNotesVoCollectionFromDischargeSupplementaryNotes(list);
        if (voColl != null && voColl.size() > 0) return voColl.get(0);
      }
    }
    return null;
  }
 public static DischargeSupplementaryNotesVoCollection buildFromBeanCollection(
     ims.clinical.vo.beans.DischargeSupplementaryNotesVoBean[] beans) {
   DischargeSupplementaryNotesVoCollection coll = new DischargeSupplementaryNotesVoCollection();
   if (beans == null) return coll;
   for (int x = 0; x < beans.length; x++) {
     coll.add(beans[x].buildVo());
   }
   return coll;
 }
 public static DischargeSupplementaryNotesVoCollection buildFromBeanCollection(
     java.util.Collection beans) {
   DischargeSupplementaryNotesVoCollection coll = new DischargeSupplementaryNotesVoCollection();
   if (beans == null) return coll;
   java.util.Iterator iter = beans.iterator();
   while (iter.hasNext()) {
     coll.add(((ims.clinical.vo.beans.DischargeSupplementaryNotesVoBean) iter.next()).buildVo());
   }
   return coll;
 }