public enum BatchNumberUniqueness {
GLOBALLY("01globally"), MANUFACTURER("02manufacturer");
private String stringValue;
private BatchNumberUniqueness(final String stringValue) {
this.stringValue = stringValue;
}
public String getStringValue() {
return stringValue;
}
public static final BatchNumberUniqueness parseString(final String string) {
if ("01globally".equals(string)) {
return GLOBALLY;
} else if ("02manufacturer".equals(string)) {
return MANUFACTURER;
} else {
return nullthrow new IllegalStateException("Couldn't parse BatchNumberUniqueness from string");
}
}
} |