1   /**
2    * Copyright (c) 2000-2007 Liferay, Inc. All rights reserved.
3    *
4    * Permission is hereby granted, free of charge, to any person obtaining a copy
5    * of this software and associated documentation files (the "Software"), to deal
6    * in the Software without restriction, including without limitation the rights
7    * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8    * copies of the Software, and to permit persons to whom the Software is
9    * furnished to do so, subject to the following conditions:
10   *
11   * The above copyright notice and this permission notice shall be included in
12   * all copies or substantial portions 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 overwritten
36   * the next time is generated.
37   * </p>
38   *
39   * <p>
40   * This class is used by <code>com.liferay.portlet.shopping.service.http.ShoppingOrderItemServiceSoap</code>.
41   * </p>
42   *
43   * @author Brian Wing Shun Chan
44   *
45   * @see com.liferay.portlet.shopping.service.http.ShoppingOrderItemServiceSoap
46   *
47   */
48  public class ShoppingOrderItemSoap implements Serializable {
49      public static ShoppingOrderItemSoap toSoapModel(ShoppingOrderItem model) {
50          ShoppingOrderItemSoap soapModel = new ShoppingOrderItemSoap();
51          soapModel.setOrderItemId(model.getOrderItemId());
52          soapModel.setOrderId(model.getOrderId());
53          soapModel.setItemId(model.getItemId());
54          soapModel.setSku(model.getSku());
55          soapModel.setName(model.getName());
56          soapModel.setDescription(model.getDescription());
57          soapModel.setProperties(model.getProperties());
58          soapModel.setPrice(model.getPrice());
59          soapModel.setQuantity(model.getQuantity());
60          soapModel.setShippedDate(model.getShippedDate());
61  
62          return soapModel;
63      }
64  
65      public static ShoppingOrderItemSoap[] toSoapModels(List models) {
66          List soapModels = new ArrayList(models.size());
67  
68          for (int i = 0; i < models.size(); i++) {
69              ShoppingOrderItem model = (ShoppingOrderItem)models.get(i);
70              soapModels.add(toSoapModel(model));
71          }
72  
73          return (ShoppingOrderItemSoap[])soapModels.toArray(new ShoppingOrderItemSoap[0]);
74      }
75  
76      public ShoppingOrderItemSoap() {
77      }
78  
79      public long getPrimaryKey() {
80          return _orderItemId;
81      }
82  
83      public void setPrimaryKey(long pk) {
84          setOrderItemId(pk);
85      }
86  
87      public long getOrderItemId() {
88          return _orderItemId;
89      }
90  
91      public void setOrderItemId(long orderItemId) {
92          _orderItemId = orderItemId;
93      }
94  
95      public long getOrderId() {
96          return _orderId;
97      }
98  
99      public void setOrderId(long orderId) {
100         _orderId = orderId;
101     }
102 
103     public String getItemId() {
104         return _itemId;
105     }
106 
107     public void setItemId(String itemId) {
108         _itemId = itemId;
109     }
110 
111     public String getSku() {
112         return _sku;
113     }
114 
115     public void setSku(String sku) {
116         _sku = sku;
117     }
118 
119     public String getName() {
120         return _name;
121     }
122 
123     public void setName(String name) {
124         _name = name;
125     }
126 
127     public String getDescription() {
128         return _description;
129     }
130 
131     public void setDescription(String description) {
132         _description = description;
133     }
134 
135     public String getProperties() {
136         return _properties;
137     }
138 
139     public void setProperties(String properties) {
140         _properties = properties;
141     }
142 
143     public double getPrice() {
144         return _price;
145     }
146 
147     public void setPrice(double price) {
148         _price = price;
149     }
150 
151     public int getQuantity() {
152         return _quantity;
153     }
154 
155     public void setQuantity(int quantity) {
156         _quantity = quantity;
157     }
158 
159     public Date getShippedDate() {
160         return _shippedDate;
161     }
162 
163     public void setShippedDate(Date shippedDate) {
164         _shippedDate = shippedDate;
165     }
166 
167     private long _orderItemId;
168     private long _orderId;
169     private String _itemId;
170     private String _sku;
171     private String _name;
172     private String _description;
173     private String _properties;
174     private double _price;
175     private int _quantity;
176     private Date _shippedDate;
177 }