001
014
015 package com.liferay.portlet.shopping.model;
016
017 import com.liferay.portal.kernel.util.Validator;
018 import com.liferay.portal.model.ModelWrapper;
019
020 import java.util.Date;
021 import java.util.HashMap;
022 import java.util.Map;
023
024
033 public class ShoppingOrderItemWrapper implements ShoppingOrderItem,
034 ModelWrapper<ShoppingOrderItem> {
035 public ShoppingOrderItemWrapper(ShoppingOrderItem shoppingOrderItem) {
036 _shoppingOrderItem = shoppingOrderItem;
037 }
038
039 public Class<?> getModelClass() {
040 return ShoppingOrderItem.class;
041 }
042
043 public String getModelClassName() {
044 return ShoppingOrderItem.class.getName();
045 }
046
047 public Map<String, Object> getModelAttributes() {
048 Map<String, Object> attributes = new HashMap<String, Object>();
049
050 attributes.put("orderItemId", getOrderItemId());
051 attributes.put("orderId", getOrderId());
052 attributes.put("itemId", getItemId());
053 attributes.put("sku", getSku());
054 attributes.put("name", getName());
055 attributes.put("description", getDescription());
056 attributes.put("properties", getProperties());
057 attributes.put("price", getPrice());
058 attributes.put("quantity", getQuantity());
059 attributes.put("shippedDate", getShippedDate());
060
061 return attributes;
062 }
063
064 public void setModelAttributes(Map<String, Object> attributes) {
065 Long orderItemId = (Long)attributes.get("orderItemId");
066
067 if (orderItemId != null) {
068 setOrderItemId(orderItemId);
069 }
070
071 Long orderId = (Long)attributes.get("orderId");
072
073 if (orderId != null) {
074 setOrderId(orderId);
075 }
076
077 String itemId = (String)attributes.get("itemId");
078
079 if (itemId != null) {
080 setItemId(itemId);
081 }
082
083 String sku = (String)attributes.get("sku");
084
085 if (sku != null) {
086 setSku(sku);
087 }
088
089 String name = (String)attributes.get("name");
090
091 if (name != null) {
092 setName(name);
093 }
094
095 String description = (String)attributes.get("description");
096
097 if (description != null) {
098 setDescription(description);
099 }
100
101 String properties = (String)attributes.get("properties");
102
103 if (properties != null) {
104 setProperties(properties);
105 }
106
107 Double price = (Double)attributes.get("price");
108
109 if (price != null) {
110 setPrice(price);
111 }
112
113 Integer quantity = (Integer)attributes.get("quantity");
114
115 if (quantity != null) {
116 setQuantity(quantity);
117 }
118
119 Date shippedDate = (Date)attributes.get("shippedDate");
120
121 if (shippedDate != null) {
122 setShippedDate(shippedDate);
123 }
124 }
125
126
131 public long getPrimaryKey() {
132 return _shoppingOrderItem.getPrimaryKey();
133 }
134
135
140 public void setPrimaryKey(long primaryKey) {
141 _shoppingOrderItem.setPrimaryKey(primaryKey);
142 }
143
144
149 public long getOrderItemId() {
150 return _shoppingOrderItem.getOrderItemId();
151 }
152
153
158 public void setOrderItemId(long orderItemId) {
159 _shoppingOrderItem.setOrderItemId(orderItemId);
160 }
161
162
167 public long getOrderId() {
168 return _shoppingOrderItem.getOrderId();
169 }
170
171
176 public void setOrderId(long orderId) {
177 _shoppingOrderItem.setOrderId(orderId);
178 }
179
180
185 public java.lang.String getItemId() {
186 return _shoppingOrderItem.getItemId();
187 }
188
189
194 public void setItemId(java.lang.String itemId) {
195 _shoppingOrderItem.setItemId(itemId);
196 }
197
198
203 public java.lang.String getSku() {
204 return _shoppingOrderItem.getSku();
205 }
206
207
212 public void setSku(java.lang.String sku) {
213 _shoppingOrderItem.setSku(sku);
214 }
215
216
221 public java.lang.String getName() {
222 return _shoppingOrderItem.getName();
223 }
224
225
230 public void setName(java.lang.String name) {
231 _shoppingOrderItem.setName(name);
232 }
233
234
239 public java.lang.String getDescription() {
240 return _shoppingOrderItem.getDescription();
241 }
242
243
248 public void setDescription(java.lang.String description) {
249 _shoppingOrderItem.setDescription(description);
250 }
251
252
257 public java.lang.String getProperties() {
258 return _shoppingOrderItem.getProperties();
259 }
260
261
266 public void setProperties(java.lang.String properties) {
267 _shoppingOrderItem.setProperties(properties);
268 }
269
270
275 public double getPrice() {
276 return _shoppingOrderItem.getPrice();
277 }
278
279
284 public void setPrice(double price) {
285 _shoppingOrderItem.setPrice(price);
286 }
287
288
293 public int getQuantity() {
294 return _shoppingOrderItem.getQuantity();
295 }
296
297
302 public void setQuantity(int quantity) {
303 _shoppingOrderItem.setQuantity(quantity);
304 }
305
306
311 public java.util.Date getShippedDate() {
312 return _shoppingOrderItem.getShippedDate();
313 }
314
315
320 public void setShippedDate(java.util.Date shippedDate) {
321 _shoppingOrderItem.setShippedDate(shippedDate);
322 }
323
324 public boolean isNew() {
325 return _shoppingOrderItem.isNew();
326 }
327
328 public void setNew(boolean n) {
329 _shoppingOrderItem.setNew(n);
330 }
331
332 public boolean isCachedModel() {
333 return _shoppingOrderItem.isCachedModel();
334 }
335
336 public void setCachedModel(boolean cachedModel) {
337 _shoppingOrderItem.setCachedModel(cachedModel);
338 }
339
340 public boolean isEscapedModel() {
341 return _shoppingOrderItem.isEscapedModel();
342 }
343
344 public java.io.Serializable getPrimaryKeyObj() {
345 return _shoppingOrderItem.getPrimaryKeyObj();
346 }
347
348 public void setPrimaryKeyObj(java.io.Serializable primaryKeyObj) {
349 _shoppingOrderItem.setPrimaryKeyObj(primaryKeyObj);
350 }
351
352 public com.liferay.portlet.expando.model.ExpandoBridge getExpandoBridge() {
353 return _shoppingOrderItem.getExpandoBridge();
354 }
355
356 public void setExpandoBridgeAttributes(
357 com.liferay.portal.service.ServiceContext serviceContext) {
358 _shoppingOrderItem.setExpandoBridgeAttributes(serviceContext);
359 }
360
361 @Override
362 public java.lang.Object clone() {
363 return new ShoppingOrderItemWrapper((ShoppingOrderItem)_shoppingOrderItem.clone());
364 }
365
366 public int compareTo(
367 com.liferay.portlet.shopping.model.ShoppingOrderItem shoppingOrderItem) {
368 return _shoppingOrderItem.compareTo(shoppingOrderItem);
369 }
370
371 @Override
372 public int hashCode() {
373 return _shoppingOrderItem.hashCode();
374 }
375
376 public com.liferay.portal.model.CacheModel<com.liferay.portlet.shopping.model.ShoppingOrderItem> toCacheModel() {
377 return _shoppingOrderItem.toCacheModel();
378 }
379
380 public com.liferay.portlet.shopping.model.ShoppingOrderItem toEscapedModel() {
381 return new ShoppingOrderItemWrapper(_shoppingOrderItem.toEscapedModel());
382 }
383
384 public com.liferay.portlet.shopping.model.ShoppingOrderItem toUnescapedModel() {
385 return new ShoppingOrderItemWrapper(_shoppingOrderItem.toUnescapedModel());
386 }
387
388 @Override
389 public java.lang.String toString() {
390 return _shoppingOrderItem.toString();
391 }
392
393 public java.lang.String toXmlString() {
394 return _shoppingOrderItem.toXmlString();
395 }
396
397 public void persist()
398 throws com.liferay.portal.kernel.exception.SystemException {
399 _shoppingOrderItem.persist();
400 }
401
402 @Override
403 public boolean equals(Object obj) {
404 if (this == obj) {
405 return true;
406 }
407
408 if (!(obj instanceof ShoppingOrderItemWrapper)) {
409 return false;
410 }
411
412 ShoppingOrderItemWrapper shoppingOrderItemWrapper = (ShoppingOrderItemWrapper)obj;
413
414 if (Validator.equals(_shoppingOrderItem,
415 shoppingOrderItemWrapper._shoppingOrderItem)) {
416 return true;
417 }
418
419 return false;
420 }
421
422
425 public ShoppingOrderItem getWrappedShoppingOrderItem() {
426 return _shoppingOrderItem;
427 }
428
429 public ShoppingOrderItem getWrappedModel() {
430 return _shoppingOrderItem;
431 }
432
433 public void resetOriginalValues() {
434 _shoppingOrderItem.resetOriginalValues();
435 }
436
437 private ShoppingOrderItem _shoppingOrderItem;
438 }