001
014
015 package com.liferay.portlet.shopping.model;
016
017 import aQute.bnd.annotation.ProviderType;
018
019 import com.liferay.portal.kernel.util.Validator;
020 import com.liferay.portal.model.ModelWrapper;
021
022 import java.util.Date;
023 import java.util.HashMap;
024 import java.util.Map;
025
026
035 @ProviderType
036 public class ShoppingOrderItemWrapper implements ShoppingOrderItem,
037 ModelWrapper<ShoppingOrderItem> {
038 public ShoppingOrderItemWrapper(ShoppingOrderItem shoppingOrderItem) {
039 _shoppingOrderItem = shoppingOrderItem;
040 }
041
042 @Override
043 public Class<?> getModelClass() {
044 return ShoppingOrderItem.class;
045 }
046
047 @Override
048 public String getModelClassName() {
049 return ShoppingOrderItem.class.getName();
050 }
051
052 @Override
053 public Map<String, Object> getModelAttributes() {
054 Map<String, Object> attributes = new HashMap<String, Object>();
055
056 attributes.put("orderItemId", getOrderItemId());
057 attributes.put("orderId", getOrderId());
058 attributes.put("itemId", getItemId());
059 attributes.put("sku", getSku());
060 attributes.put("name", getName());
061 attributes.put("description", getDescription());
062 attributes.put("properties", getProperties());
063 attributes.put("price", getPrice());
064 attributes.put("quantity", getQuantity());
065 attributes.put("shippedDate", getShippedDate());
066
067 return attributes;
068 }
069
070 @Override
071 public void setModelAttributes(Map<String, Object> attributes) {
072 Long orderItemId = (Long)attributes.get("orderItemId");
073
074 if (orderItemId != null) {
075 setOrderItemId(orderItemId);
076 }
077
078 Long orderId = (Long)attributes.get("orderId");
079
080 if (orderId != null) {
081 setOrderId(orderId);
082 }
083
084 String itemId = (String)attributes.get("itemId");
085
086 if (itemId != null) {
087 setItemId(itemId);
088 }
089
090 String sku = (String)attributes.get("sku");
091
092 if (sku != null) {
093 setSku(sku);
094 }
095
096 String name = (String)attributes.get("name");
097
098 if (name != null) {
099 setName(name);
100 }
101
102 String description = (String)attributes.get("description");
103
104 if (description != null) {
105 setDescription(description);
106 }
107
108 String properties = (String)attributes.get("properties");
109
110 if (properties != null) {
111 setProperties(properties);
112 }
113
114 Double price = (Double)attributes.get("price");
115
116 if (price != null) {
117 setPrice(price);
118 }
119
120 Integer quantity = (Integer)attributes.get("quantity");
121
122 if (quantity != null) {
123 setQuantity(quantity);
124 }
125
126 Date shippedDate = (Date)attributes.get("shippedDate");
127
128 if (shippedDate != null) {
129 setShippedDate(shippedDate);
130 }
131 }
132
133
138 @Override
139 public long getPrimaryKey() {
140 return _shoppingOrderItem.getPrimaryKey();
141 }
142
143
148 @Override
149 public void setPrimaryKey(long primaryKey) {
150 _shoppingOrderItem.setPrimaryKey(primaryKey);
151 }
152
153
158 @Override
159 public long getOrderItemId() {
160 return _shoppingOrderItem.getOrderItemId();
161 }
162
163
168 @Override
169 public void setOrderItemId(long orderItemId) {
170 _shoppingOrderItem.setOrderItemId(orderItemId);
171 }
172
173
178 @Override
179 public long getOrderId() {
180 return _shoppingOrderItem.getOrderId();
181 }
182
183
188 @Override
189 public void setOrderId(long orderId) {
190 _shoppingOrderItem.setOrderId(orderId);
191 }
192
193
198 @Override
199 public java.lang.String getItemId() {
200 return _shoppingOrderItem.getItemId();
201 }
202
203
208 @Override
209 public void setItemId(java.lang.String itemId) {
210 _shoppingOrderItem.setItemId(itemId);
211 }
212
213
218 @Override
219 public java.lang.String getSku() {
220 return _shoppingOrderItem.getSku();
221 }
222
223
228 @Override
229 public void setSku(java.lang.String sku) {
230 _shoppingOrderItem.setSku(sku);
231 }
232
233
238 @Override
239 public java.lang.String getName() {
240 return _shoppingOrderItem.getName();
241 }
242
243
248 @Override
249 public void setName(java.lang.String name) {
250 _shoppingOrderItem.setName(name);
251 }
252
253
258 @Override
259 public java.lang.String getDescription() {
260 return _shoppingOrderItem.getDescription();
261 }
262
263
268 @Override
269 public void setDescription(java.lang.String description) {
270 _shoppingOrderItem.setDescription(description);
271 }
272
273
278 @Override
279 public java.lang.String getProperties() {
280 return _shoppingOrderItem.getProperties();
281 }
282
283
288 @Override
289 public void setProperties(java.lang.String properties) {
290 _shoppingOrderItem.setProperties(properties);
291 }
292
293
298 @Override
299 public double getPrice() {
300 return _shoppingOrderItem.getPrice();
301 }
302
303
308 @Override
309 public void setPrice(double price) {
310 _shoppingOrderItem.setPrice(price);
311 }
312
313
318 @Override
319 public int getQuantity() {
320 return _shoppingOrderItem.getQuantity();
321 }
322
323
328 @Override
329 public void setQuantity(int quantity) {
330 _shoppingOrderItem.setQuantity(quantity);
331 }
332
333
338 @Override
339 public java.util.Date getShippedDate() {
340 return _shoppingOrderItem.getShippedDate();
341 }
342
343
348 @Override
349 public void setShippedDate(java.util.Date shippedDate) {
350 _shoppingOrderItem.setShippedDate(shippedDate);
351 }
352
353 @Override
354 public boolean isNew() {
355 return _shoppingOrderItem.isNew();
356 }
357
358 @Override
359 public void setNew(boolean n) {
360 _shoppingOrderItem.setNew(n);
361 }
362
363 @Override
364 public boolean isCachedModel() {
365 return _shoppingOrderItem.isCachedModel();
366 }
367
368 @Override
369 public void setCachedModel(boolean cachedModel) {
370 _shoppingOrderItem.setCachedModel(cachedModel);
371 }
372
373 @Override
374 public boolean isEscapedModel() {
375 return _shoppingOrderItem.isEscapedModel();
376 }
377
378 @Override
379 public java.io.Serializable getPrimaryKeyObj() {
380 return _shoppingOrderItem.getPrimaryKeyObj();
381 }
382
383 @Override
384 public void setPrimaryKeyObj(java.io.Serializable primaryKeyObj) {
385 _shoppingOrderItem.setPrimaryKeyObj(primaryKeyObj);
386 }
387
388 @Override
389 public com.liferay.portlet.expando.model.ExpandoBridge getExpandoBridge() {
390 return _shoppingOrderItem.getExpandoBridge();
391 }
392
393 @Override
394 public void setExpandoBridgeAttributes(
395 com.liferay.portal.model.BaseModel<?> baseModel) {
396 _shoppingOrderItem.setExpandoBridgeAttributes(baseModel);
397 }
398
399 @Override
400 public void setExpandoBridgeAttributes(
401 com.liferay.portlet.expando.model.ExpandoBridge expandoBridge) {
402 _shoppingOrderItem.setExpandoBridgeAttributes(expandoBridge);
403 }
404
405 @Override
406 public void setExpandoBridgeAttributes(
407 com.liferay.portal.service.ServiceContext serviceContext) {
408 _shoppingOrderItem.setExpandoBridgeAttributes(serviceContext);
409 }
410
411 @Override
412 public java.lang.Object clone() {
413 return new ShoppingOrderItemWrapper((ShoppingOrderItem)_shoppingOrderItem.clone());
414 }
415
416 @Override
417 public int compareTo(
418 com.liferay.portlet.shopping.model.ShoppingOrderItem shoppingOrderItem) {
419 return _shoppingOrderItem.compareTo(shoppingOrderItem);
420 }
421
422 @Override
423 public int hashCode() {
424 return _shoppingOrderItem.hashCode();
425 }
426
427 @Override
428 public com.liferay.portal.model.CacheModel<com.liferay.portlet.shopping.model.ShoppingOrderItem> toCacheModel() {
429 return _shoppingOrderItem.toCacheModel();
430 }
431
432 @Override
433 public com.liferay.portlet.shopping.model.ShoppingOrderItem toEscapedModel() {
434 return new ShoppingOrderItemWrapper(_shoppingOrderItem.toEscapedModel());
435 }
436
437 @Override
438 public com.liferay.portlet.shopping.model.ShoppingOrderItem toUnescapedModel() {
439 return new ShoppingOrderItemWrapper(_shoppingOrderItem.toUnescapedModel());
440 }
441
442 @Override
443 public java.lang.String toString() {
444 return _shoppingOrderItem.toString();
445 }
446
447 @Override
448 public java.lang.String toXmlString() {
449 return _shoppingOrderItem.toXmlString();
450 }
451
452 @Override
453 public void persist()
454 throws com.liferay.portal.kernel.exception.SystemException {
455 _shoppingOrderItem.persist();
456 }
457
458 @Override
459 public boolean equals(Object obj) {
460 if (this == obj) {
461 return true;
462 }
463
464 if (!(obj instanceof ShoppingOrderItemWrapper)) {
465 return false;
466 }
467
468 ShoppingOrderItemWrapper shoppingOrderItemWrapper = (ShoppingOrderItemWrapper)obj;
469
470 if (Validator.equals(_shoppingOrderItem,
471 shoppingOrderItemWrapper._shoppingOrderItem)) {
472 return true;
473 }
474
475 return false;
476 }
477
478
481 public ShoppingOrderItem getWrappedShoppingOrderItem() {
482 return _shoppingOrderItem;
483 }
484
485 @Override
486 public ShoppingOrderItem getWrappedModel() {
487 return _shoppingOrderItem;
488 }
489
490 @Override
491 public void resetOriginalValues() {
492 _shoppingOrderItem.resetOriginalValues();
493 }
494
495 private ShoppingOrderItem _shoppingOrderItem;
496 }