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