com.dahuatech.icc.brm.enums.LockEnum Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of java-sdk-brm Show documentation
Show all versions of java-sdk-brm Show documentation
Dahua ICC Open API SDK for Java
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;
}
}