31 lines
615 B
Java
31 lines
615 B
Java
|
package eu.eudat.commons.enums;
|
||
|
|
||
|
import com.fasterxml.jackson.annotation.JsonValue;
|
||
|
import eu.eudat.data.converters.enums.DatabaseEnum;
|
||
|
|
||
|
import java.util.Map;
|
||
|
|
||
|
public enum StorageType implements DatabaseEnum<Short> {
|
||
|
|
||
|
Temp((short) 0),
|
||
|
Main((short) 1);
|
||
|
|
||
|
private final Short value;
|
||
|
|
||
|
StorageType(Short value) {
|
||
|
this.value = value;
|
||
|
}
|
||
|
|
||
|
@JsonValue
|
||
|
public Short getValue() {
|
||
|
return value;
|
||
|
}
|
||
|
|
||
|
private static final Map<Short, StorageType> map = EnumUtils.getEnumValueMap(StorageType.class);
|
||
|
|
||
|
public static StorageType of(Short i) {
|
||
|
return map.get(i);
|
||
|
}
|
||
|
|
||
|
}
|