On Thu, Jun 13, 2013 at 7:03 PM, Vincent Massol <[email protected]> wrote:
On Jun 13, 2013, at 7:01 PM, Vincent Massol <[email protected]> wrote:
Hi devs,
Right now the QueryFilter interface allows to modify the query statement and to filter returned results but doesn't allow to pass dynamic value.
I'm currently implementing a filter that'll return only results for the current language and thus I need this dynamicity.
Are you ok that I break the QueryFitler API to add a new method:
public interface QueryFilter { String filterStatement(String statement, String language); List filterResults(List results);
// New method Map<String, String> getParameters(); }
WDYT?
Noe that the only other option I know of is to have a ParametrizedQueryFilter IF and do an instanceof in HqlQueryExecutor.
Why would you need a if in HqlQueryExecutor ? It just call filterResults and filterStatement which you did not touched in your proposal.
It's less clean but would not break the API.
Thanks -Vincent
_______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs
-- Thomas Mortagne