public class PixelDataHandler extends Executor.SimpleWork
Modifier and Type | Field and Description |
---|---|
protected EventLogLoader |
loader |
protected ome.io.nio.PixelsService |
pixelsService |
protected int |
reps |
description
Constructor and Description |
---|
PixelDataHandler(EventLogLoader ll,
ome.io.nio.PixelsService pixelsService) |
Modifier and Type | Method and Description |
---|---|
java.lang.Object |
doWork(org.hibernate.Session session,
ome.system.ServiceFactory sf)
Loads
reps EventLog instances and returns them. |
protected ome.model.core.Pixels |
getPixels(java.lang.Long id,
ome.system.ServiceFactory sf) |
void |
handleEventLog(ome.model.meta.EventLog eventLog,
org.hibernate.Session session,
ome.system.ServiceFactory sf)
Handles only single elements from the
PersistentEventLogLoader
in order to keep transactions short and safe. |
boolean |
process(java.lang.Long id,
ome.system.ServiceFactory sf,
org.hibernate.Session s)
Here we assume that our log loader will only return
us the proper types, since we are using the specific
type defined in this package.
|
void |
setRepetitions(int reps)
Spring injector.
|
void |
setSqlAction(ome.util.SqlAction sql)
Since these instances are used repeatedly, we need to check for
already set SqlAction
|
getSqlAction
description
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
description
protected final EventLogLoader loader
protected final ome.io.nio.PixelsService pixelsService
protected int reps
public PixelDataHandler(EventLogLoader ll, ome.io.nio.PixelsService pixelsService)
public void setRepetitions(int reps)
public void setSqlAction(ome.util.SqlAction sql)
setSqlAction
in class Executor.SimpleWork
@Transactional(readOnly=false) public java.lang.Object doWork(org.hibernate.Session session, ome.system.ServiceFactory sf)
reps
EventLog
instances and returns them.
This is the first phase used by the PixelDataThread
. A later
phase will invoke handleEventLog(EventLog, Session, ServiceFactory)
with the returned instance.session
- non null.sf
- non null.public void handleEventLog(ome.model.meta.EventLog eventLog, org.hibernate.Session session, ome.system.ServiceFactory sf)
PersistentEventLogLoader
in order to keep transactions short and safe.public boolean process(java.lang.Long id, ome.system.ServiceFactory sf, org.hibernate.Session s)
id
- sf
- s
- protected ome.model.core.Pixels getPixels(java.lang.Long id, ome.system.ServiceFactory sf)