public ome.model.meta.EventLog newInstance() { return new ome.model.meta.EventLog(); }
public ome.model.meta.EventLog proxy() { return new ome.model.meta.EventLog(this.id, false); }
/** * Adds an {@link EventLog} for the given {@link Class} and id to the * backlog. */ public boolean addEventLog(Class<? extends IObject> cls, long id) { if (excludes.contains(cls.getName())) { if (log.isDebugEnabled()) { log.debug("Skipping addition of " + cls.getName()); return false; } } EventLog el = new EventLog(); el.setEntityId(id); el.setEntityType(cls.getName()); el.setAction("INSERT"); return backlog.add(el); }
protected EventLog wrap(String cls, IObject obj) { EventLog el = new EventLog(); el.setEntityType(cls); el.setEntityId(obj.getId()); el.setAction("UPDATE"); return el; } }
EventLog l = new EventLog(); l.setAction(action);
@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); } });
List<Image> images = (List<Image>) q.list(); for (Image image : images) { EventLog el = new EventLog(); el.setEntityId(image.getId()); el.setEntityType(image.getClass().getName());