1   /**
2    * Copyright (c) 2000-2008 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="ShoppingCartSoap.java.html"><b><i>View Source</i></b></a>
33   *
34   * <p>
35   * ServiceBuilder generated this class. Modifications in this class will be
36   * overwritten the next time is generated.
37   * </p>
38   *
39   * <p>
40   * This class is used by
41   * <code>com.liferay.portlet.shopping.service.http.ShoppingCartServiceSoap</code>.
42   * </p>
43   *
44   * @author Brian Wing Shun Chan
45   *
46   * @see com.liferay.portlet.shopping.service.http.ShoppingCartServiceSoap
47   *
48   */
49  public class ShoppingCartSoap implements Serializable {
50      public static ShoppingCartSoap toSoapModel(ShoppingCart model) {
51          ShoppingCartSoap soapModel = new ShoppingCartSoap();
52  
53          soapModel.setCartId(model.getCartId());
54          soapModel.setGroupId(model.getGroupId());
55          soapModel.setCompanyId(model.getCompanyId());
56          soapModel.setUserId(model.getUserId());
57          soapModel.setUserName(model.getUserName());
58          soapModel.setCreateDate(model.getCreateDate());
59          soapModel.setModifiedDate(model.getModifiedDate());
60          soapModel.setItemIds(model.getItemIds());
61          soapModel.setCouponCodes(model.getCouponCodes());
62          soapModel.setAltShipping(model.getAltShipping());
63          soapModel.setInsure(model.getInsure());
64  
65          return soapModel;
66      }
67  
68      public static ShoppingCartSoap[] toSoapModels(List models) {
69          List soapModels = new ArrayList(models.size());
70  
71          for (int i = 0; i < models.size(); i++) {
72              ShoppingCart model = (ShoppingCart)models.get(i);
73  
74              soapModels.add(toSoapModel(model));
75          }
76  
77          return (ShoppingCartSoap[])soapModels.toArray(new ShoppingCartSoap[0]);
78      }
79  
80      public ShoppingCartSoap() {
81      }
82  
83      public long getPrimaryKey() {
84          return _cartId;
85      }
86  
87      public void setPrimaryKey(long pk) {
88          setCartId(pk);
89      }
90  
91      public long getCartId() {
92          return _cartId;
93      }
94  
95      public void setCartId(long cartId) {
96          _cartId = cartId;
97      }
98  
99      public long getGroupId() {
100         return _groupId;
101     }
102 
103     public void setGroupId(long groupId) {
104         _groupId = groupId;
105     }
106 
107     public long getCompanyId() {
108         return _companyId;
109     }
110 
111     public void setCompanyId(long companyId) {
112         _companyId = companyId;
113     }
114 
115     public long getUserId() {
116         return _userId;
117     }
118 
119     public void setUserId(long userId) {
120         _userId = userId;
121     }
122 
123     public String getUserName() {
124         return _userName;
125     }
126 
127     public void setUserName(String userName) {
128         _userName = userName;
129     }
130 
131     public Date getCreateDate() {
132         return _createDate;
133     }
134 
135     public void setCreateDate(Date createDate) {
136         _createDate = createDate;
137     }
138 
139     public Date getModifiedDate() {
140         return _modifiedDate;
141     }
142 
143     public void setModifiedDate(Date modifiedDate) {
144         _modifiedDate = modifiedDate;
145     }
146 
147     public String getItemIds() {
148         return _itemIds;
149     }
150 
151     public void setItemIds(String itemIds) {
152         _itemIds = itemIds;
153     }
154 
155     public String getCouponCodes() {
156         return _couponCodes;
157     }
158 
159     public void setCouponCodes(String couponCodes) {
160         _couponCodes = couponCodes;
161     }
162 
163     public int getAltShipping() {
164         return _altShipping;
165     }
166 
167     public void setAltShipping(int altShipping) {
168         _altShipping = altShipping;
169     }
170 
171     public boolean getInsure() {
172         return _insure;
173     }
174 
175     public boolean isInsure() {
176         return _insure;
177     }
178 
179     public void setInsure(boolean insure) {
180         _insure = insure;
181     }
182 
183     private long _cartId;
184     private long _groupId;
185     private long _companyId;
186     private long _userId;
187     private String _userName;
188     private Date _createDate;
189     private Date _modifiedDate;
190     private String _itemIds;
191     private String _couponCodes;
192     private int _altShipping;
193     private boolean _insure;
194 }