OpenConcerto

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

svn://code.openconcerto.org/openconcerto

Rev

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

Rev 17 Rev 25
Line 14... Line 14...
14
 package org.openconcerto.sql.request;
14
 package org.openconcerto.sql.request;
15
 
15
 
16
import org.openconcerto.sql.model.SQLField;
16
import org.openconcerto.sql.model.SQLField;
17
import org.openconcerto.sql.model.SQLFieldsSet;
17
import org.openconcerto.sql.model.SQLFieldsSet;
18
import org.openconcerto.sql.model.SQLTable;
18
import org.openconcerto.sql.model.SQLTable;
19
import org.openconcerto.sql.model.SQLTableListener;
19
import org.openconcerto.sql.model.SQLTableModifiedListener;
20
 
20
 
21
import java.util.Collection;
21
import java.util.Collection;
22
import java.util.Set;
22
import java.util.Set;
23
 
23
 
24
abstract class BaseSQLRequest {
24
abstract class BaseSQLRequest {
Line 36... Line 36...
36
     * 
36
     * 
37
     * @return les champs qui intéressent cette requête.
37
     * @return les champs qui intéressent cette requête.
38
     */
38
     */
39
    protected abstract Collection<SQLField> getAllFields();
39
    protected abstract Collection<SQLField> getAllFields();
40
 
40
 
41
    public final void addTableListener(SQLTableListener l) {
41
    public final void addTableListener(SQLTableModifiedListener l) {
42
        for (final SQLTable t : this.getTables()) {
42
        for (final SQLTable t : this.getTables()) {
43
            t.addTableListener(l);
43
            t.addTableModifiedListener(l);
44
        }
44
        }
45
    }
45
    }
46
 
46
 
47
    public final void removeTableListener(SQLTableListener l) {
47
    public final void removeTableListener(SQLTableModifiedListener l) {
48
        for (final SQLTable t : this.getTables()) {
48
        for (final SQLTable t : this.getTables()) {
49
            t.removeTableListener(l);
49
            t.removeTableModifiedListener(l);
50
        }
50
        }
51
    }
51
    }
52
}
52
}