/** * ************************************************************************ 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
/** * Get Measure Display Text * * @return Measure Display Text */ public String getXAxisText() { MMeasure measure = getMeasure(); if (measure != null && X_PA_Measure.MEASUREDATATYPE_StatusQtyAmount.equals(measure.getMeasureDataType())) { if (X_PA_Measure.MEASURETYPE_Request.equals(measure.getMeasureType())) return Msg.getElement(getCtx(), "R_Status_ID"); if (X_PA_Measure.MEASURETYPE_Project.equals(measure.getMeasureType())) return Msg.getElement(getCtx(), "C_Phase_ID"); } String value = getMeasureDisplay(); String display = MRefList.getListName(getCtx(), X_Ref_PA_Goal_Scope.AD_Reference_ID, value); return display == null ? value : display; } // getMeasureDisplayText
/** * Get Measure * * @return measure or null */ public MMeasure getMeasure() { if (getPA_Measure_ID() != 0) return MMeasure.get(getCtx(), getPA_Measure_ID()); return null; } // getMeasure