30 lines
558 B
Java
30 lines
558 B
Java
package eu.eudat.commons.enums;
|
|
|
|
import eu.eudat.data.converters.enums.DatabaseEnum;
|
|
|
|
import java.util.HashMap;
|
|
import java.util.Map;
|
|
|
|
public enum Status implements DatabaseEnum<Integer> {
|
|
|
|
Inactive(0),
|
|
Active( 1);
|
|
|
|
private final Integer value;
|
|
|
|
Status(Integer value) {
|
|
this.value = value;
|
|
}
|
|
|
|
public Integer getValue() {
|
|
return value;
|
|
}
|
|
|
|
private static final Map<Integer, Status> map = EnumUtils.getEnumValueMap(Status.class);
|
|
|
|
public static Status of(Integer i) {
|
|
return map.get(i);
|
|
}
|
|
|
|
}
|