Beispiel #1
0
 public static RequestEvent getById(int id) {
   for (RequestEvent type : RequestEvent.values()) {
     if (type.getId() == id) {
       return type;
     }
   }
   return null;
 }
Beispiel #2
0
 public static RequestEvent getByName(String name) {
   for (RequestEvent type : RequestEvent.values()) {
     if (type.name().equalsIgnoreCase(name)) {
       return type;
     }
   }
   return null;
 }