OpenConcerto

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

svn://code.openconcerto.org/openconcerto

Rev

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

Rev Author Line No. Line
144 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
 /*
15
 * Créé le 26 sept. 2012
16
 */
17
package org.openconcerto.erp.core.supplychain.order.element;
18
 
19
import org.openconcerto.erp.core.common.element.ComptaSQLConfElement;
20
import org.openconcerto.sql.element.SQLComponent;
21
import org.openconcerto.sql.element.UISQLComponent;
22
import org.openconcerto.utils.ListMap;
23
 
24
import java.util.ArrayList;
25
import java.util.List;
26
 
27
import javax.swing.JTextField;
28
 
29
public class EtatDemandePrixSQLElement extends ComptaSQLConfElement {
30
 
31
    public static final int REFUSE = 3;
32
    public static final int ACCEPTE = 4;
33
    public static final int EN_ATTENTE = 2;
34
    public static final int EN_COURS = 5;
35
 
36
    public EtatDemandePrixSQLElement() {
37
        super("ETAT_DEMANDE_PRIX", "un état de demande de prix", "états de demande de prix");
38
    }
39
 
40
    protected List<String> getListFields() {
41
        final List<String> l = new ArrayList<String>();
42
        l.add("NOM");
43
        return l;
44
    }
45
 
46
    protected List<String> getComboFields() {
47
        final List<String> l = new ArrayList<String>();
48
        l.add("NOM");
49
        return l;
50
    }
51
 
52
    @Override
53
    public ListMap<String, String> getShowAs() {
54
        final ListMap<String, String> res = new ListMap<String, String>();
55
        res.add(null, "NOM");
56
        return res;
57
    }
58
 
59
    /*
60
     * (non-Javadoc)
61
     *
62
     * @see org.openconcerto.devis.SQLElement#getComponent()
63
     */
64
    public SQLComponent createComponent() {
65
        return new UISQLComponent(this) {
66
            public void addViews() {
67
                this.addRequiredSQLObject(new JTextField(), "NOM", "left");
68
            }
69
        };
70
    }
71
 
72
    @Override
73
    protected String createCode() {
156 ilm 74
        return createCodeOfPackage() + ".state";
144 ilm 75
    }
76
 
77
}