Subversion Repositories SmartDukaan

Rev

Rev 21 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 21 Rev 45
Line 8... Line 8...
8
 
8
 
9
import java.util.ArrayList;
9
import java.util.ArrayList;
10
import java.util.List;
10
import java.util.List;
11
 
11
 
12
/**
12
/**
-
 
13
 * Entity class is the center of shop2020 content meta-model. Represents 
-
 
14
 * a Product that is part of shop2020 online shopping catalog. 
-
 
15
 * 
-
 
16
 * It is composed of other classes in meta-model core package, 
-
 
17
 * classes in meta-model definition package define its structure.
13
 * 
18
 * 
14
 * @author naveen
19
 * @author naveen
15
 *
20
 *
16
 */
21
 */
17
public class Entity extends ReusableMetaModelComponent {
22
public class Entity extends ReusableMetaModelComponent {
18
    /**
23
    /**
19
	 * 
24
	 * 
20
	 */
25
	 */
21
	private static final long serialVersionUID = 1L;
26
	private static final long serialVersionUID = 1L;
-
 
27
	
-
 
28
	/**
-
 
29
	 * Pointer to entity's category 
-
 
30
	 */
22
	private long categoryID;
31
	private long categoryID;
-
 
32
	
-
 
33
	/**
-
 
34
	 * Manufacturer brand
-
 
35
	 */
23
	private String brand;
36
	private String brand;
-
 
37
	
-
 
38
	/**
-
 
39
	 * Manufacturer provided Model Number
-
 
40
	 */
24
	private String modelNumber;
41
	private String modelNumber;
-
 
42
	
-
 
43
	/**
-
 
44
	 * Manufacturer provided Model Name
-
 
45
	 */
25
	private String modelName;
46
	private String modelName;
-
 
47
	
-
 
48
	/**
-
 
49
	 * List of slides that describe the entity
-
 
50
	 */
26
	private List<Slide> slides;
51
	private List<Slide> slides;
27
 
52
 
28
	/**
53
	/**
29
	 * 
54
	 * 
30
	 * @param newID
55
	 * @param newID Unique identifier
31
	 * @param categoryID
56
	 * @param categoryID Category ID
32
	 */
57
	 */
33
    public Entity(long newID, long categoryID) {
58
    public Entity(long newID, long categoryID) {
34
    	super(newID);
59
    	super(newID);
35
    	this.categoryID = categoryID;
60
    	this.categoryID = categoryID;
36
    }
61
    }
Line 44... Line 69...
44
        return this.categoryID;
69
        return this.categoryID;
45
    }
70
    }
46
 
71
 
47
    /**
72
    /**
48
     * 
73
     * 
49
     * @param value
74
     * @param value Category ID to set
50
     *     
75
     *     
51
     */
76
     */
52
    public void setCategoryID(int value) {
77
    public void setCategoryID(int value) {
53
        this.categoryID = value;
78
        this.categoryID = value;
54
    }
79
    }
Line 62... Line 87...
62
        return this.brand;
87
        return this.brand;
63
    }
88
    }
64
 
89
 
65
    /**
90
    /**
66
     * 
91
     * 
67
     * @param value
92
     * @param value Brand to set
68
     *     
93
     *     
69
     */
94
     */
70
    public void setBrand(String value) {
95
    public void setBrand(String value) {
71
        this.brand = value;
96
        this.brand = value;
72
    }
97
    }
73
 
98
 
74
    /**
99
    /**
75
     * 
100
     * 
76
     * @return modelNumber
101
     * @return modelNumber Model Number 
77
     *     
102
     *     
78
     */
103
     */
79
    public String getModelNumber() {
104
    public String getModelNumber() {
80
        return this.modelNumber;
105
        return this.modelNumber;
81
    }
106
    }
82
 
107
 
83
    /**
108
    /**
84
     * 
109
     * 
85
     * @param value
110
     * @param value Model Number to set
86
     *     
111
     *     
87
     */
112
     */
88
    public void setModelNumber(String value) {
113
    public void setModelNumber(String value) {
89
        this.modelNumber = value;
114
        this.modelNumber = value;
90
    }
115
    }
91
 
116
 
92
    /**
117
    /**
93
     * 
118
     * 
94
     * @return modelName
119
     * @return modelName Model Name
95
     *     
120
     *     
96
     */
121
     */
97
    public String getModelName() {
122
    public String getModelName() {
98
        return this.modelName;
123
        return this.modelName;
99
    }
124
    }
100
 
125
 
101
    /**
126
    /**
102
     * 
127
     * 
103
     * @param value
128
     * @param value Model Name to set
104
     *     
129
     *     
105
     */
130
     */
106
    public void setModelName(String value) {
131
    public void setModelName(String value) {
107
        this.modelName = value;
132
        this.modelName = value;
108
    }
133
    }
Line 116... Line 141...
116
        return this.slides;
141
        return this.slides;
117
    }
142
    }
118
    
143
    
119
    /**
144
    /**
120
     * 
145
     * 
121
     * @param slide
146
     * @param slide to add new slides to an entity
122
     */
147
     */
123
    public void addSlide(Slide slide) {
148
    public void addSlide(Slide slide) {
124
    	if(this.slides == null) {
149
    	if(this.slides == null) {
125
    		this.slides = new ArrayList<Slide>();
150
    		this.slides = new ArrayList<Slide>();
126
    	}
151
    	}
127
    	this.slides.add(slide);
152
    	this.slides.add(slide);
128
    }
153
    }
129
    
154
    
130
    /**
155
    /**
131
     * 
156
     * 
132
     * @param value
157
     * @param value list of slides to set
133
     *     
158
     *     
134
     */
159
     */
135
    public void setSlides(List<Slide> value) {
160
    public void setSlides(List<Slide> value) {
136
        this.slides = value;
161
        this.slides = value;
137
    }
162
    }