OpenConcerto

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

svn://code.openconcerto.org/openconcerto

Rev

Rev 83 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
17 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.sql.element;
15
 
16
import org.openconcerto.sql.Configuration;
17
import org.openconcerto.sql.model.SQLTable;
83 ilm 18
import org.openconcerto.utils.i18n.Phrase;
17 ilm 19
 
20
import java.util.Collections;
21
import java.util.List;
22
 
23
/**
24
 * @author Sylvain CUAZ
25
 */
26
public class ConfSQLElement extends SQLElement {
27
 
73 ilm 28
    public ConfSQLElement(String tableName) {
83 ilm 29
        this(tableName, null);
73 ilm 30
    }
31
 
32
    public ConfSQLElement(Configuration conf, String tableName) {
83 ilm 33
        this(conf, tableName, null);
73 ilm 34
    }
35
 
83 ilm 36
    public ConfSQLElement(String tableName, final Phrase name) {
37
        this(Configuration.getInstance(), tableName, name);
38
    }
39
 
40
    public ConfSQLElement(Configuration conf, String tableName, final Phrase name) {
156 ilm 41
        this(conf, tableName, name, null);
83 ilm 42
    }
43
 
156 ilm 44
    public ConfSQLElement(Configuration conf, String tableName, final Phrase name, final String code) {
45
        this(conf.getRoot().findTable(tableName), name, code);
46
    }
47
 
48
    public ConfSQLElement(final SQLTable table) {
49
        this(table, null);
50
    }
51
 
83 ilm 52
    public ConfSQLElement(final SQLTable primaryTable, final Phrase name) {
156 ilm 53
        this(primaryTable, name, null);
83 ilm 54
    }
55
 
156 ilm 56
    public ConfSQLElement(final SQLTable primaryTable, final Phrase name, final String code) {
57
        super(primaryTable, name, code);
58
    }
59
 
17 ilm 60
    @Override
61
    protected List<String> getComboFields() {
62
        return Collections.emptyList();
63
    }
64
 
65
    @Override
66
    protected List<String> getListFields() {
67
        return Collections.emptyList();
68
    }
69
 
70
    @Override
71
    public SQLComponent createComponent() {
72
        return null;
73
    }
74
}