public String getName() { return this.name(); }
public static EventColor fromNameOrHexOrID(String nameOrHexOrID) { for (EventColor c: values()) { if (c.name().equalsIgnoreCase(nameOrHexOrID) || c.getHex().equals(nameOrHexOrID)) { return c; } else { try { int i = Integer.valueOf(nameOrHexOrID); if (c.getId() == i) return c; } catch (NumberFormatException e) { //Not number, just ignore. } } } return NONE; }
public static boolean exists(String nameOrHexOrId) { for (EventColor c: values()) { if (c.name().equalsIgnoreCase(nameOrHexOrId) || c.getHex().equals(nameOrHexOrId)) { return true; } else { try { int i = Integer.valueOf(nameOrHexOrId); if (c.getId() == i) return true; } catch (NumberFormatException e) { //Not number, just ignore. } } } return false; }
body.put("channel", a.getAnnouncementChannelId()); body.put("event_id", a.getEventId()); body.put("event_color", a.getEventColor().name()); body.put("type", a.getAnnouncementType().name()); body.put("hours", a.getHoursBefore());
body.put("channel", a.getAnnouncementChannelId()); body.put("event_id", a.getEventId()); body.put("event_color", a.getEventColor().name()); body.put("type", a.getAnnouncementType().name()); body.put("hours", a.getHoursBefore());
body.put("channel", a.getAnnouncementChannelId()); body.put("event_id", a.getEventId()); body.put("event_color", a.getEventColor().name()); body.put("type", a.getAnnouncementType().name()); body.put("hours", a.getHoursBefore());
obj.put("channel", a.getAnnouncementChannelId()); obj.put("event_id", a.getEventId()); obj.put("event_color", a.getEventColor().name()); obj.put("type", a.getAnnouncementType().name()); obj.put("hours", a.getHoursBefore()); obj.put("channel", a.getAnnouncementChannelId()); obj.put("event_id", a.getEventId()); obj.put("event_color", a.getEventColor().name()); obj.put("type", a.getAnnouncementType().name()); obj.put("hours", a.getHoursBefore());
obj.put("channel", a.getAnnouncementChannelId()); obj.put("event_id", a.getEventId()); obj.put("event_color", a.getEventColor().name()); obj.put("type", a.getAnnouncementType().name()); obj.put("hours", a.getHoursBefore()); obj.put("channel", a.getAnnouncementChannelId()); obj.put("event_id", a.getEventId()); obj.put("event_color", a.getEventColor().name()); obj.put("type", a.getAnnouncementType().name()); obj.put("hours", a.getHoursBefore());
ps.setString(6, announcement.getAnnouncementType().name()); ps.setString(7, announcement.getEventId()); ps.setString(8, announcement.getEventColor().name()); ps.setInt(9, announcement.getHoursBefore()); ps.setInt(10, announcement.getMinutesBefore()); ps.setString(4, announcement.getAnnouncementType().name()); ps.setString(5, announcement.getEventId()); ps.setString(6, announcement.getEventColor().name()); ps.setInt(7, announcement.getHoursBefore()); ps.setInt(8, announcement.getMinutesBefore());
obj.put("channel", a.getAnnouncementChannelId()); obj.put("event_id", a.getEventId()); obj.put("event_color", a.getEventColor().name()); obj.put("type", a.getAnnouncementType().name()); obj.put("hours", a.getHoursBefore()); obj.put("channel", a.getAnnouncementChannelId()); obj.put("event_id", a.getEventId()); obj.put("event_color", a.getEventColor().name()); obj.put("type", a.getAnnouncementType().name()); obj.put("hours", a.getHoursBefore());
jo.put("location", "N/a"); jo.put("color", EventColor.fromNameOrHexOrID(e.getColorId()).name()); jo.put("isParent", !(e.getId().contains("_")));
jo.put("location", "N/a"); jo.put("color", EventColor.fromNameOrHexOrID(e.getColorId()).name()); jo.put("isParent", !(e.getId().contains("_")));
jo.put("location", "N/a"); jo.put("color", EventColor.fromNameOrHexOrID(e.getColorId()).name()); jo.put("isParent", !(e.getId().contains("_")));