1   /**
2    * Copyright (c) 2000-2009 Liferay, Inc. All rights reserved.
3    *
4    *
5    *
6    *
7    * The contents of this file are subject to the terms of the Liferay Enterprise
8    * Subscription License ("License"). You may not use this file except in
9    * compliance with the License. You can obtain a copy of the License by
10   * contacting Liferay, Inc. See the License for the specific language governing
11   * permissions and limitations under the License, including but not limited to
12   * distribution rights of the Software.
13   *
14   * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15   * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16   * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17   * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18   * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19   * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20   * SOFTWARE.
21   */
22  
23  package com.liferay.portlet.shopping.model;
24  
25  import java.io.Serializable;
26  
27  import java.util.ArrayList;
28  import java.util.Date;
29  import java.util.List;
30  
31  /**
32   * <a href="ShoppingOrderItemSoap.java.html"><b><i>View Source</i></b></a>
33   *
34   * <p>
35   * ServiceBuilder generated this class. Modifications in this class will be
36   * overwritten the next time is generated.
37   * </p>
38   *
39   * <p>
40   * This class is used by
41   * {@link com.liferay.portlet.shopping.service.http.ShoppingOrderItemServiceSoap}.
42   * </p>
43   *
44   * @author    Brian Wing Shun Chan
45   * @see       com.liferay.portlet.shopping.service.http.ShoppingOrderItemServiceSoap
46   * @generated
47   */
48  public class ShoppingOrderItemSoap implements Serializable {
49      public static ShoppingOrderItemSoap toSoapModel(ShoppingOrderItem model) {
50          ShoppingOrderItemSoap soapModel = new ShoppingOrderItemSoap();
51  
52          soapModel.setOrderItemId(model.getOrderItemId());
53          soapModel.setOrderId(model.getOrderId());
54          soapModel.setItemId(model.getItemId());
55          soapModel.setSku(model.getSku());
56          soapModel.setName(model.getName());
57          soapModel.setDescription(model.getDescription());
58          soapModel.setProperties(model.getProperties());
59          soapModel.setPrice(model.getPrice());
60          soapModel.setQuantity(model.getQuantity());
61          soapModel.setShippedDate(model.getShippedDate());
62  
63          return soapModel;
64      }
65  
66      public static ShoppingOrderItemSoap[] toSoapModels(
67          ShoppingOrderItem[] models) {
68          ShoppingOrderItemSoap[] soapModels = new ShoppingOrderItemSoap[models.length];
69  
70          for (int i = 0; i < models.length; i++) {
71              soapModels[i] = toSoapModel(models[i]);
72          }
73  
74          return soapModels;
75      }
76  
77      public static ShoppingOrderItemSoap[][] toSoapModels(
78          ShoppingOrderItem[][] models) {
79          ShoppingOrderItemSoap[][] soapModels = null;
80  
81          if (models.length > 0) {
82              soapModels = new ShoppingOrderItemSoap[models.length][models[0].length];
83          }
84          else {
85              soapModels = new ShoppingOrderItemSoap[0][0];
86          }
87  
88          for (int i = 0; i < models.length; i++) {
89              soapModels[i] = toSoapModels(models[i]);
90          }
91  
92          return soapModels;
93      }
94  
95      public static ShoppingOrderItemSoap[] toSoapModels(
96          List<ShoppingOrderItem> models) {
97          List<ShoppingOrderItemSoap> soapModels = new ArrayList<ShoppingOrderItemSoap>(models.size());
98  
99          for (ShoppingOrderItem model : models) {
100             soapModels.add(toSoapModel(model));
101         }
102 
103         return soapModels.toArray(new ShoppingOrderItemSoap[soapModels.size()]);
104     }
105 
106     public ShoppingOrderItemSoap() {
107     }
108 
109     public long getPrimaryKey() {
110         return _orderItemId;
111     }
112 
113     public void setPrimaryKey(long pk) {
114         setOrderItemId(pk);
115     }
116 
117     public long getOrderItemId() {
118         return _orderItemId;
119     }
120 
121     public void setOrderItemId(long orderItemId) {
122         _orderItemId = orderItemId;
123     }
124 
125     public long getOrderId() {
126         return _orderId;
127     }
128 
129     public void setOrderId(long orderId) {
130         _orderId = orderId;
131     }
132 
133     public String getItemId() {
134         return _itemId;
135     }
136 
137     public void setItemId(String itemId) {
138         _itemId = itemId;
139     }
140 
141     public String getSku() {
142         return _sku;
143     }
144 
145     public void setSku(String sku) {
146         _sku = sku;
147     }
148 
149     public String getName() {
150         return _name;
151     }
152 
153     public void setName(String name) {
154         _name = name;
155     }
156 
157     public String getDescription() {
158         return _description;
159     }
160 
161     public void setDescription(String description) {
162         _description = description;
163     }
164 
165     public String getProperties() {
166         return _properties;
167     }
168 
169     public void setProperties(String properties) {
170         _properties = properties;
171     }
172 
173     public double getPrice() {
174         return _price;
175     }
176 
177     public void setPrice(double price) {
178         _price = price;
179     }
180 
181     public int getQuantity() {
182         return _quantity;
183     }
184 
185     public void setQuantity(int quantity) {
186         _quantity = quantity;
187     }
188 
189     public Date getShippedDate() {
190         return _shippedDate;
191     }
192 
193     public void setShippedDate(Date shippedDate) {
194         _shippedDate = shippedDate;
195     }
196 
197     private long _orderItemId;
198     private long _orderId;
199     private String _itemId;
200     private String _sku;
201     private String _name;
202     private String _description;
203     private String _properties;
204     private double _price;
205     private int _quantity;
206     private Date _shippedDate;
207 }