OpenConcerto

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

svn://code.openconcerto.org/openconcerto

Rev

Rev 61 | Rev 156 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
18 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
 package org.openconcerto.erp.core.humanresources.employe.element;
15
 
16
import org.openconcerto.erp.core.common.element.ComptaSQLConfElement;
17
import org.openconcerto.sql.element.SQLComponent;
132 ilm 18
import org.openconcerto.utils.ListMap;
18 ilm 19
 
20
import java.util.ArrayList;
21
import java.util.List;
22
 
23
public class CommercialSQLElement extends ComptaSQLConfElement {
24
 
25
    public CommercialSQLElement() {
26
        super("COMMERCIAL", "un commercial", "commerciaux");
27
    }
28
 
29
    public CommercialSQLElement(String tableName, String singular, String plural) {
30
        super(tableName, singular, plural);
31
    }
32
 
33
    protected List<String> getListFields() {
34
        final List<String> l = new ArrayList<String>();
35
        l.add("NOM");
36
        l.add("PRENOM");
37
        l.add("FONCTION");
38
        l.add("TEL_STANDARD");
39
        l.add("TEL_DIRECT");
40
        return l;
41
    }
42
 
43
    protected List<String> getComboFields() {
44
        final List<String> l = new ArrayList<String>();
132 ilm 45
        l.add("PRENOM");
18 ilm 46
        l.add("NOM");
47
        l.add("FONCTION");
48
        return l;
49
    }
50
 
28 ilm 51
    @Override
132 ilm 52
    public ListMap<String, String> getShowAs() {
53
        final ListMap<String, String> res = new ListMap<String, String>();
54
        res.putCollection(null, "NOM");
28 ilm 55
        return res;
56
    }
57
 
18 ilm 58
    /*
59
     * (non-Javadoc)
60
     *
61
     * @see org.openconcerto.devis.SQLElement#getComponent()
62
     */
63
    public SQLComponent createComponent() {
61 ilm 64
        return new CommercialSQLComponent(this);
18 ilm 65
    }
57 ilm 66
 
67
    @Override
68
    protected String createCode() {
69
        return super.createCodeFromPackage() + ".salesman";
70
    }
18 ilm 71
}