zhiqinghuang / lambdaj

Automatically exported from code.google.com/p/lambdaj
Apache License 2.0
0 stars 0 forks source link

How to get the specified List by using lambdaj #104

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
I have a object in my project 
public class Timesheet{
    private Integer id;
    private String name;
    ...
    ...
    private List<Integer> status;
    getXX()
    setXX()
}
Now, i got a List<Timesheet> from the database

i wanna get a sublist which the status is not equalTo 1, i try to use the 
select below ,but failed

List<Timesheet> tsList = select(tsList, 
having(on(Timesheet.class).getStatus(),not(contains(1)));

OK, the sentence below is work
List<Time sheet> tsList = select(tsList, 
having(on(Timesheet.class).getStatus().contains(1)));

do me a favor.thanks

Original issue reported on code.google.com by jake....@gmail.com on 26 Dec 2012 at 6:10