OpenConcerto

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

svn://code.openconcerto.org/openconcerto

Rev

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

Rev 132 Rev 177
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.erp.core.common.component.AdresseSQLComponent;
16
import org.openconcerto.erp.core.common.component.AdresseSQLComponent;
17
import org.openconcerto.sql.element.SQLComponent;
17
import org.openconcerto.sql.element.SQLComponent;
-
 
18
import org.openconcerto.utils.ListMap;
18
 
19
 
19
import java.util.ArrayList;
20
import java.util.ArrayList;
20
import java.util.List;
21
import java.util.List;
21
 
22
 
22
public class AdresseSQLElement extends ComptaSQLConfElement {
23
public class AdresseSQLElement extends ComptaSQLConfElement {
23
 
24
 
24
    public AdresseSQLElement() {
25
    public AdresseSQLElement() {
25
        super("ADRESSE", "une adresse", "adresses");
26
        super("ADRESSE", "une adresse", "adresses");
26
    }
27
    }
27
 
28
 
-
 
29
    @Override
-
 
30
    public ListMap<String, String> getShowAs() {
-
 
31
        if (this.getTable().contains("DISTRICT")) {
-
 
32
            return ListMap.singleton(null, "RUE", "DISTRICT", "DEPARTEMENT", "CODE_POSTAL", "VILLE");
-
 
33
        } else {
-
 
34
            return ListMap.singleton(null, "RUE", "CODE_POSTAL", "VILLE");
-
 
35
        }
-
 
36
    }
-
 
37
 
28
    protected List<String> getListFields() {
38
    protected List<String> getListFields() {
29
        final List<String> l = new ArrayList<String>();
39
        final List<String> l = new ArrayList<String>();
30
        l.add("RUE");
40
        l.add("RUE");
31
        l.add("CODE_POSTAL");
41
        l.add("CODE_POSTAL");
32
        l.add("VILLE");
42
        l.add("VILLE");