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 18 oct. 2011
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
public class DemandePrixItemSQLElement extends ComptaSQLConfElement {
28
 
29
    public DemandePrixItemSQLElement() {
30
        super("DEMANDE_PRIX_ELEMENT", "un élement de demande de prix", "élements de demandes de prix");
31
    }
32
 
33
    @Override
34
    protected List<String> getListFields() {
35
        final List<String> l = new ArrayList<String>();
36
        l.add("CODE");
37
        l.add("NOM");
38
        return l;
39
    }
40
 
41
    @Override
42
    protected String getParentFFName() {
43
        return "ID_DEMANDE_PRIX";
44
    }
45
 
46
    // @Override
47
    // public Set<String> getReadOnlyFields() {
48
    // Set<String> s = new HashSet<String>(super.getReadOnlyFields());
49
    // s.add("NUMERO_CARTE");
50
    // return s;
51
    // }
52
 
53
    @Override
54
    protected List<String> getComboFields() {
55
        final List<String> l = new ArrayList<String>();
56
        l.add("CODE");
57
        l.add("NOM");
58
        return l;
59
    }
60
 
61
    @Override
62
    public ListMap<String, String> getShowAs() {
63
        return ListMap.singleton(null, getComboFields());
64
    }
65
 
66
    @Override
67
    public SQLComponent createComponent() {
68
        return new UISQLComponent(this) {
69
 
70
            @Override
71
            protected void addViews() {
72
                this.addView("CODE");
73
                this.addView("NOM");
74
 
75
            }
76
        };
77
    }
78
 
79
    @Override
80
    protected String createCode() {
156 ilm 81
        return createCodeOfPackage() + ".demande.item";
144 ilm 82
    }
83
 
84
}