ErrorMsg.java

/*
 *        @ Copyright 2001 FA Software;
 *        All right reserved. No part of this program may be reproduced or
 *        transmitted in any form or by any means, electronic or
 *        mechanical, including photocopying, recording, or by any
 *        information storage or retrieval system without written
 *        permission from FA Software, except for inclusion of brief
 *        quotations in a review.
 */
package com.mycim.valueobject.bas;

public class ErrorMsg implements java.io.Serializable {

    // --------------------------------------------------------- Instance Variables
    private boolean error;

    private String errorMsg;

    private String eqpIds;

    private long errorCode;

    // --------------------------------------------------------- Constructor
    // default constructor
    public ErrorMsg() {
    }

    // --------------------------------------------------------- Properties
    public boolean getError() {
        return this.error;
    }

    public void setError(boolean error) {
        this.error = error;
    }

    public String getErrorMsg() {
        return this.errorMsg;
    }

    public void setErrorMsg(String errorMsg) {
        this.errorMsg = errorMsg;
    }

    public String getEqpIds() {
        return eqpIds;
    }

    public void setEqpIds(String eqpIds) {
        this.eqpIds = eqpIds;
    }

    public long getErrorCode() {
        return errorCode;
    }

    public void setErrorCode(long errorCode) {
        this.errorCode = errorCode;
    }

    public ErrorMsg setCode(long errorCode){
        this.errorCode = errorCode;
        return this;
    }

    public ErrorMsg setMsg(String errorMsg){
        this.errorMsg = errorMsg;
        return this;
    }

    public ErrorMsg allowExecute(long errorCode){
        this.error = false;
        this.errorCode = errorCode;
        return this;
    }
    public enum ErrorCodeEnum {
        SUCCESS(0), ERROR(-1), WARNING(1);

        private int code;

        private ErrorCodeEnum() {
        }

        private ErrorCodeEnum(int code) {
            this.code = code;
        }

        public int getCode() {
            return code;
        }

    }


}

/*
 * Modification Log Log No : Name : Modified Date: Description :
 */