|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object uk.ac.cisban.rod.dao.specifics.ManageLogs
public class ManageLogs
Handles connections to the database in the adding and modification of
LogEvent
s.
Constructor Summary | |
---|---|
ManageLogs(DAO dao)
Main constructor. |
Method Summary | |
---|---|
ActionApplication |
addInoculation(java.lang.Long actionApplicationId,
java.util.Set<Inoculation> logs,
java.util.Map<java.lang.String,java.lang.Exception> exceptionMap,
java.util.Map<java.lang.String,java.lang.String> barcodeSubs)
Adds a set of Inoculation logs to an existing ActionApplication. |
ActionApplication |
addSpotting(java.lang.Long actionApplicationId,
java.util.Collection<Spotting> logs,
java.util.Map<java.lang.String,java.lang.Exception> exceptionMap,
java.util.Map<java.lang.String,java.lang.String> barcodeSubs)
Adds a set of Spotting logs to an existing ActionApplication. |
boolean |
canAddSpotting(java.util.Map<java.lang.String,java.lang.Exception> exceptionMap,
javax.jdo.PersistenceManager pm,
java.lang.Long sPlatePosition,
java.lang.Long dPlatePosition)
Checks if the Spotting can be added to the database. |
java.util.Collection<Image> |
loadImagesBrief(java.util.List<java.lang.String> nonMappedPlates,
java.lang.String barcodeString)
Loads the collection of images associated with a Barcode without retrieving the individual ImageSpots (hence the "Brief"). |
java.util.Collection<LogEvent> |
loadLogs(java.lang.Long actionAppId)
Loads the LogEvents of an ActionApplication, given the AA's PK. |
java.util.Collection<LogEventMapping> |
loadSpots(java.util.Collection<java.lang.String> sourceBarcodes,
long aAppId)
Accesses the spot log for the given source barcodes based on ActionApplication id. |
java.util.Collection<java.lang.Exception> |
threadImageLogs(java.lang.Long actionApplicationId,
java.util.Collection<Image> logs)
Enters the image logs each in individual threads to improve performance. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ManageLogs(DAO dao)
dao
- Method Detail |
---|
public java.util.Collection<LogEvent> loadLogs(java.lang.Long actionAppId) throws QueryNotFoundException
actionAppId
- primary key of the ActionApplication
QueryNotFoundException
- if the ActionApplication with that PK cannot be foundpublic java.util.Collection<Image> loadImagesBrief(java.util.List<java.lang.String> nonMappedPlates, java.lang.String barcodeString) throws QueryNotFoundException
nonMappedPlates
- a collection that holds the Barcodes that do not have associated images.
Intended to be re-used with several calls to this method for error-checking purposes.barcodeString
- the barcodeValue of the plate
QueryNotFoundException
- if the Barcode cannot be found based on the parameterpublic java.util.Collection<LogEventMapping> loadSpots(java.util.Collection<java.lang.String> sourceBarcodes, long aAppId) throws QueryNotFoundException
ActionApplication
id.
sourceBarcodes
- barcodes that occur in the sourcePlatePosition of Spotting
aAppId
- the ActionApplication
id
QueryNotFoundException
- if the Barcode
s or ActionApplication
cannot be foundpublic ActionApplication addInoculation(java.lang.Long actionApplicationId, java.util.Set<Inoculation> logs, java.util.Map<java.lang.String,java.lang.Exception> exceptionMap, java.util.Map<java.lang.String,java.lang.String> barcodeSubs)
actionApplicationId
- the primary key of the ActionApplicationlogs
- the set of Inoculation logs to add to the ActionApplicationexceptionMap
- a Map of Exceptions that occurred during this operationbarcodeSubs
-
DAO#applyAction(long, long)
public ActionApplication addSpotting(java.lang.Long actionApplicationId, java.util.Collection<Spotting> logs, java.util.Map<java.lang.String,java.lang.Exception> exceptionMap, java.util.Map<java.lang.String,java.lang.String> barcodeSubs)
actionApplicationId
- the primary key of the ActionApplicationlogs
- the set of Spotting logs to add to the ActionApplicationexceptionMap
- a Map of Exceptions that occurred during this operationbarcodeSubs
-
DAO#applyAction(long, long)
public boolean canAddSpotting(java.util.Map<java.lang.String,java.lang.Exception> exceptionMap, javax.jdo.PersistenceManager pm, java.lang.Long sPlatePosition, java.lang.Long dPlatePosition)
exceptionMap
- a Map of Exceptions that occurred during this operationpm
- the persistence managersPlatePosition
- the source PlatePositiondPlatePosition
- the destination PlatePosition
public java.util.Collection<java.lang.Exception> threadImageLogs(java.lang.Long actionApplicationId, java.util.Collection<Image> logs)
actionApplicationId
- the DB id of the ActionApplication
to
add the image logs tologs
- the images to add
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |