2023-10-16 16:38:12 +02:00
|
|
|
package eu.eudat.commons.enums;
|
|
|
|
|
|
|
|
import eu.eudat.data.converters.enums.DatabaseEnum;
|
|
|
|
|
2023-10-17 11:39:29 +02:00
|
|
|
import java.util.HashMap;
|
|
|
|
import java.util.Map;
|
|
|
|
|
2023-10-16 16:38:12 +02:00
|
|
|
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;
|
|
|
|
}
|
2023-10-17 11:39:29 +02:00
|
|
|
|
2023-10-17 12:45:59 +02:00
|
|
|
private static final Map<Integer, Status> map = EnumUtils.getEnumValueMap(Status.class);
|
2023-10-17 11:39:29 +02:00
|
|
|
|
|
|
|
public static Status of(Integer i) {
|
|
|
|
return map.get(i);
|
|
|
|
}
|
|
|
|
|
2023-10-16 16:38:12 +02:00
|
|
|
}
|