argos/dmp-backend/data/src/main/java/eu/eudat/types/grant/GrantStateType.java

30 lines
610 B
Java
Raw Normal View History

package eu.eudat.types.grant;
2018-08-24 17:21:02 +02:00
/**
* Created by ikalyvas on 8/24/2018.
*/
public enum GrantStateType {
2018-08-24 17:21:02 +02:00
ONGOING(0), FINISHED(1);
private Integer value;
private GrantStateType(Integer value) {
2018-08-24 17:21:02 +02:00
this.value = value;
}
public Integer getValue() {
return value;
}
public static GrantStateType fromInteger(Integer value) {
2018-08-24 17:21:02 +02:00
switch (value) {
case 0:
return ONGOING;
case 1:
return FINISHED;
default:
throw new RuntimeException("Unsupported Grant State Type");
2018-08-24 17:21:02 +02:00
}
}
}