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.finance.accounting.element;
|
|
|
15 |
|
|
|
16 |
import org.openconcerto.erp.core.common.element.ComptaSQLConfElement;
|
|
|
17 |
import org.openconcerto.sql.element.BaseSQLComponent;
|
|
|
18 |
import org.openconcerto.sql.element.SQLComponent;
|
|
|
19 |
|
|
|
20 |
import java.util.ArrayList;
|
|
|
21 |
import java.util.List;
|
|
|
22 |
|
19 |
ilm |
23 |
import javax.swing.JTextField;
|
|
|
24 |
|
18 |
ilm |
25 |
public class ClasseCompteSQLElement extends ComptaSQLConfElement {
|
|
|
26 |
|
|
|
27 |
private static final String NOM = "NOM";
|
|
|
28 |
|
|
|
29 |
public ClasseCompteSQLElement() {
|
|
|
30 |
super("CLASSE_COMPTE", "Classe de compte", "Classes de compte");
|
|
|
31 |
}
|
|
|
32 |
|
|
|
33 |
protected List<String> getListFields() {
|
|
|
34 |
final List<String> list = new ArrayList<String>(1);
|
|
|
35 |
list.add(NOM);
|
|
|
36 |
return list;
|
|
|
37 |
}
|
|
|
38 |
|
|
|
39 |
protected List<String> getComboFields() {
|
|
|
40 |
final List<String> list = new ArrayList<String>(1);
|
|
|
41 |
list.add(NOM);
|
|
|
42 |
return list;
|
|
|
43 |
}
|
|
|
44 |
|
|
|
45 |
public SQLComponent createComponent() {
|
|
|
46 |
return new BaseSQLComponent(this) {
|
|
|
47 |
public void addViews() {
|
|
|
48 |
this.addSQLObject(new JTextField(), NOM);
|
|
|
49 |
this.addSQLObject(new JTextField(), "TYPE_NUMERO_COMPTE");
|
|
|
50 |
}
|
|
|
51 |
};
|
|
|
52 |
}
|
57 |
ilm |
53 |
|
|
|
54 |
@Override
|
|
|
55 |
protected String createCode() {
|
|
|
56 |
return createCodeFromPackage() + ".accountclass";
|
|
|
57 |
}
|
18 |
ilm |
58 |
}
|