37 lines
895 B
Java
37 lines
895 B
Java
package eu.eudat.commons.enums;
|
|
|
|
import com.fasterxml.jackson.annotation.JsonValue;
|
|
import eu.eudat.data.converters.enums.DatabaseEnum;
|
|
import jakarta.xml.bind.annotation.XmlEnumValue;
|
|
import jakarta.xml.bind.annotation.XmlValue;
|
|
|
|
import java.util.Map;
|
|
|
|
public enum ReferenceTypeSourceType implements DatabaseEnum<Short> {
|
|
@XmlEnumValue(value = "0")
|
|
API((short) 0),
|
|
@XmlEnumValue(value = "1")
|
|
STATIC((short) 1);
|
|
private final Short value;
|
|
|
|
public static class Names {
|
|
public static final String API = "api";
|
|
public static final String STATIC = "static";
|
|
}
|
|
|
|
ReferenceTypeSourceType(Short value) {
|
|
this.value = value;
|
|
}
|
|
|
|
@JsonValue
|
|
public Short getValue() {
|
|
return value;
|
|
}
|
|
|
|
private static final Map<Short, ReferenceTypeSourceType> map = EnumUtils.getEnumValueMap(ReferenceTypeSourceType.class);
|
|
|
|
public static ReferenceTypeSourceType of(Short i) {
|
|
return map.get(i);
|
|
}
|
|
}
|