* @see https://dev.twitter.com/blog/upcoming-tco-changes
*/
public static final int URL_LENGTH = 23;
public static EventEx getEventEx(PartakeConnection con, IPartakeDAOs daos, String eventId) throws DAOException {
Event event = daos.getEventAccess().find(con, eventId);
if (event == null) { return null; }
UserEx owner = UserDAOFacade.getUserEx(con, daos, event.getOwnerId());
if (owner == null) { return null; }
String feedId = daos.getEventFeedAccess().findByEventId(con, eventId);
List<EventTicket> tickets = daos.getEventTicketAccess().findEventTicketsByEventId(con, eventId);
List<User> editors = new ArrayList<User>();
if (event.getEditorIds() != null) {
for (String editorId : event.getEditorIds()) {
User editor = daos.getUserAccess().find(con, editorId);
if (editor != null)
editors.add(editor);
}
}
List<Event> relatedEvents = new ArrayList<Event>();
if (event.getRelatedEventIds() != null) {
for (String relatedEventId : event.getRelatedEventIds()) {
if (!Util.isUUID(relatedEventId))
continue;
Event relatedEvent = daos.getEventAccess().find(con, relatedEventId);
if (relatedEvent != null)
relatedEvents.add(relatedEvent);
}
}