OpenConcerto

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

svn://code.openconcerto.org/openconcerto

Rev

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

Rev 151 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 22... Line 22...
22
 
22
 
23
import java.beans.PropertyChangeEvent;
23
import java.beans.PropertyChangeEvent;
24
import java.beans.PropertyChangeListener;
24
import java.beans.PropertyChangeListener;
25
import java.sql.SQLException;
25
import java.sql.SQLException;
26
import java.util.ArrayList;
26
import java.util.ArrayList;
-
 
27
import java.util.Collection;
27
import java.util.Comparator;
28
import java.util.Comparator;
28
import java.util.List;
29
import java.util.List;
29
import java.util.concurrent.Future;
30
import java.util.concurrent.Future;
30
 
31
 
31
// use SQLRowValues to allow graph
32
// use SQLRowValues to allow graph
Line 67... Line 68...
67
 
68
 
68
    public final ListSQLRequest getUpdateQueueReq() {
69
    public final ListSQLRequest getUpdateQueueReq() {
69
        return this.getModel().getUpdateQ().getState().getReq();
70
        return this.getModel().getUpdateQ().getState().getReq();
70
    }
71
    }
71
 
72
 
72
    public abstract List<ListSQLLine> getAll();
73
    public final List<ListSQLLine> getAll() {
-
 
74
        return this.get(null);
-
 
75
    }
-
 
76
 
-
 
77
    /**
-
 
78
     * Fetch up to date values from the DB.
-
 
79
     * 
-
 
80
     * @param ids which rows to fetch, <code>null</code> meaning all.
-
 
81
     * @return the new values from the DB, some changes in the DB might be ignored if there's
-
 
82
     *         pending changes in this.
-
 
83
     */
-
 
84
    public abstract List<ListSQLLine> get(final Collection<? extends Number> ids);
73
 
85
 
74
    /**
86
    /**
75
     * A row in the DB has been changed, fetch its current value.
87
     * A row in the DB has been changed, fetch its current value.
76
     * 
88
     * 
77
     * @param id a valid ID of a database row.
89
     * @param id a valid ID of a database row.