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          List<ShoppingOrderItem> models) {
66          List<ShoppingOrderItemSoap> soapModels = new ArrayList<ShoppingOrderItemSoap>(models.size());
67  
68          for (ShoppingOrderItem model : models) {
69              soapModels.add(toSoapModel(model));
70          }
71  
72          return soapModels.toArray(new ShoppingOrderItemSoap[soapModels.size()]);
73      }
74  
75      public ShoppingOrderItemSoap() {
76      }
77  
78      public long getPrimaryKey() {
79          return _orderItemId;
80      }
81  
82      public void setPrimaryKey(long pk) {
83          setOrderItemId(pk);
84      }
85  
86      public long getOrderItemId() {
87          return _orderItemId;
88      }
89  
90      public void setOrderItemId(long orderItemId) {
91          _orderItemId = orderItemId;
92      }
93  
94      public long getOrderId() {
95          return _orderId;
96      }
97  
98      public void setOrderId(long orderId) {
99          _orderId = orderId;
100     }
101 
102     public String getItemId() {
103         return _itemId;
104     }
105 
106     public void setItemId(String itemId) {
107         _itemId = itemId;
108     }
109 
110     public String getSku() {
111         return _sku;
112     }
113 
114     public void setSku(String sku) {
115         _sku = sku;
116     }
117 
118     public String getName() {
119         return _name;
120     }
121 
122     public void setName(String name) {
123         _name = name;
124     }
125 
126     public String getDescription() {
127         return _description;
128     }
129 
130     public void setDescription(String description) {
131         _description = description;
132     }
133 
134     public String getProperties() {
135         return _properties;
136     }
137 
138     public void setProperties(String properties) {
139         _properties = properties;
140     }
141 
142     public double getPrice() {
143         return _price;
144     }
145 
146     public void setPrice(double price) {
147         _price = price;
148     }
149 
150     public int getQuantity() {
151         return _quantity;
152     }
153 
154     public void setQuantity(int quantity) {
155         _quantity = quantity;
156     }
157 
158     public Date getShippedDate() {
159         return _shippedDate;
160     }
161 
162     public void setShippedDate(Date shippedDate) {
163         _shippedDate = shippedDate;
164     }
165 
166     private long _orderItemId;
167     private long _orderId;
168     private String _itemId;
169     private String _sku;
170     private String _name;
171     private String _description;
172     private String _properties;
173     private double _price;
174     private int _quantity;
175     private Date _shippedDate;
176 }