OpenConcerto

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

svn://code.openconcerto.org/openconcerto

Rev

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

Rev 83 Rev 144
Line 13... Line 13...
13
 
13
 
14
 package org.openconcerto.erp.core.common.element;
14
 package org.openconcerto.erp.core.common.element;
15
 
15
 
16
import org.openconcerto.sql.element.SQLComponent;
16
import org.openconcerto.sql.element.SQLComponent;
17
import org.openconcerto.sql.element.UISQLComponent;
17
import org.openconcerto.sql.element.UISQLComponent;
-
 
18
import org.openconcerto.sql.request.ComboSQLRequest;
-
 
19
import org.openconcerto.sql.request.ComboSQLRequest.KeepMode;
18
import org.openconcerto.utils.ProductInfo;
20
import org.openconcerto.utils.ProductInfo;
19
 
21
 
20
import java.util.ArrayList;
22
import java.util.ArrayList;
-
 
23
import java.util.Arrays;
21
import java.util.List;
24
import java.util.List;
22
 
25
 
23
public class BanqueSQLElement extends ComptaSQLConfElement {
26
public class BanqueSQLElement extends ComptaSQLConfElement {
24
 
27
 
25
    public static final String TABLENAME = ProductInfo.getInstance().getName().equals("OpenConcerto") ? "BANQUE" : "BANQUE_POLE_PRODUIT";
28
    public static final String TABLENAME = ProductInfo.getInstance().getName().equals("OpenConcerto") ? "BANQUE" : "BANQUE_POLE_PRODUIT";
Line 27... Line 30...
27
    public BanqueSQLElement() {
30
    public BanqueSQLElement() {
28
        super(TABLENAME, "une banque", "banques");
31
        super(TABLENAME, "une banque", "banques");
29
    }
32
    }
30
 
33
 
31
    @Override
34
    @Override
-
 
35
    protected void _initComboRequest(ComboSQLRequest req) {
-
 
36
        super._initComboRequest(req);
-
 
37
        req.addForeignToGraphToFetch("ID_JOURNAL", Arrays.asList("ID", "CODE", "NOM"));
-
 
38
        req.keepRows(KeepMode.GRAPH);
-
 
39
    }
-
 
40
 
-
 
41
    @Override
32
    protected List<String> getComboFields() {
42
    protected List<String> getComboFields() {
33
        List<String> list = new ArrayList<String>();
43
        List<String> list = new ArrayList<String>();
34
        list.add("CODE");
44
        list.add("CODE");
35
        list.add("NOM");
45
        list.add("NOM");
36
        return list;
46
        return list;