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