OpenConcerto

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

svn://code.openconcerto.org/openconcerto

Rev

Rev 144 | Go to most recent revision | Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
83 ilm 1
/*
2
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
3
 *
4
 * Copyright 2011 OpenConcerto, by ILM Informatique. All rights reserved.
5
 *
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
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.
10
 *
11
 * When distributing the software, include this License Header Notice in each file.
12
 */
13
 
14
 package org.openconcerto.erp.core.common.element;
15
 
16
import org.openconcerto.sql.element.SQLComponent;
17
import org.openconcerto.sql.element.UISQLComponent;
18
import org.openconcerto.utils.ProductInfo;
19
 
20
import java.util.ArrayList;
21
import java.util.List;
22
 
23
public class BanqueSQLElement extends ComptaSQLConfElement {
24
 
25
    public static final String TABLENAME = ProductInfo.getInstance().getName().equals("OpenConcerto") ? "BANQUE" : "BANQUE_POLE_PRODUIT";
26
 
27
    public BanqueSQLElement() {
28
        super(TABLENAME, "une banque", "banques");
29
    }
30
 
31
    @Override
32
    protected List<String> getComboFields() {
33
        List<String> list = new ArrayList<String>();
34
        list.add("CODE");
35
        list.add("NOM");
36
        return list;
37
    }
38
 
39
    @Override
40
    protected List<String> getListFields() {
41
        List<String> list = new ArrayList<String>();
42
        list.add("CODE");
43
        list.add("NOM");
44
 
45
        list.add("ID_JOURNAL");
46
        list.add("ID_COMPTE_PCE");
47
        return list;
48
    }
49
 
50
    public SQLComponent createComponent() {
51
        return new UISQLComponent(this, 2) {
52
            public void addViews() {
53
                this.addView("CODE");
54
                this.addView("NOM");
55
                this.addView("NUMERO_RUE");
56
                this.addView("VOIE");
57
                this.addView("RUE");
58
                this.addView("VILLE");
59
                this.addView("BIC");
60
                this.addView("IBAN");
61
                this.addView("AFFACTURAGE");
62
                this.addView("ID_JOURNAL");
63
                this.addView("ID_COMPTE_PCE");
64
                this.addView("INFOS");
65
 
66
            }
67
        };
68
    }
69
}