Пример #1
0
 /**
  * ************************************************************************ Update/save Goals for
  * the same measure
  *
  * @param force force to update goal (default once per day)
  * @return true if updated
  */
 public boolean updateGoal(boolean force) {
   log.config("Force=" + force);
   MMeasure measure = MMeasure.get(getCtx(), getPA_Measure_ID());
   if (force || getDateLastRun() == null || !TimeUtil.isSameHour(getDateLastRun(), null)) {
     if (measure.updateGoals()) // 	saves
     {
       load(get_ID(), get_Trx());
       return true;
     }
   }
   return false;
 } //	updateGoal
Пример #2
0
 /**
  * Get Measure
  *
  * @return measure or null
  */
 public MMeasure getMeasure() {
   if (getPA_Measure_ID() != 0) return MMeasure.get(getCtx(), getPA_Measure_ID());
   return null;
 } //	getMeasure