Actually I don't need this for my use case even though there could be other use cases
for this later on ;)
Thanks
-Vincent
On Jun 13, 2013, at 7:03 PM, Vincent Massol <vincent(a)massol.net> wrote:
On Jun 13, 2013, at 7:01 PM, Vincent Massol <vincent(a)massol.net> 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.
It's less clean but would not break the API.
Thanks
-Vincent