OpenConcerto

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

svn://code.openconcerto.org/openconcerto

Rev

Rev 128 | Details | Compare with Previous | Last modification | View Log | RSS feed

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