OpenConcerto

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

svn://code.openconcerto.org/openconcerto

Rev

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

Rev 17 Rev 61
Line 14... Line 14...
14
 /*
14
 /*
15
 * IComboSelectionItem created on 24 oct. 2003
15
 * IComboSelectionItem created on 24 oct. 2003
16
 */
16
 */
17
package org.openconcerto.sql.sqlobject;
17
package org.openconcerto.sql.sqlobject;
18
 
18
 
-
 
19
import org.openconcerto.sql.model.SQLRowAccessor;
19
import org.openconcerto.ui.component.combo.VarDesc;
20
import org.openconcerto.ui.component.combo.VarDesc;
20
 
21
 
21
/**
22
/**
22
 * @author ILM Informatique
23
 * @author ILM Informatique
23
 */
24
 */
Line 26... Line 27...
26
    public static final int NO_FLAG = 0;
27
    public static final int NO_FLAG = 0;
27
    public static final int WARNING_FLAG = 1;
28
    public static final int WARNING_FLAG = 1;
28
    public static final int ERROR_FLAG = 2;
29
    public static final int ERROR_FLAG = 2;
29
    public static final int IMPORTANT_FLAG = 3;
30
    public static final int IMPORTANT_FLAG = 3;
30
 
31
 
-
 
32
    private final SQLRowAccessor row;
31
    private final int fId;
33
    private final int fId;
32
    private final String fLabel;
34
    private final String fLabel;
33
    private int flag;
35
    private int flag;
34
 
36
 
35
    public IComboSelectionItem(final int id, final String label) {
37
    public IComboSelectionItem(final int id, final String label) {
-
 
38
        this(null, id, label);
-
 
39
    }
-
 
40
 
-
 
41
    public IComboSelectionItem(final SQLRowAccessor row, final String label) {
-
 
42
        this(row, row.getID(), label);
-
 
43
    }
-
 
44
 
-
 
45
    private IComboSelectionItem(final SQLRowAccessor row, final int id, final String label) {
-
 
46
        this.row = row;
36
        this.fId = id;
47
        this.fId = id;
37
        this.fLabel = label;
48
        this.fLabel = label;
38
        this.setFlag(NO_FLAG);
49
        this.setFlag(NO_FLAG);
39
    }
50
    }
40
 
51
 
41
    public IComboSelectionItem(final IComboSelectionItem o) {
52
    public IComboSelectionItem(final IComboSelectionItem o) {
-
 
53
        this.row = o.row;
42
        this.fId = o.getId();
54
        this.fId = o.getId();
43
        this.fLabel = o.getLabel();
55
        this.fLabel = o.getLabel();
44
        this.setFlag(o.getFlag());
56
        this.setFlag(o.getFlag());
45
    }
57
    }
46
 
58
 
47
    public final int getId() {
59
    public final int getId() {
48
        return this.fId;
60
        return this.fId;
49
    }
61
    }
50
 
62
 
-
 
63
    public final SQLRowAccessor getRow() {
-
 
64
        return this.row;
-
 
65
    }
-
 
66
 
51
    public final String getLabel() {
67
    public final String getLabel() {
52
        return this.fLabel;
68
        return this.fLabel;
53
    }
69
    }
54
 
70
 
55
    public final int getFlag() {
71
    public final int getFlag() {