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

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

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

public enum LockEnum {
    //状态
    UNLOCK(0, "解锁"),
    LOCK(1, "锁定");

    private Integer id;
    private String name;

    LockEnum(Integer id, String name) {
        this.id = id;
        this.name = name;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public static LockEnum forValue(Integer id) {
        if(id == null ){
            return UNLOCK;
        }
        for (LockEnum lock : LockEnum.values()) {
            if (lock.getId().equals(id)) {
                return lock;
            }
        }
        return UNLOCK;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy