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 ShoppingCartSoap implements Serializable {
030            public static ShoppingCartSoap toSoapModel(ShoppingCart model) {
031                    ShoppingCartSoap soapModel = new ShoppingCartSoap();
032    
033                    soapModel.setCartId(model.getCartId());
034                    soapModel.setGroupId(model.getGroupId());
035                    soapModel.setCompanyId(model.getCompanyId());
036                    soapModel.setUserId(model.getUserId());
037                    soapModel.setUserName(model.getUserName());
038                    soapModel.setCreateDate(model.getCreateDate());
039                    soapModel.setModifiedDate(model.getModifiedDate());
040                    soapModel.setItemIds(model.getItemIds());
041                    soapModel.setCouponCodes(model.getCouponCodes());
042                    soapModel.setAltShipping(model.getAltShipping());
043                    soapModel.setInsure(model.getInsure());
044    
045                    return soapModel;
046            }
047    
048            public static ShoppingCartSoap[] toSoapModels(ShoppingCart[] models) {
049                    ShoppingCartSoap[] soapModels = new ShoppingCartSoap[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 ShoppingCartSoap[][] toSoapModels(ShoppingCart[][] models) {
059                    ShoppingCartSoap[][] soapModels = null;
060    
061                    if (models.length > 0) {
062                            soapModels = new ShoppingCartSoap[models.length][models[0].length];
063                    }
064                    else {
065                            soapModels = new ShoppingCartSoap[0][0];
066                    }
067    
068                    for (int i = 0; i < models.length; i++) {
069                            soapModels[i] = toSoapModels(models[i]);
070                    }
071    
072                    return soapModels;
073            }
074    
075            public static ShoppingCartSoap[] toSoapModels(List<ShoppingCart> models) {
076                    List<ShoppingCartSoap> soapModels = new ArrayList<ShoppingCartSoap>(models.size());
077    
078                    for (ShoppingCart model : models) {
079                            soapModels.add(toSoapModel(model));
080                    }
081    
082                    return soapModels.toArray(new ShoppingCartSoap[soapModels.size()]);
083            }
084    
085            public ShoppingCartSoap() {
086            }
087    
088            public long getPrimaryKey() {
089                    return _cartId;
090            }
091    
092            public void setPrimaryKey(long pk) {
093                    setCartId(pk);
094            }
095    
096            public long getCartId() {
097                    return _cartId;
098            }
099    
100            public void setCartId(long cartId) {
101                    _cartId = cartId;
102            }
103    
104            public long getGroupId() {
105                    return _groupId;
106            }
107    
108            public void setGroupId(long groupId) {
109                    _groupId = groupId;
110            }
111    
112            public long getCompanyId() {
113                    return _companyId;
114            }
115    
116            public void setCompanyId(long companyId) {
117                    _companyId = companyId;
118            }
119    
120            public long getUserId() {
121                    return _userId;
122            }
123    
124            public void setUserId(long userId) {
125                    _userId = userId;
126            }
127    
128            public String getUserName() {
129                    return _userName;
130            }
131    
132            public void setUserName(String userName) {
133                    _userName = userName;
134            }
135    
136            public Date getCreateDate() {
137                    return _createDate;
138            }
139    
140            public void setCreateDate(Date createDate) {
141                    _createDate = createDate;
142            }
143    
144            public Date getModifiedDate() {
145                    return _modifiedDate;
146            }
147    
148            public void setModifiedDate(Date modifiedDate) {
149                    _modifiedDate = modifiedDate;
150            }
151    
152            public String getItemIds() {
153                    return _itemIds;
154            }
155    
156            public void setItemIds(String itemIds) {
157                    _itemIds = itemIds;
158            }
159    
160            public String getCouponCodes() {
161                    return _couponCodes;
162            }
163    
164            public void setCouponCodes(String couponCodes) {
165                    _couponCodes = couponCodes;
166            }
167    
168            public int getAltShipping() {
169                    return _altShipping;
170            }
171    
172            public void setAltShipping(int altShipping) {
173                    _altShipping = altShipping;
174            }
175    
176            public boolean getInsure() {
177                    return _insure;
178            }
179    
180            public boolean isInsure() {
181                    return _insure;
182            }
183    
184            public void setInsure(boolean insure) {
185                    _insure = insure;
186            }
187    
188            private long _cartId;
189            private long _groupId;
190            private long _companyId;
191            private long _userId;
192            private String _userName;
193            private Date _createDate;
194            private Date _modifiedDate;
195            private String _itemIds;
196            private String _couponCodes;
197            private int _altShipping;
198            private boolean _insure;
199    }