OpenConcerto

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

svn://code.openconcerto.org/openconcerto

Rev

Rev 132 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 132 Rev 144
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;
17
 
19
 
18
import java.util.Collection;
20
import java.util.Collection;
19
 
21
 
20
import org.apache.commons.collections.CollectionUtils;
-
 
21
import org.apache.commons.collections.Predicate;
-
 
22
 
-
 
23
/**
22
/**
24
 * Allow to specify which rows we're interested in.
23
 * Allow to specify which rows we're interested in.
25
 * 
24
 * 
26
 * @author Sylvain CUAZ
25
 * @author Sylvain CUAZ
27
 */
26
 */
Line 93... Line 92...
93
    public SQLRow filter(SQLRow r) {
92
    public SQLRow filter(SQLRow r) {
94
        return this.check(r) ? r : null;
93
        return this.check(r) ? r : null;
95
    }
94
    }
96
 
95
 
97
    public void filter(Collection<SQLRow> rows) {
96
    public void filter(Collection<SQLRow> rows) {
98
        CollectionUtils.filter(rows, new Predicate() {
97
        CollectionUtils.filter(rows, new IPredicate<SQLRow>() {
-
 
98
            @Override
99
            public boolean evaluate(Object object) {
99
            public boolean evaluateChecked(SQLRow r) {
100
                return check((SQLRow) object);
100
                return check(r);
101
            }
101
            }
102
        });
102
        });
103
    }
103
    }
104
 
104
 
105
}
105
}