OpenConcerto

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

svn://code.openconcerto.org/openconcerto

Rev

Rev 18 | 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.timesheet.element;
15
 
156 ilm 16
import org.openconcerto.erp.core.common.element.ComptaSQLConfElement;
18 ilm 17
import org.openconcerto.sql.element.SQLComponent;
18
import org.openconcerto.sql.element.UISQLComponent;
156 ilm 19
import org.openconcerto.sql.model.DBRoot;
18 ilm 20
import org.openconcerto.sql.sqlobject.ElementComboBox;
21
import org.openconcerto.ui.JDate;
22
 
23
import java.util.ArrayList;
24
import java.util.List;
25
 
26
import javax.swing.JTextField;
27
 
156 ilm 28
public class PointageSQLElement extends ComptaSQLConfElement {
18 ilm 29
 
156 ilm 30
    public PointageSQLElement(final DBRoot root) {
31
        super(root.getTable("POINTAGE"));
18 ilm 32
    }
33
 
34
    @Override
35
    protected List<String> getListFields() {
36
        final List<String> l = new ArrayList<String>();
37
        l.add("ACTION");
38
        l.add("CARTE");
39
        l.add("ID_USER_COMMON");
40
        l.add("DATE");
41
        return l;
42
    }
43
 
44
    @Override
45
    protected List<String> getComboFields() {
46
        final List<String> l = new ArrayList<String>();
47
        l.add("ID_USER_COMMON");
48
        return l;
49
    }
50
 
51
    /*
52
     * (non-Javadoc)
53
     *
54
     * @see org.openconcerto.devis.SQLElement#getComponent()
55
     */
56
    @Override
57
    public SQLComponent createComponent() {
58
        return new UISQLComponent(this) {
59
            public void addViews() {
60
                this.addSQLObject(new JTextField(), "ACTION", "right");
61
                this.addSQLObject(new JTextField(), "CARTE", "left");
62
                this.addSQLObject(new JDate(), "DATE", "right");
63
                this.addSQLObject(new ElementComboBox(), "ID_USER_COMMON", "left");
64
            }
65
        };
66
    }
67
}