OpenConcerto

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

svn://code.openconcerto.org/openconcerto

Rev

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

Rev Author Line No. Line
75 ilm 1
package org.openconcerto.modules.project.element;
2
 
3
import java.util.ArrayList;
4
import java.util.List;
5
 
6
import org.openconcerto.erp.core.common.element.ComptaSQLConfElement;
7
import org.openconcerto.sql.element.SQLComponent;
8
import org.openconcerto.sql.element.UISQLComponent;
9
import org.openconcerto.utils.CollectionMap;
10
 
11
public class ProjectStateSQLElement extends ComptaSQLConfElement {
12
    public static int A_TRAITER = 2;
13
    public static int EN_COURS = 3;
14
    public static int TRAITEMENT_TERMINE = 4;
15
    public static int A_FACTURER = 5;
16
    public static int DOSSIER_CLOS = 6;
17
 
18
    public ProjectStateSQLElement() {
19
        super("ETAT_AFFAIRE", "un état affaire", "états affaires");
20
    }
21
 
22
    @Override
23
    protected List<String> getListFields() {
24
        final List<String> l = new ArrayList<String>();
25
        l.add("NOM");
26
        return l;
27
    }
28
 
29
    @Override
30
    protected List<String> getComboFields() {
31
        final List<String> l = new ArrayList<String>();
32
        l.add("NOM");
33
        return l;
34
    }
35
 
36
    @Override
37
    public CollectionMap<String, String> getShowAs() {
38
        return CollectionMap.singleton(null, getComboFields());
39
    }
40
 
41
    @Override
42
    public SQLComponent createComponent() {
43
        return new UISQLComponent(this) {
44
            @Override
45
            protected void addViews() {
46
                this.addView("NOM");
47
            }
48
        };
49
    }
50
 
51
    @Override
52
    protected String createCode() {
53
        return createCodeFromPackage() + ".state";
54
    }
55
}