|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface ReportQuery
Abstract :
==========
This interface represents the query that the client needs to use to retrieve the data and build the model that will feed the view for
a given Report.
An implementation of the ReportQuery interface is both dedicated to :
- a given Report,
- a given implementation of the underlying repository.
Data Filtering :
===============
As for SquashTM v 0.23.0 and future version, as long as the issue is not addressed, a Report plugin is granted full, unfiltered access to the
repository. Until low level security routines are injected in the middle, it's up to the author of a Report to check his data against a
dedicated service that will be gracefully injected by the Report service engine. That service is 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 :
| Method Summary | |
|---|---|
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. |
| Method Detail |
|---|
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 paramters
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||