All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.dahuatech.icc.brm.enums.OperationLockEnum Maven / Gradle / Ivy

There is a newer version: 1.0.13.7
Show newest version
package com.dahuatech.icc.brm.enums;


/**
 * 操作权限锁枚举
 */
public enum OperationLockEnum {
    //增加
    ADD(1),
    //修改
    UPDATE(2),
    //删除
    DELETE(3),
    //添加设备
    ADD_DEVICE(4);

    private Integer code;

    private OperationLockEnum(Integer code){
        this.code = code;
    }

    public Integer getCode() {
        return code;
    }

    public void setCode(Integer code) {
        this.code = code;
    }

    public static OperationLockEnum forValue(String code) {
        if(code == null || code.length() == 0){
            return null;
        }
        for (OperationLockEnum typeEnum : OperationLockEnum.values()) {
            if (typeEnum.getCode().equals(code)) {
                return typeEnum;
            }
        }
        return null;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy