RecipeParameterContextValue.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 RecipeParameterContextValue extends ContextValue {

    private static final long serialVersionUID = 1L;

    public RecipeParameterContextValue() {
        this.setContextId(ContextNames.RECIPE_PARAMETER_CONTEXT);
    }

    /**
     * @param contextRrn
     */
    public RecipeParameterContextValue(long contextRrn) {
        super(contextRrn);
    }

    /**
     * @return the productRrn
     */
    public Long getProductRrn() {
        return NumberUtils.createLong(StringUtils.trimToNull(this.getContextKey1()));
    }

    /**
     * @param productRrn the productRrn to set
     */
    public void setProductRrn(Long productRrn) {
        if (productRrn != null) {
            this.setContextKey1(productRrn.toString());
        } else {
            this.setContextKey1(" ");
        }
    }

    /**
     * @return the processRrn
     */
    public Long getProcessRrn() {
        return NumberUtils.createLong(StringUtils.trimToNull(this.getContextKey2()));
    }

    /**
     * @param processRrn the processRrn to set
     */
    public void setProcessRrn(Long processRrn) {
        if (processRrn != null) {
            this.setContextKey2(processRrn.toString());
        } else {
            this.setContextKey2(" ");
        }
    }

    public Integer getProcessVersion() {
        return NumberUtils.toInt(StringUtils.trimToNull(this.getContextKey3()));
    }

    public void setProcessVersion(Integer version) {
        if (version != null) {
            this.setContextKey3(version.toString());
        } else {
            this.setContextKey3(" ");
        }
    }

    /**
     * @return the routeRrn
     */
    public Long getRouteRrn() {
        return NumberUtils.createLong(StringUtils.trimToNull(this.getContextKey4()));
    }

    /**
     * @param routeRrn the routeRrn to set
     */
    public void setRouteRrn(Long routeRrn) {
        if (routeRrn != null) {
            this.setContextKey4(routeRrn.toString());
        } else {
            this.setContextKey4(" ");
        }
    }

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

    /**
     * @param operationRrn the operationRrn to set
     */
    public void setOperationRrn(Long operationRrn) {
        if (operationRrn != null) {
            this.setContextKey5(operationRrn.toString());
        } else {
            this.setContextKey5(" ");
        }
    }

    public String getRouteSeq() {
        return StringUtils.trimToNull(this.getContextKey6());
    }

    public void setRouteSeq(String routeSeq) {
        if (StringUtils.isNotBlank(routeSeq)) {
            this.setContextKey6(routeSeq);
        } else {
            this.setContextKey6(" ");
        }
    }

    public String getOperationSeq() {
        return StringUtils.trimToNull(this.getContextKey7());
    }

    public void setOperationSeq(String operationSeq) {
        if (StringUtils.isNotBlank(operationSeq)) {
            this.setContextKey7(operationSeq);
        } else {
            this.setContextKey7(" ");
        }
    }

    public String getRecipeParameter() {
        return StringUtils.trimToNull(this.getResultValue1());
    }

    public void setRecipeParameter(String RecipeParameter) {
        if (StringUtils.isNotBlank(RecipeParameter)) {
            this.setResultValue1(RecipeParameter);
        } else {
            this.setResultValue1(" ");
        }
    }

}