public class DataServiceImpl extends Object implements DataService
Constructor and Description |
---|
DataServiceImpl() |
Modifier and Type | Method and Description |
---|---|
ModuleSession |
createSession(Module module)
Creates a new module session.
|
List<Object[]> |
findDistinctSessionPropertyNames(Module module)
Get all distinct session property names contained in a module
|
List<Object[]> |
findDistinctTrialPropertyNames(Module module)
Get all distinct trial property names contained in a module
|
void |
finishSession(ModuleSession moduleSession)
Finishes a module session.
|
ModuleSession |
getLastSession(Module module,
boolean includeUnfinished)
Get the last session of a module.
|
Messages |
getMessages()
Gets the messages used by Tatool
|
long |
getSessionCount(Module module,
boolean includeUnfinished)
Gets the number of sessions in a module.
|
List<ModuleSession> |
getSessions(Module module)
Load all session in a given module.
|
List<Trial> |
getTrials(Module module,
ModuleSession session,
Node node,
int maxResults)
Returns a list of trial instances for a given element or session.
|
List<Trial> |
getTrials(Module module,
ModuleSession session,
String elementNameLike,
String propertyNameLike,
int offset,
int maxResults)
Find the last x trials with given property of a given element
|
List<Trial> |
getTrials(ModuleSession session)
Get all trials for a session.
|
void |
insertTrial(ModuleSession session,
Trial trial)
Inserts a trial object into the session.
|
List<Trial> |
loadAllTrials(Module module)
Load all trials of a given module and session.
|
void |
saveModule(Module module)
Save the module instance.
|
void |
saveSession(ModuleSession moduleSession)
Save a session without finishing it.
|
void |
setMessages(Messages messages)
Sets the messages used by Tatool
|
public void saveModule(Module module)
saveModule
in interface DataService
public ModuleSession createSession(Module module)
createSession
in interface DataService
public void saveSession(ModuleSession moduleSession)
saveSession
in interface DataService
public void finishSession(ModuleSession moduleSession)
finishSession
in interface DataService
public List<ModuleSession> getSessions(Module module)
getSessions
in interface DataService
public void insertTrial(ModuleSession session, Trial trial)
insertTrial
in interface DataService
public List<Trial> getTrials(ModuleSession session)
DataService
getTrials
in interface DataService
public List<Trial> loadAllTrials(Module module)
public List<Trial> getTrials(Module module, ModuleSession session, Node node, int maxResults)
getTrials
in interface DataService
session
- the session to find trials in. Use null to search for all sessionsnode
- the element to find trials for. Use null to search for all element.maxResults
- the maximum amount of results.public ModuleSession getLastSession(Module module, boolean includeUnfinished)
getLastSession
in interface DataService
module
- includeUnfinished
- whether to include unfinished module (modules without end
time)public long getSessionCount(Module module, boolean includeUnfinished)
getSessionCount
in interface DataService
module
- the module to checkincludeUnfinished
- whether to include unfinished module (modules without end
time)public List<Trial> getTrials(Module module, ModuleSession session, String elementNameLike, String propertyNameLike, int offset, int maxResults)
getTrials
in interface DataService
session
- The sessions the trials should be belong to, null if all sessions should be taken into accountelementNameLike
- the name of the element to search for (either this or propertyName needs to be non-null)propertyNameLike
- the name of the property to search for (either this or elementName needs to be non-nulloffset
- the offset to start from, starting with 0maxResults
- the maximum number of Trials to return, -1 for all resultspublic List<Object[]> findDistinctTrialPropertyNames(Module module)
findDistinctTrialPropertyNames
in interface DataService
public List<Object[]> findDistinctSessionPropertyNames(Module module)
findDistinctSessionPropertyNames
in interface DataService
public void setMessages(Messages messages)
DataService
setMessages
in interface DataService
public Messages getMessages()
DataService
getMessages
in interface DataService
Copyright © 2013. All Rights Reserved.