1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package net.sf.oness.inventory.model.product.bo;
17
18 import java.util.Collection;
19
20 import net.sf.oness.common.model.bo.AbstractBusinessObject;
21
22 /***
23 * @hibernate.class table="model"
24 *
25 * @author Carlos Sanchez
26 * @version $Revision: 1.8 $
27 */
28 public class Model extends AbstractBusinessObject {
29
30 private String name;
31
32 private String description;
33
34 private String modelNumber;
35
36 private Integer year;
37
38 private String season;
39
40 private Long supplierId;
41
42 private String imageUrl;
43
44 private Collection sizeGroups;
45
46 private Collection colors;
47
48 private Collection products;
49
50 /***
51 * @param name
52 * The name to set.
53 */
54 public void setName(String name) {
55 this.name = name;
56 }
57
58 /***
59 * @hibernate.property
60 *
61 * @return Returns the name.
62 */
63 public String getName() {
64 return name;
65 }
66
67 /***
68 * @param description
69 * The description to set.
70 */
71 public void setDescription(String description) {
72 this.description = description;
73 }
74
75 /***
76 * @hibernate.property
77 *
78 * @return Returns the description.
79 */
80 public String getDescription() {
81 return description;
82 }
83
84 /***
85 * @param modelNumber
86 * The modelNumber to set.
87 */
88 public void setModelNumber(String modelNumber) {
89 this.modelNumber = modelNumber;
90 }
91
92 /***
93 * @hibernate.property
94 *
95 * @return Returns the modelNumber.
96 */
97 public String getModelNumber() {
98 return modelNumber;
99 }
100
101 /***
102 * @param year
103 * The year to set.
104 */
105 public void setYear(Integer year) {
106 this.year = year;
107 }
108
109 /***
110 * @hibernate.property
111 *
112 * @return Returns the year.
113 */
114 public Integer getYear() {
115 return year;
116 }
117
118 /***
119 * @param season
120 * The season to set.
121 */
122 public void setSeason(String season) {
123 this.season = season;
124 }
125
126 /***
127 * @hibernate.property
128 *
129 * @return Returns the season.
130 */
131 public String getSeason() {
132 return season;
133 }
134
135 /***
136 * @param supplierId
137 * The supplierId to set.
138 */
139 public void setSupplierId(Long supplierId) {
140 this.supplierId = supplierId;
141 }
142
143 /***
144 * @hibernate.property
145 *
146 * @return Returns the supplierId.
147 */
148 public Long getSupplierId() {
149 return supplierId;
150 }
151
152 /***
153 * @param imageUrl
154 * The imageUrl to set.
155 */
156 public void setImageUrl(String imageUrl) {
157 this.imageUrl = imageUrl;
158 }
159
160 /***
161 * @hibernate.property
162 *
163 * @return Returns the imageUrl.
164 */
165 public String getImageUrl() {
166 return imageUrl;
167 }
168
169 /***
170 * @param sizeGroups
171 * The sizeGroups to set.
172 */
173 public void setSizeGroups(Collection sizeGroups) {
174 this.sizeGroups = sizeGroups;
175 }
176
177 /***
178 * @hibernate.bag table="sizegroup_model" lazy="true"
179 * @hibernate.collection-key column="model_id"
180 * @hibernate.collection-many-to-many column="sizegroup_id" class="net.sf.oness.inventory.model.product.bo.SizeGroup"
181 *
182 * @return Returns the sizeGroups.
183 */
184 public Collection getSizeGroups() {
185 return sizeGroups;
186 }
187
188 /***
189 * @param colors
190 * The colors to set.
191 */
192 public void setColors(Collection colors) {
193 this.colors = colors;
194 }
195
196 /***
197 * @hibernate.bag table="model_color" lazy="true"
198 * @hibernate.collection-key column="model_id"
199 * @hibernate.collection-many-to-many column="color_id" class="net.sf.oness.inventory.model.product.bo.Color"
200 *
201 * @return Returns the colors.
202 */
203 public Collection getColors() {
204 return colors;
205 }
206
207 /***
208 * @param products
209 * The products to set.
210 */
211 public void setProducts(Collection products) {
212 this.products = products;
213 }
214
215 /***
216 * @hibernate.bag table="model_product" lazy="true"
217 * @hibernate.collection-key column="model_id"
218 * @hibernate.collection-many-to-many column="product_id" class="net.sf.oness.inventory.model.product.bo.Product"
219 *
220 * @return Returns the products.
221 */
222 public Collection getProducts() {
223 return products;
224 }
225
226 /***
227 * @return Returns the sizeGroup.
228 */
229 public SizeGroup getSizeGroup() {
230 return (SizeGroup) sizeGroups.iterator().next();
231 }
232
233 }