OpenConcerto

Dépôt officiel du code source de l'ERP OpenConcerto
sonarqube

svn://code.openconcerto.org/openconcerto

Rev

Rev 144 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 144 Rev 180
Line 12... Line 12...
12
 */
12
 */
13
 
13
 
14
 package org.openconcerto.sql.model;
14
 package org.openconcerto.sql.model;
15
 
15
 
16
import org.openconcerto.sql.model.SQLSelect.ArchiveMode;
16
import org.openconcerto.sql.model.SQLSelect.ArchiveMode;
17
import org.openconcerto.utils.CollectionUtils;
-
 
18
import org.openconcerto.utils.cc.IPredicate;
-
 
19
 
-
 
20
import java.util.Collection;
-
 
21
 
17
 
22
/**
18
/**
23
 * Allow to specify which rows we're interested in.
19
 * Allow to specify which rows we're interested in.
24
 * 
20
 * 
25
 * @author Sylvain CUAZ
21
 * @author Sylvain CUAZ
Line 90... Line 86...
90
    }
86
    }
91
 
87
 
92
    public SQLRow filter(SQLRow r) {
88
    public SQLRow filter(SQLRow r) {
93
        return this.check(r) ? r : null;
89
        return this.check(r) ? r : null;
94
    }
90
    }
95
 
-
 
96
    public void filter(Collection<SQLRow> rows) {
-
 
97
        CollectionUtils.filter(rows, new IPredicate<SQLRow>() {
-
 
98
            @Override
-
 
99
            public boolean evaluateChecked(SQLRow r) {
-
 
100
                return check(r);
-
 
101
            }
-
 
102
        });
-
 
103
    }
-
 
104
 
-
 
105
}
91
}