1 | public class PropertySet {
↵ | | 1 | public class Model {↵
|
2 | private Long id;
↵ | | 2 | private String id;↵
|
3 | private String name;
↵ | | 3 | private String name;↵
|
4 | private PropertyValue someSpecificProperty;↵ | | 4 | private ↵
|
5 | private Map generalProperties = new HashMap();↵ | | |
|
|
6 | public PropertySet() {↵ | | |
|
7 | }↵ | | |
|
|
8 | public PropertySet(String name↵ | | 5 | String description;↵
|
| | | 6 | private ProductLine productLine;↵
|
| | | 7 | ↵
|
| | | 8 | Model() {}↵
|
| | | 9 | ↵
|
9 | ) {
↵ | | 10 | public Model(ProductLine pl) {↵
|
10 | this.name = name;↵ | | 11 | this.↵
|
11 | }↵ | | |
|
12 |
↵ | | 12 | productLine = pl;↵
|
| | | 13 | pl.getModels().add(this);↵
|
| | | 14 | }↵
|
| | | 15 | ↵
|
13 | public Long getId() {
↵ | | 16 | public String getDescription() {↵
|
14 | return id;↵ | | 17 | return ↵
|
15 | }↵ | | |
|
16 |
↵ | | 18 | description;↵
|
| | | 19 | }↵
|
17 | public void setId(Long id) {
↵ | | 20 | public void setDescription(String description) {↵
|
18 | this.id = id;↵ | | 21 | this.↵
|
19 | }↵ | | |
|
20 |
↵ | | 22 | description = description;↵
|
| | | 23 | }↵
|
21 | public String getName() {
↵ | | 24 | public String getId() {↵
|
22 | return name;↵ | | 25 | return ↵
|
23 | }↵ | | |
|
24 |
↵ | | 26 | id;↵
|
| | | 27 | }↵
|
25 | public void setName(String name) {
↵ | | 28 | public void setId(String id) {↵
|
26 | this.name = name;↵ | | 29 | this.↵
|
27 | }↵ | | |
|
|
28 | public PropertyValue getSomeSpecificProperty↵ | | 30 | id = id;↵
|
| | | 31 | }↵
|
29 | () {
↵ | | 32 | public String getName() {↵
|
30 | return someSpecificProperty;↵ | | 33 | return ↵
|
31 | }↵ | | |
|
32 |
↵ | | 34 | name;↵
|
| | | 35 | }↵
|
33 | public void setSomeSpecificProperty(PropertyValue someSpecificProperty) {
↵ | | 36 | public void setName(String name) {↵
|
34 | this.someSpecificProperty = someSpecificProperty;↵ | | 37 | this.↵
|
35 | }↵ | | |
|
|
36 | public Map getGeneralProperties↵ | | 38 | name = name;↵
|
| | | 39 | }↵
|
37 | () {
↵ | | 40 | public ProductLine getProductLine() {↵
|
38 | return generalProperties;↵ | | 41 | return ↵
|
39 | }↵ | | |
|
|
40 | public void setGeneralProperties(Map generalProperties↵ | | 42 | productLine;↵
|
| | | 43 | }↵
|
41 | ) {
↵ | | 44 | public void setProductLine(ProductLine productLine) {↵
|
42 | this.generalProperties = generalProperties;
↵ | | 45 | this.productLine = productLine;↵
|
43 | | | 46 |
|