OpenConcerto

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

svn://code.openconcerto.org/openconcerto

Rev

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

Rev Author Line No. Line
76 ilm 1
/*
2
 * Créé le 17 mai 2012
3
 */
4
package org.openconcerto.modules.subscription.element;
5
 
6
import java.util.ArrayList;
7
import java.util.List;
8
 
9
import org.openconcerto.erp.core.common.element.ComptaSQLConfElement;
10
import org.openconcerto.sql.element.SQLComponent;
11
import org.openconcerto.utils.CollectionMap;
12
 
13
public class SubscriptionSQLElement extends ComptaSQLConfElement {
14
 
15
    public SubscriptionSQLElement() {
16
        super("ABONNEMENT", "un abonnement", "abonnements");
17
    }
18
 
19
    @Override
20
    protected List<String> getListFields() {
21
        final List<String> l = new ArrayList<String>();
22
        l.add("NUMERO");
23
        l.add("DATE");
24
        l.add("NOM");
25
        l.add("ID_CLIENT");
26
        l.add("DESCRIPTION");
27
        return l;
28
    }
29
 
30
    @Override
31
    protected List<String> getComboFields() {
32
        final List<String> l = new ArrayList<String>();
33
        l.add("NUMERO");
34
        l.add("NOM");
35
        l.add("ID_CLIENT");
36
        return l;
37
    }
38
 
39
    @Override
40
    public CollectionMap<String, String> getShowAs() {
41
        return CollectionMap.singleton(null, "NUMERO");
42
    }
43
 
44
    @Override
45
    public SQLComponent createComponent() {
46
        return new SubscriptionSQLComponent(this);
47
    }
48
 
49
    @Override
50
    protected String createCode() {
51
        return createCodeFromPackage();
52
    }
53
}