public static java.util.Iterator iterateBRADYSETByQuery( PersistentSession session, String condition, String orderBy) { StringBuffer sb = new StringBuffer("From tr.com.srdc.icardea.hibernate.BRADYSET as BRADYSET"); if (condition != null) sb.append(" Where ").append(condition); if (orderBy != null) sb.append(" Order By ").append(orderBy); try { Query query = session.createQuery(sb.toString()); return query.iterate(); } catch (Exception e) { _logger.error( "iterateBRADYSETByQuery(PersistentSession session, String condition, String orderBy)", e); return null; } }
public static BRADYSET[] listBRADYSETByQuery( PersistentSession session, String condition, String orderBy) { StringBuffer sb = new StringBuffer("From tr.com.srdc.icardea.hibernate.BRADYSET as BRADYSET"); if (condition != null) sb.append(" Where ").append(condition); if (orderBy != null) sb.append(" Order By ").append(orderBy); try { Query query = session.createQuery(sb.toString()); List list = query.list(); return (BRADYSET[]) list.toArray(new BRADYSET[list.size()]); } catch (Exception e) { _logger.error( "listBRADYSETByQuery(PersistentSession session, String condition, String orderBy)", e); return null; } }
/** * @param session * @param condition * @param orderBy * @return * @throws PersistentException */ public CommentTask[] listCommentTaskByQuery( PersistentSession session, String condition, String orderBy) throws PersistentException { StringBuffer sb = new StringBuffer("From de.fhb.jproject.data.CommentTask as CommentTask"); if (condition != null) sb.append(" Where ").append(condition); if (orderBy != null) sb.append(" Order By ").append(orderBy); try { Query query = session.createQuery(sb.toString()); List list = query.list(); return (CommentTask[]) list.toArray(new CommentTask[list.size()]); } catch (Exception e) { _logger.error( "listCommentTaskByQuery(PersistentSession session, String condition, String orderBy)", e); throw new PersistentException(e); } }
/** * @param session * @param condition * @param orderBy * @return * @throws PersistentException */ public static java.util.Iterator iterateCommentTaskByQuery( PersistentSession session, String condition, String orderBy) throws PersistentException { StringBuffer sb = new StringBuffer("From de.fhb.jproject.data.CommentTask as CommentTask"); if (condition != null) sb.append(" Where ").append(condition); if (orderBy != null) sb.append(" Order By ").append(orderBy); try { Query query = session.createQuery(sb.toString()); return query.iterate(); } catch (Exception e) { _logger.error( "iterateCommentTaskByQuery(PersistentSession session, String condition, String orderBy)", e); throw new PersistentException(e); } }
public static java.util.Iterator iterateMedicationByQuery( PersistentSession session, String condition, String orderBy, org.hibernate.LockMode lockMode) { StringBuffer sb = new StringBuffer("From tr.com.srdc.icardea.hibernate.Medication as Medication"); if (condition != null) sb.append(" Where ").append(condition); if (orderBy != null) sb.append(" Order By ").append(orderBy); try { Query query = session.createQuery(sb.toString()); query.setLockMode("this", lockMode); return query.iterate(); } catch (Exception e) { _logger.error( "iterateMedicationByQuery(PersistentSession session, String condition, String orderBy)", e); return null; } }
public static Medication[] listMedicationByQuery( PersistentSession session, String condition, String orderBy, org.hibernate.LockMode lockMode) { StringBuffer sb = new StringBuffer("From tr.com.srdc.icardea.hibernate.Medication as Medication"); if (condition != null) sb.append(" Where ").append(condition); if (orderBy != null) sb.append(" Order By ").append(orderBy); try { Query query = session.createQuery(sb.toString()); query.setLockMode("this", lockMode); List list = query.list(); return (Medication[]) list.toArray(new Medication[list.size()]); } catch (Exception e) { _logger.error( "listMedicationByQuery(PersistentSession session, String condition, String orderBy)", e); return null; } }
public String toString(boolean idOnly) { if (idOnly) { return String.valueOf(getID()); } else { StringBuffer sb = new StringBuffer(); sb.append("Medication[ "); sb.append("ID=").append(getID()).append(" "); sb.append("CareProvisionCode=").append(getCareProvisionCode()).append(" "); sb.append("Text=").append(getText()).append(" "); sb.append("EffectiveTime=").append(getEffectiveTime()).append(" "); sb.append("RouteCode=").append(getRouteCode()).append(" "); sb.append("ApproachSiteCode=").append(getApproachSiteCode()).append(" "); sb.append("DoseQuantity=").append(getDoseQuantity()).append(" "); sb.append("DrugCode=").append(getDrugCode()).append(" "); sb.append("DrugCodeSystem=").append(getDrugCodeSystem()).append(" "); if (geteHRPHRData() != null) sb.append("eHRPHRData.Persist_ID=").append(geteHRPHRData().toString(true)).append(" "); else sb.append("eHRPHRData=null "); sb.append("EffectiveTimeHigh=").append(getEffectiveTimeHigh()).append(" "); sb.append("]"); return sb.toString(); } }
public String toString(boolean idOnly) { if (idOnly) { return String.valueOf(getID()); } else { StringBuffer sb = new StringBuffer(); sb.append("BRADYSET[ "); sb.append("ID=").append(getID()).append(" "); if (getsET() != null) sb.append("sET.Persist_ID=").append(getsET().toString(true)).append(" "); else sb.append("sET=null "); sb.append("Mode=").append(getMode()).append(" "); sb.append("Vendor_mode=").append(getVendor_mode()).append(" "); sb.append("Lowrate=").append(getLowrate()).append(" "); sb.append("Hystrate=").append(getHystrate()).append(" "); sb.append("Night_rate=").append(getNight_rate()).append(" "); sb.append("Sensor_type=").append(getSensor_type()).append(" "); sb.append("Max_tracking_rate=").append(getMax_tracking_rate()).append(" "); sb.append("Max_sensor_rate=").append(getMax_sensor_rate()).append(" "); sb.append("Sav_delay_high=").append(getSav_delay_high()).append(" "); sb.append("Sav_delay_low=").append(getSav_delay_low()).append(" "); sb.append("Pav_delay_high=").append(getPav_delay_high()).append(" "); sb.append("Pav_delay_low=").append(getPav_delay_low()).append(" "); sb.append("At_mode_switch_mode=").append(getAt_mode_switch_mode()).append(" "); sb.append("At_mode_switch_rate=").append(getAt_mode_switch_rate()).append(" "); sb.append("]"); return sb.toString(); } }