コード例 #1
0
 /** {@inheritDoc}} */
 public boolean saveAllPurposeItem(AssignmentAllPurposeItem nItem) {
   try {
     getHibernateTemplate().saveOrUpdate(nItem);
     return true;
   } catch (DataAccessException e) {
     e.printStackTrace();
     Log.warn(
         this
             + ".saveAllPurposeItem() Hibernate could not save private AllPurpose for assignment "
             + nItem.getAssignmentId());
     return false;
   }
 }
コード例 #2
0
  /** {@inheritDoc}} */
  public boolean removeAllPurposeItem(AssignmentAllPurposeItem mItem) {

    try {
      getHibernateTemplate().delete(mItem);
      return true;
    } catch (DataAccessException e) {
      e.printStackTrace();
      Log.warn(
          this
              + ".removeAllPurposeItem() Hibernate could not delete AllPurposeItem for assignment "
              + mItem.getAssignmentId());
      return false;
    }
  }