コード例 #1
0
  public CreditCourseWiseForm get(int typeID, int relationID) throws CreditCourseWiseSysException {
    String hql =
        "from CreditCourseWiseModel as ccwm"
            + " where ccwm.comp_id.typeid="
            + typeID
            + "and  ccwm.comp_id.relationid="
            + relationID;
    List modelList = null;
    List list = new ArrayList();
    CreditCourseWiseForm ccwf = new CreditCourseWiseForm();

    try {
      modelList = HibernateDAO.find(hql);

      if ((modelList != null) && (modelList.size() > 0)) {
        list = getFormList(modelList);
        ccwf = (CreditCourseWiseForm) list.get(0);
      } else {
        return null;
      }
    } catch (ULMSSysException ee) {
      ee.printStackTrace();
    }

    return ccwf; // To change body of implemented methods use File | Settings | File Templates. //To
                 // change body of implemented methods use File | Settings | File Templates.
  }
コード例 #2
0
  public void update(CreditCourseWiseForm ccwf) throws CreditCourseWiseSysException {
    try {
      HibernateDAO.saveOrUpdateCopy(ccwf.getCreditCourseWiseModel());
    } catch (ULMSSysException ese) {
      ese.printStackTrace();
    }

    // To change body of implemented methods use File | Settings | File Templates.
  }
コード例 #3
0
  public void delete(int typeID, int relationID) throws CreditCourseWiseSysException {
    String hql =
        "from CreditCourseWiseModel as ccwm"
            + " where ccwm.comp_id.typeid="
            + typeID
            + " and ccwm.comp_id.relationid="
            + relationID;

    try {
      HibernateDAO.delete(hql);
    } catch (ULMSSysException ese) {
      ese.printStackTrace();
    }

    // To change body of implemented methods use File | Settings | File Templates.
  }
コード例 #4
0
  public List getAll() throws CreditCourseWiseSysException {
    String hql = "from CreditCourseWiseModel";
    List modelList = null;
    List list = new ArrayList();

    try {
      modelList = HibernateDAO.find(hql);

      if ((modelList != null) && (modelList.size() > 0)) {
        list = getFormList(modelList);
      } else {
        return null;
      }
    } catch (ULMSSysException ee) {
      ee.printStackTrace();
    }

    return list;
  }