public interface ReportQuery
DataFilteringService instance.
The use of the DataFilteringService is tightly coupled to the implementation of ReportQueryDao and the actual content of the query.
Thus, there is no formal way to use that service in the scope of that interface, but let's say that the DataFilteringService should be used
between the moment the query is executed and the moment its result is returned.
Implementing the ReportQuery interface :
========================================================
1/ The Implementation must match a particular repository.
since the query is meant to be executed by a particular Dao, we need to know if the said Dao can support the particular implementation
of the ReportQuery. This will be tested using a ReportQueryFlavor. You must ensure that your report will return the correct
ReportQueryFlavor subclass when asked to, ie the one supported by the ReportQueryDao.
2/ Narrowing the result set.
A ReportQuery will fetch data, that may be filtered by several means :
| Modifier and Type | Method and Description |
|---|---|
Collection<String> |
getCriterionNames() |
ReportQueryFlavor |
getFlavor() |
Object[] |
getValue(String name) |
boolean |
isCriterionExists(String name)
Checks if the given name matches one of the criterion used by this query.
|
void |
setCriterion(String name,
Object... values)
This method will set a criterion.
|
void |
setDataFilteringService(DataFilteringService service)
setter for a DataFilteringService.
|
ReportQueryFlavor getFlavor()
void setDataFilteringService(DataFilteringService service)
service - void setCriterion(String name, Object... values)
name - the name of the criterion you will feed with one or several values.values - an array (which can contains 0, 1 or more elements) containing the actual parameters.Collection<String> getCriterionNames()
boolean isCriterionExists(String name)
name - the name one wants to check.Object[] getValue(String name)
name - the name of the criterion one want to check or retrieve the actual paramtersCopyright © 2010–2016 Henix, henix.fr. All rights reserved.