OpenConcerto

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

svn://code.openconcerto.org/openconcerto

Rev

Rev 177 | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 177 Rev 182
Line 1... Line 1...
1
/*
1
/*
2
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
2
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
3
 * 
3
 * 
4
 * Copyright 2011 OpenConcerto, by ILM Informatique. All rights reserved.
4
 * Copyright 2011-2019 OpenConcerto, by ILM Informatique. All rights reserved.
5
 * 
5
 * 
6
 * The contents of this file are subject to the terms of the GNU General Public License Version 3
6
 * The contents of this file are subject to the terms of the GNU General Public License Version 3
7
 * only ("GPL"). You may not use this file except in compliance with the License. You can obtain a
7
 * only ("GPL"). You may not use this file except in compliance with the License. You can obtain a
8
 * copy of the License at http://www.gnu.org/licenses/gpl-3.0.html See the License for the specific
8
 * copy of the License at http://www.gnu.org/licenses/gpl-3.0.html See the License for the specific
9
 * language governing permissions and limitations under the License.
9
 * language governing permissions and limitations under the License.
Line 29... Line 29...
29
import org.openconcerto.utils.cc.IClosure;
29
import org.openconcerto.utils.cc.IClosure;
30
import org.openconcerto.utils.cc.ITransformerExn;
30
import org.openconcerto.utils.cc.ITransformerExn;
31
 
31
 
32
import java.sql.SQLException;
32
import java.sql.SQLException;
33
import java.util.ArrayList;
33
import java.util.ArrayList;
-
 
34
import java.util.Collection;
34
import java.util.Collections;
35
import java.util.Collections;
35
import java.util.HashMap;
36
import java.util.HashMap;
36
import java.util.HashSet;
37
import java.util.HashSet;
37
import java.util.LinkedHashMap;
38
import java.util.LinkedHashMap;
38
import java.util.LinkedList;
39
import java.util.LinkedList;
Line 229... Line 230...
229
     * updated if unchanged.
230
     * updated if unchanged.
230
     * 
231
     * 
231
     * @return the new lines.
232
     * @return the new lines.
232
     */
233
     */
233
    @Override
234
    @Override
234
    public List<ListSQLLine> getAll() {
235
    public List<ListSQLLine> get(Collection<? extends Number> ids) {
235
        assert isUpdateThread();
236
        assert isUpdateThread();
-
 
237
        if (ids != null)
-
 
238
            throw new UnsupportedOperationException("Refreshing a subset of rows is not yet supported");
236
        final List<SQLRowValues> dbRows = this.fetch();
239
        final List<SQLRowValues> dbRows = this.fetch();
237
 
240
 
238
        if (this.lines.isEmpty()) {
241
        if (this.lines.isEmpty()) {
239
            // optimization of the else block
242
            // optimization of the else block
240
            for (final SQLRowValues dbRow : dbRows) {
243
            for (final SQLRowValues dbRow : dbRows) {