/** * @param commentTask * @param session * @return * @throws PersistentException */ public boolean deleteAndDissociate( de.fhb.jproject.data.CommentTask commentTask, org.orm.PersistentSession session) throws PersistentException { try { de.fhb.jproject.data.Comment comment = commentTask.getComment(); if (commentTask.getComment() != null) { commentTask.getComment().setCommentTask(null); } commentTask.setComment(comment); if (commentTask.getTask() != null) { commentTask.getTask().commentTask.remove(commentTask); } try { session.delete(commentTask); return true; } catch (Exception e) { return false; } } catch (Exception e) { _logger.error("deleteAndDissociate()", e); throw new PersistentException(e); } }
public static BRADYSET getBRADYSETByORMID(PersistentSession session, int ID) { try { return (BRADYSET) session.get(tr.com.srdc.icardea.hibernate.BRADYSET.class, new Integer(ID)); } catch (Exception e) { _logger.error("getBRADYSETByORMID(PersistentSession session, int ID)", e); return null; } }
public static Medication getMedicationByORMID(PersistentSession session, int ID) { try { return (Medication) session.get(tr.com.srdc.icardea.hibernate.Medication.class, new Integer(ID)); } catch (Exception e) { _logger.error("getMedicationByORMID(PersistentSession session, int ID)", e); return null; } }
public static Medication loadMedicationByORMID( PersistentSession session, int ID, org.hibernate.LockMode lockMode) { try { return (Medication) session.load(tr.com.srdc.icardea.hibernate.Medication.class, new Integer(ID), lockMode); } catch (Exception e) { _logger.error( "loadMedicationByORMID(PersistentSession session, int ID, org.hibernate.LockMode lockMode)", e); return null; } }
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 boolean deleteAndDissociate(org.orm.PersistentSession session) { try { if (geteHRPHRData() != null) { geteHRPHRData().setMedication(null); } try { session.delete(this); return true; } catch (Exception e) { return false; } } catch (Exception e) { _logger.error("deleteAndDissociate(org.orm.PersistentSession session)", e); return false; } }
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 ConcernCriteria(PersistentSession session) { this(session.createCriteria(Concern.class)); }
public LEADCHNLMSMTCriteria(PersistentSession session) { this(session.createCriteria(LEADCHNLMSMT.class)); }
public TACHYTHERAPYSETCriteria(PersistentSession session) { this(session.createCriteria(TACHYTHERAPYSET.class)); }
public CAPCriteria(PersistentSession session) { this(session.createCriteria(CAP.class)); }
public SueldoCriteria(PersistentSession session) { this(session.createCriteria(Sueldo.class)); }