コード例 #1
0
  /**
   * @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);
    }
  }
コード例 #2
0
ファイル: BRADYSET.java プロジェクト: coderunner4/icardea
 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;
   }
 }
コード例 #3
0
ファイル: Medication.java プロジェクト: coderunner4/icardea
 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;
   }
 }
コード例 #4
0
ファイル: Medication.java プロジェクト: coderunner4/icardea
 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;
   }
 }
コード例 #5
0
ファイル: BRADYSET.java プロジェクト: coderunner4/icardea
 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;
   }
 }
コード例 #6
0
ファイル: BRADYSET.java プロジェクト: coderunner4/icardea
 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;
   }
 }
コード例 #7
0
 /**
  * @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);
   }
 }
コード例 #8
0
 /**
  * @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);
   }
 }
コード例 #9
0
ファイル: Medication.java プロジェクト: coderunner4/icardea
  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;
    }
  }
コード例 #10
0
ファイル: Medication.java プロジェクト: coderunner4/icardea
 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;
   }
 }
コード例 #11
0
ファイル: Medication.java プロジェクト: coderunner4/icardea
 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;
   }
 }
コード例 #12
0
 public ConcernCriteria(PersistentSession session) {
   this(session.createCriteria(Concern.class));
 }
コード例 #13
0
 public LEADCHNLMSMTCriteria(PersistentSession session) {
   this(session.createCriteria(LEADCHNLMSMT.class));
 }
コード例 #14
0
 public TACHYTHERAPYSETCriteria(PersistentSession session) {
   this(session.createCriteria(TACHYTHERAPYSET.class));
 }
コード例 #15
0
ファイル: CAPCriteria.java プロジェクト: coderunner4/icardea
 public CAPCriteria(PersistentSession session) {
   this(session.createCriteria(CAP.class));
 }
コード例 #16
0
 public SueldoCriteria(PersistentSession session) {
   this(session.createCriteria(Sueldo.class));
 }