CtxInstructionContextValue.java

package com.mycim.valueobject.prp;

import com.mycim.framework.utils.lang.StringUtils;
import com.mycim.framework.utils.lang.math.NumberUtils;
import com.mycim.valueobject.consts.ContextNames;

public class CtxInstructionContextValue extends AbstractContextValue {

    private static final long serialVersionUID = 8469675185601650573L;

    public CtxInstructionContextValue() {
        this.setContextId(ContextNames.CTX_INSTRUCTION);
    }

    /**
     * @return the entityRrn
     */
    public Long getEntityRrn() {
        return NumberUtils.createLong(StringUtils.trimToNull(this.getContextKey5()));
    }

    /**
     * @param entityRrn the entityRrn to set
     */
    public void setEntityRrn(Long entityRrn) {
        if (entityRrn != null) {
            this.setContextKey5(entityRrn + "");
        }
    }

    /**
     * @return the lotRrn
     */
    @java.lang.Override
    public Long getLotRrn() {
        return NumberUtils.createLong(StringUtils.trimToNull(this.getContextKey6()));
    }

    /**
     * @param lotRrn the lotRrn to set
     */
    @java.lang.Override
    public void setLotRrn(Long lotRrn) {
        if (lotRrn != null) {
            this.setContextKey6(lotRrn + "");
        }
    }

    /**
     * @return the actionPoint
     */
    public String getActionPoint() {
        return this.getContextKey7();
    }

    /**
     * @param actionPoint the actionPoint to set
     */
    public void setActionPoint(String actionPoint) {
        if (actionPoint != null) {
            this.setContextKey7(actionPoint);
        }
    }

    /**
     * resultValue1
     *
     * @return the instruction
     */
    public String getInstruction() {
        return this.getResultValue1();
    }

    /**
     * @param instruction the instruction to set
     */
    public void setInstruction(String instruction) {
        instruction = StringUtils.trimToUpperCase(instruction);
        if (StringUtils.isNotBlank(instruction)) {
            this.setResultValue1(instruction);
        }
    }

    /**
     * resultValue2
     *
     * @return the verifyInstruction
     */
    public boolean getVerifyInstruction() {
        return StringUtils.equals("1", this.getResultValue2());
    }

    /**
     * resultValue2
     *
     * @param verifyInstruction
     */
    public void setVerifyInstruction(boolean verifyInstruction) {
        if (verifyInstruction) {
            this.setResultValue2("1");
        } else {
            this.setResultValue2("0");
        }
    }

    public String getRouteSeq() {
        return this.getContextKey8();
    }

    public void setRouteSeq(String routeSeq) {
        this.setContextKey8(routeSeq);
    }

    public void setOperationSeq(String operationSeq) {
        this.setContextKey9(operationSeq);
    }

    public String getOPerationSeq() {
        return this.getContextKey9();
    }

}