OpenConcerto

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

svn://code.openconcerto.org/openconcerto

Rev

Rev 151 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 151 Rev 156
Line 11... Line 11...
11
 * When distributing the software, include this License Header Notice in each file.
11
 * When distributing the software, include this License Header Notice in each file.
12
 */
12
 */
13
 
13
 
14
 package org.openconcerto.erp.core.common.element;
14
 package org.openconcerto.erp.core.common.element;
15
 
15
 
16
import org.openconcerto.erp.config.Gestion;
-
 
17
import org.openconcerto.sql.Configuration;
16
import org.openconcerto.sql.Configuration;
18
import org.openconcerto.sql.model.DBRoot;
17
import org.openconcerto.sql.model.DBRoot;
19
import org.openconcerto.sql.model.SQLTable;
18
import org.openconcerto.sql.model.SQLTable;
20
import org.openconcerto.task.config.ComptaBasePropsConfiguration;
19
import org.openconcerto.task.config.ComptaBasePropsConfiguration;
21
 
20
 
Line 33... Line 32...
33
        if (baseSociete == null)
32
        if (baseSociete == null)
34
            baseSociete = ((ComptaBasePropsConfiguration) Configuration.getInstance()).getRootSociete();
33
            baseSociete = ((ComptaBasePropsConfiguration) Configuration.getInstance()).getRootSociete();
35
        return baseSociete;
34
        return baseSociete;
36
    }
35
    }
37
 
36
 
38
    {
37
    protected static SQLTable findTable(String tableName) {
39
        this.setL18nLocation(Gestion.class);
38
        return getBaseSociete().findTable(tableName, true);
40
    }
39
    }
41
 
40
 
42
    public ComptaSQLConfElement(String tableName, String singular, String plural) {
41
    public ComptaSQLConfElement(String tableName, String singular, String plural) {
43
        super(getBaseSociete().findTable(tableName, true), singular, plural);
42
        this(findTable(tableName), singular, plural);
-
 
43
    }
-
 
44
 
-
 
45
    public ComptaSQLConfElement(SQLTable table, String singular, String plural) {
-
 
46
        super(table, singular, plural);
44
    }
47
    }
45
 
48
 
46
    public ComptaSQLConfElement(String tableName) {
49
    public ComptaSQLConfElement(String tableName) {
47
        this(tableName, null);
50
        this(tableName, null);
48
    }
51
    }
49
 
52
 
50
    public ComptaSQLConfElement(String tableName, String code) {
53
    public ComptaSQLConfElement(String tableName, String code) {
51
        this(getBaseSociete().findTable(tableName, true), code);
54
        this(findTable(tableName), code);
52
    }
55
    }
53
 
56
 
54
    public ComptaSQLConfElement(SQLTable table) {
57
    public ComptaSQLConfElement(SQLTable table) {
55
        this(table, null);
58
        this(table, null);
56
    }
59
    }