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