


Hello.
I have a question regarding TaskSearchFilter.addCondition() method
How to use this method with operator "IN
" (Operator.IN) ?
Let's say we what to list all task with status assigned (3) or deadlined (101) (sum of sets).
How to add this condition using TaskSearchFilter ?
....
tsf.addCondition(TaskSearchingConstants.pSTATUS, Operator.IN, <WHAT HERE>, Connective.AND)
...
What should be in place of <WHAT HERE>?
An array of Strings {"3","101"} or ints {1, 101}?
Or maby List of Integer obecjt ?
Please do not post solution :
tsf.addCondition(TaskSearchingConstants.pSTATUS, Operator.EQUALS, 3)
tsf.addCondition(TaskSearchingConstants.pSTATUS, Operator.EQUALS, 101, Connective.OR)
I'm interested in solution with collection of values and "IN" operator.
Views
Replies
Sign in to like this content
Total Likes
I done some tests and
there are two solutions
String [] arr = {"3", "101"};
tsf.addCondition(TaskSearchingConstants.pSTATUS, Operator.IN, arr, Connective.AND);
and second
int [] arr = {3 ,101}
tsf.addCondition(TaskSearchingConstants.pSTATUS, Operator.IN, arr, Connective.AND);
Both are working well....
Views
Replies
Sign in to like this content
Total Likes