ludc
2024-09-14 36c2449aec5b51e5ed4e5c6841154b746060e09a
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
package com.vci.client.ui.table;
 
import java.util.Hashtable;
 
public class VCIBaseTableNode {
 
    public Hashtable<String, Object> htTable = null;
    private Object obj = null;
    
    public VCIBaseTableNode(Object obj) { 
        this.obj = obj;
    } 
    
    /**
     * save the key and value into hashtable. when the Hashtable is null,
     * it will create a new one.
     * 
     * @param strName
     * @param obj
     */
    public void setPropertyValueByName(String strName,Object obj)
    {
        if ( htTable == null )
            htTable = new Hashtable<String, Object>();
        htTable.put(strName,obj);
    }
    
    /**
     * get porperty value according the key from the Hashtable
     * 
     * @param strPropertyName
     * @return
     */
    public Object getPropertyValueByName(String strPropertyName)
    {
        if ( this.htTable == null )
        {
            return "";
        }
        else
        {
            if ( this.htTable.containsKey(strPropertyName) )
            {
                return htTable.get(strPropertyName);
            }
            else
                return "";
        }
    }
    
    /**
     * set the Hashtable value
     * 
     * @param ht
     */
    @SuppressWarnings("unchecked")
    public void setPropertyValues(Hashtable<String, Object> ht) {
        htTable = (Hashtable<String, Object>) ht.clone();
    }
    
    /**
     * get the Hashtable value
     * 
     * @return
     */
    public Hashtable getPropertyHashtable() {
        return this.htTable;
    }
    
    public Object getObj() {
        return this.obj;
    }
 
    public void setObj(Object obj) {
        this.obj = obj;
    }
}