public class PixelDataHandler extends Executor.SimpleWork
Modifier and Type | Field and Description |
---|---|
protected EventLogLoader |
loader |
protected PixelsService |
pixelsService |
protected int |
reps |
description
Constructor and Description |
---|
PixelDataHandler(EventLogLoader ll,
PixelsService pixelsService) |
Modifier and Type | Method and Description |
---|---|
java.lang.Object |
doWork(org.hibernate.Session session,
ServiceFactory sf)
|
protected Pixels |
getPixels(java.lang.Long id,
ServiceFactory sf) |
void |
handleEventLog(EventLog eventLog,
org.hibernate.Session session,
ServiceFactory sf)
Handles only single elements from the
PersistentEventLogLoader
in order to keep transactions short and safe. |
boolean |
process(java.lang.Long id,
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(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 PixelsService pixelsService
protected int reps
public PixelDataHandler(EventLogLoader ll, PixelsService pixelsService)
public void setRepetitions(int reps)
public void setSqlAction(SqlAction sql)
setSqlAction
in class Executor.SimpleWork
@Transactional(readOnly=false) public java.lang.Object doWork(org.hibernate.Session session, 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(EventLog eventLog, org.hibernate.Session session, ServiceFactory sf)
PersistentEventLogLoader
in order to keep transactions short and safe.public boolean process(java.lang.Long id, ServiceFactory sf, org.hibernate.Session s)
id
- sf
- s
- protected Pixels getPixels(java.lang.Long id, ServiceFactory sf)
Version: 5.4.6-ice35-b87
Copyright © 2018 The University of Dundee & Open Microscopy Environment. All Rights Reserved.