001    /**
002     * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
003     *
004     * This library is free software; you can redistribute it and/or modify it under
005     * the terms of the GNU Lesser General Public License as published by the Free
006     * Software Foundation; either version 2.1 of the License, or (at your option)
007     * any later version.
008     *
009     * This library is distributed in the hope that it will be useful, but WITHOUT
010     * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
011     * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
012     * details.
013     */
014    
015    package com.liferay.portlet.shopping.model;
016    
017    import java.io.Serializable;
018    
019    import java.util.ArrayList;
020    import java.util.Date;
021    import java.util.List;
022    
023    /**
024     * This class is used by SOAP remote services.
025     *
026     * @author    Brian Wing Shun Chan
027     * @generated
028     */
029    public class ShoppingOrderItemSoap implements Serializable {
030            public static ShoppingOrderItemSoap toSoapModel(ShoppingOrderItem model) {
031                    ShoppingOrderItemSoap soapModel = new ShoppingOrderItemSoap();
032    
033                    soapModel.setOrderItemId(model.getOrderItemId());
034                    soapModel.setOrderId(model.getOrderId());
035                    soapModel.setItemId(model.getItemId());
036                    soapModel.setSku(model.getSku());
037                    soapModel.setName(model.getName());
038                    soapModel.setDescription(model.getDescription());
039                    soapModel.setProperties(model.getProperties());
040                    soapModel.setPrice(model.getPrice());
041                    soapModel.setQuantity(model.getQuantity());
042                    soapModel.setShippedDate(model.getShippedDate());
043    
044                    return soapModel;
045            }
046    
047            public static ShoppingOrderItemSoap[] toSoapModels(
048                    ShoppingOrderItem[] models) {
049                    ShoppingOrderItemSoap[] soapModels = new ShoppingOrderItemSoap[models.length];
050    
051                    for (int i = 0; i < models.length; i++) {
052                            soapModels[i] = toSoapModel(models[i]);
053                    }
054    
055                    return soapModels;
056            }
057    
058            public static ShoppingOrderItemSoap[][] toSoapModels(
059                    ShoppingOrderItem[][] models) {
060                    ShoppingOrderItemSoap[][] soapModels = null;
061    
062                    if (models.length > 0) {
063                            soapModels = new ShoppingOrderItemSoap[models.length][models[0].length];
064                    }
065                    else {
066                            soapModels = new ShoppingOrderItemSoap[0][0];
067                    }
068    
069                    for (int i = 0; i < models.length; i++) {
070                            soapModels[i] = toSoapModels(models[i]);
071                    }
072    
073                    return soapModels;
074            }
075    
076            public static ShoppingOrderItemSoap[] toSoapModels(
077                    List<ShoppingOrderItem> models) {
078                    List<ShoppingOrderItemSoap> soapModels = new ArrayList<ShoppingOrderItemSoap>(models.size());
079    
080                    for (ShoppingOrderItem model : models) {
081                            soapModels.add(toSoapModel(model));
082                    }
083    
084                    return soapModels.toArray(new ShoppingOrderItemSoap[soapModels.size()]);
085            }
086    
087            public ShoppingOrderItemSoap() {
088            }
089    
090            public long getPrimaryKey() {
091                    return _orderItemId;
092            }
093    
094            public void setPrimaryKey(long pk) {
095                    setOrderItemId(pk);
096            }
097    
098            public long getOrderItemId() {
099                    return _orderItemId;
100            }
101    
102            public void setOrderItemId(long orderItemId) {
103                    _orderItemId = orderItemId;
104            }
105    
106            public long getOrderId() {
107                    return _orderId;
108            }
109    
110            public void setOrderId(long orderId) {
111                    _orderId = orderId;
112            }
113    
114            public String getItemId() {
115                    return _itemId;
116            }
117    
118            public void setItemId(String itemId) {
119                    _itemId = itemId;
120            }
121    
122            public String getSku() {
123                    return _sku;
124            }
125    
126            public void setSku(String sku) {
127                    _sku = sku;
128            }
129    
130            public String getName() {
131                    return _name;
132            }
133    
134            public void setName(String name) {
135                    _name = name;
136            }
137    
138            public String getDescription() {
139                    return _description;
140            }
141    
142            public void setDescription(String description) {
143                    _description = description;
144            }
145    
146            public String getProperties() {
147                    return _properties;
148            }
149    
150            public void setProperties(String properties) {
151                    _properties = properties;
152            }
153    
154            public double getPrice() {
155                    return _price;
156            }
157    
158            public void setPrice(double price) {
159                    _price = price;
160            }
161    
162            public int getQuantity() {
163                    return _quantity;
164            }
165    
166            public void setQuantity(int quantity) {
167                    _quantity = quantity;
168            }
169    
170            public Date getShippedDate() {
171                    return _shippedDate;
172            }
173    
174            public void setShippedDate(Date shippedDate) {
175                    _shippedDate = shippedDate;
176            }
177    
178            private long _orderItemId;
179            private long _orderId;
180            private String _itemId;
181            private String _sku;
182            private String _name;
183            private String _description;
184            private String _properties;
185            private double _price;
186            private int _quantity;
187            private Date _shippedDate;
188    }