public ome.model.meta.Event newInstance() { return new ome.model.meta.Event(); }
public ome.model.meta.Event proxy() { return new ome.model.meta.Event(this.id, false); }
@Transactional(readOnly = false) public Object doWork(Session session, ServiceFactory sf) { log.info("Creating PIXELDATA event for pixels id:" + mpm.pixelsID); // Load objects final EventType type = sf.getTypesService().getEnumeration( EventType.class, ec.getCurrentEventType()); final EventLog el = new EventLog(); final Event e = new Event(); e.setExperimenter( new Experimenter(ec.getCurrentUserId(), false)); e.setExperimenterGroup(new ExperimenterGroup(groupID, false)); e.setSession(new ome.model.meta.Session( ec.getCurrentSessionId(), false)); e.setTime(new Timestamp(new Date().getTime())); e.setType(type); el.setAction("PIXELDATA"); el.setEntityId(mpm.pixelsID); el.setEntityType(Pixels.class.getName()); el.setEvent(e); return sf.getUpdateService().saveAndReturnObject(el); } });
el.setEntityType(image.getClass().getName()); el.setAction("INSERT"); el.setEvent(new Event()); el.getEvent().setTime(image.getAcquisitionDate()); logs.add(el);
public Event newEvent(Session session, EventType type, TokenHolder tokenHolder) { BasicEventContext c = current(); Event e = new Event(); e.setType(type); e.setTime(new Timestamp(System.currentTimeMillis())); tokenHolder.setToken(e.getGraphHolder()); e.getDetails().setPermissions(Permissions.READ_ONLY); // Proxied if necessary e.setExperimenter(c.getOwner()); e.setExperimenterGroup(c.getGroup()); e.setSession(session); c.setEvent(e); return e; }
/** * Method which takes all the fields of the given {@link Details} instance * and sets unloaded proxies of them into the current instance. */ public void shallowCopy(Details copy) { if (copy == null) { throw new IllegalArgumentException("argument may not be null"); } setOwner(copy.getOwner() == null ? null : new Experimenter(copy .getOwner().getId(), false)); setGroup(copy.getGroup() == null ? null : new ExperimenterGroup(copy .getGroup().getId(), false)); setCreationEvent(copy.getCreationEvent() == null ? null : new Event( copy.getCreationEvent().getId(), false)); setPermissions(copy.getPermissions() == null ? null : new Permissions(copy.getPermissions())); setExternalInfo(copy.getExternalInfo() == null ? null : new ExternalInfo(copy.getExternalInfo().getId(), false)); setUpdateEvent(copy.getUpdateEvent() == null ? null : new Event(copy .getUpdateEvent().getId(), false)); _filteredCollections = copy.filteredSet(); }