1   /**
2    * Copyright (c) 2000-2010 Liferay, Inc. All rights reserved.
3    *
4    * This library is free software; you can redistribute it and/or modify it under
5    * the terms of the GNU Lesser General Public License as published by the Free
6    * Software Foundation; either version 2.1 of the License, or (at your option)
7    * any later version.
8    *
9    * This library is distributed in the hope that it will be useful, but WITHOUT
10   * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
11   * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
12   * details.
13   */
14  
15  package com.liferay.portlet.shopping.model;
16  
17  import java.io.Serializable;
18  
19  import java.util.ArrayList;
20  import java.util.Date;
21  import java.util.List;
22  
23  /**
24   * <a href="ShoppingOrderItemSoap.java.html"><b><i>View Source</i></b></a>
25   *
26   * <p>
27   * ServiceBuilder generated this class. Modifications in this class will be
28   * overwritten the next time is generated.
29   * </p>
30   *
31   * <p>
32   * This class is used by
33   * {@link com.liferay.portlet.shopping.service.http.ShoppingOrderItemServiceSoap}.
34   * </p>
35   *
36   * @author    Brian Wing Shun Chan
37   * @see       com.liferay.portlet.shopping.service.http.ShoppingOrderItemServiceSoap
38   * @generated
39   */
40  public class ShoppingOrderItemSoap implements Serializable {
41      public static ShoppingOrderItemSoap toSoapModel(ShoppingOrderItem model) {
42          ShoppingOrderItemSoap soapModel = new ShoppingOrderItemSoap();
43  
44          soapModel.setOrderItemId(model.getOrderItemId());
45          soapModel.setOrderId(model.getOrderId());
46          soapModel.setItemId(model.getItemId());
47          soapModel.setSku(model.getSku());
48          soapModel.setName(model.getName());
49          soapModel.setDescription(model.getDescription());
50          soapModel.setProperties(model.getProperties());
51          soapModel.setPrice(model.getPrice());
52          soapModel.setQuantity(model.getQuantity());
53          soapModel.setShippedDate(model.getShippedDate());
54  
55          return soapModel;
56      }
57  
58      public static ShoppingOrderItemSoap[] toSoapModels(
59          ShoppingOrderItem[] models) {
60          ShoppingOrderItemSoap[] soapModels = new ShoppingOrderItemSoap[models.length];
61  
62          for (int i = 0; i < models.length; i++) {
63              soapModels[i] = toSoapModel(models[i]);
64          }
65  
66          return soapModels;
67      }
68  
69      public static ShoppingOrderItemSoap[][] toSoapModels(
70          ShoppingOrderItem[][] models) {
71          ShoppingOrderItemSoap[][] soapModels = null;
72  
73          if (models.length > 0) {
74              soapModels = new ShoppingOrderItemSoap[models.length][models[0].length];
75          }
76          else {
77              soapModels = new ShoppingOrderItemSoap[0][0];
78          }
79  
80          for (int i = 0; i < models.length; i++) {
81              soapModels[i] = toSoapModels(models[i]);
82          }
83  
84          return soapModels;
85      }
86  
87      public static ShoppingOrderItemSoap[] toSoapModels(
88          List<ShoppingOrderItem> models) {
89          List<ShoppingOrderItemSoap> soapModels = new ArrayList<ShoppingOrderItemSoap>(models.size());
90  
91          for (ShoppingOrderItem model : models) {
92              soapModels.add(toSoapModel(model));
93          }
94  
95          return soapModels.toArray(new ShoppingOrderItemSoap[soapModels.size()]);
96      }
97  
98      public ShoppingOrderItemSoap() {
99      }
100 
101     public long getPrimaryKey() {
102         return _orderItemId;
103     }
104 
105     public void setPrimaryKey(long pk) {
106         setOrderItemId(pk);
107     }
108 
109     public long getOrderItemId() {
110         return _orderItemId;
111     }
112 
113     public void setOrderItemId(long orderItemId) {
114         _orderItemId = orderItemId;
115     }
116 
117     public long getOrderId() {
118         return _orderId;
119     }
120 
121     public void setOrderId(long orderId) {
122         _orderId = orderId;
123     }
124 
125     public String getItemId() {
126         return _itemId;
127     }
128 
129     public void setItemId(String itemId) {
130         _itemId = itemId;
131     }
132 
133     public String getSku() {
134         return _sku;
135     }
136 
137     public void setSku(String sku) {
138         _sku = sku;
139     }
140 
141     public String getName() {
142         return _name;
143     }
144 
145     public void setName(String name) {
146         _name = name;
147     }
148 
149     public String getDescription() {
150         return _description;
151     }
152 
153     public void setDescription(String description) {
154         _description = description;
155     }
156 
157     public String getProperties() {
158         return _properties;
159     }
160 
161     public void setProperties(String properties) {
162         _properties = properties;
163     }
164 
165     public double getPrice() {
166         return _price;
167     }
168 
169     public void setPrice(double price) {
170         _price = price;
171     }
172 
173     public int getQuantity() {
174         return _quantity;
175     }
176 
177     public void setQuantity(int quantity) {
178         _quantity = quantity;
179     }
180 
181     public Date getShippedDate() {
182         return _shippedDate;
183     }
184 
185     public void setShippedDate(Date shippedDate) {
186         _shippedDate = shippedDate;
187     }
188 
189     private long _orderItemId;
190     private long _orderId;
191     private String _itemId;
192     private String _sku;
193     private String _name;
194     private String _description;
195     private String _properties;
196     private double _price;
197     private int _quantity;
198     private Date _shippedDate;
199 }