I have the enum as:
enum
public enum EnumStatus { PASSED(40L, \"Has Passed\"), AVERAGE(60L, \"Has Average Marks\"), GOOD(80L, \"Has Good
You make this work as follows:
public static String fromId(long id) { for (EnumStatus es : EnumStatus.values()) { if (es.id.equals(id)) { return es.getName(); } } throw new IllegalArgumentException(); }