1 | public class PropertySet {↵ | | 1 | public class ↵
|
2 | ↵ | | 2 | G↵
|
| | | 3 | {↵
|
| | | 4 | // Constants -----------------------------------------------------------------------------------↵
|
|
| | | 5 | // Static --------------------------------------------------------------------------------------↵
|
|
| | | 6 | // Attributes ----------------------------------------------------------------------------------↵
|
|
3 | private Long id;↵ | | 7 | private long id;↵
|
4 | ↵ | | |
|
5 | private String name;↵ | | 8 | private String ↵
|
6 | private PropertyValue someSpecificProperty;↵ | | |
|
7 | private Map generalProperties = new HashMap();↵ | | |
|
|
8 | public PropertySet() {↵ | | |
|
9 | ↵ | | 9 | data;↵
|
|
| | | 10 | // A 1 <-> 1 G↵
|
| | | 11 | private A a;↵
|
|
| | | 12 | // G * <-> * H↵
|
| | | 13 | private Set hs;↵
|
|
| | | 14 | // Constructors --------------------------------------------------------------------------------↵
|
|
| | | 15 | public G()↵
|
| | | 16 | {↵
|
| | | 17 | this(null);↵
|
10 | }↵ | | 18 | }↵
|
|
11 | public PropertySet(String name) {↵ | | 19 | public ↵
|
12 | this.name = name;↵ | | |
|
13 | }↵ | | |
|
|
14 | ↵ | | 20 | G(String data)↵
|
| | | 21 | {↵
|
| | | 22 | this.data = data;↵
|
| | | 23 | hs = new HashSet();↵
|
| | | 24 | }↵
|
|
| | | 25 | // Public --------------------------------------------------------------------------------------↵
|
|
15 | public Long getId() {↵ | | 26 | public String get↵
|
16 | return id;↵ | | |
|
17 | ↵ | | 27 | Data()↵
|
| | | 28 | {↵
|
| | | 29 | return data;↵
|
18 | }↵ | | 30 | }↵
|
|
19 | public void setId(Long id) {↵ | | 31 | public void set↵
|
20 | ↵ | | 32 | Data(String data)↵
|
| | | 33 | {↵
|
21 | this.id = id;↵ | | 34 | this.↵
|
22 | ↵ | | 35 | data = data;↵
|
23 | }↵ | | 36 | }↵
|
|
24 | public String getName() {↵ | | 37 | public ↵
|
25 | return name;↵ | | |
|
26 | ↵ | | 38 | A getA()↵
|
| | | 39 | {↵
|
| | | 40 | return a;↵
|
27 | }↵ | | 41 | }↵
|
|
28 | public void setName(String name) {↵ | | 42 | public void set↵
|
29 | ↵ | | 43 | A(A a)↵
|
| | | 44 | {↵
|
30 | this.name = name;↵ | | 45 | this.↵
|
31 | ↵ | | 46 | a = a;↵
|
32 | }↵ | | 47 | }↵
|
|
33 | public PropertyValue getSomeSpecificProperty() {↵ | | 48 | public ↵
|
34 | return someSpecificProperty;↵ | | |
|
35 | ↵ | | 49 | Set getHs()↵
|
| | | 50 | {↵
|
| | | 51 | return hs;↵
|
36 | }↵ | | 52 | }↵
|
|
37 | public void setSomeSpecificProperty(PropertyValue someSpecificProperty) {↵ | | 53 | public void set↵
|
38 | this.someSpecificProperty = someSpecificProperty;↵ | | |
|
39 | }↵ | | |
|
|
40 | public Map getGeneralProperties() {↵ | | |
|
41 | return generalProperties;↵ | | |
|
42 | }↵ | | |
|
|
43 | public void setGeneralProperties(Map generalProperties) {↵ | | |
|
44 | this.generalProperties = generalProperties | | 54 | Hs(Set s)↵
|
| | | 55 | {↵
|
| | | 56 | hs = s;↵
|
| | | 57 | }↵
|
|
| | | 58 | // Package protected ---------------------------------------------------------------------------↵
|
|
| | | 59 | long getId()↵
|
| | | 60 | {↵
|
| | | 61 | return id;↵
|
| | | 62 | }↵
|
|
| | | 63 | // Protected -----------------------------------------------------------------------------------↵
|
|
| | | 64 | // Private -------------------------------------------------------------------------------------↵
|
|
| | | 65 | private void setId(long id)↵
|
| | | 66 | {↵
|
| | | 67 | this.id = id
|