@Transient public boolean checkStatus(int newStatus) { return checkStatus(this.status, newStatus); }
/** * @param status int for status * @return true if status changed * @throws InvalidJobStateChangeException thrown for invalid state change */ @Transient public boolean setStatus(int status) throws InvalidJobStateChangeException { // If we are already in state, just return if (status == this.getStatus()) { return false; } if (!this.checkStatus(status)) { throw new InvalidJobStateChangeException("Invalid State Change from " + this.getStatusString(this.getStatus()) + " to " + this.getStatusString(status)); } this.status = status; return true; }
return true;//returns true because ending status is "newStatus", as requested checkStatus = LGJob.checkStatus(oldStatus, newStatus); if(checkStatus == false) { log.error("Invalid job state change from " + LGJob.getStatusString(oldStatus) + " to "