/** * Main constructor. */ public Event (Long id, boolean loaded) { setId(id); if (loaded) { getDetails().setContext(this); } else { if (this.id == null) { throw new ApiUsageException("Id cannot be null for a proxy"); } unload(); } }
@Override public boolean acceptFilter(ome.util.Filter __filter){ try { this.id = (Long) __filter.filter(ID, this.id); this.status = (java.lang.String) __filter.filter(STATUS, this.status ); this.time = (java.sql.Timestamp) __filter.filter(TIME, this.time ); this.experimenter = (ome.model.meta.Experimenter) __filter.filter(EXPERIMENTER, this.experimenter ); this.experimenterGroup = (ome.model.meta.ExperimenterGroup) __filter.filter(EXPERIMENTERGROUP, this.experimenterGroup ); this.type = (ome.model.enums.EventType) __filter.filter(TYPE, this.type ); this.containingEvent = (ome.model.meta.Event) __filter.filter(CONTAININGEVENT, this.containingEvent ); this.logs = (java.util.Set<ome.model.meta.EventLog>) __filter.filter(LOGS, this.logs ); this.session = (ome.model.meta.Session) __filter.filter(SESSION, this.session ); this.details = (ome.model.internal.Details) __filter.filter(DETAILS, this.details ); return true; } catch (RuntimeException re) { // ticket:1183 - Caused by Utils.trueClass(Annotation.class) if (re.getCause() instanceof InstantiationException) { this.unload(); return true; } else { throw re; } } }