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.List;
26  
27  /**
28   * <a href="ShoppingItemFieldSoap.java.html"><b><i>View Source</i></b></a>
29   *
30   * <p>
31   * ServiceBuilder generated this class. Modifications in this class will be
32   * overwritten the next time is generated.
33   * </p>
34   *
35   * <p>
36   * This class is used by
37   * <code>com.liferay.portlet.shopping.service.http.ShoppingItemFieldServiceSoap</code>.
38   * </p>
39   *
40   * @author Brian Wing Shun Chan
41   *
42   * @see com.liferay.portlet.shopping.service.http.ShoppingItemFieldServiceSoap
43   *
44   */
45  public class ShoppingItemFieldSoap implements Serializable {
46      public static ShoppingItemFieldSoap toSoapModel(ShoppingItemField model) {
47          ShoppingItemFieldSoap soapModel = new ShoppingItemFieldSoap();
48  
49          soapModel.setItemFieldId(model.getItemFieldId());
50          soapModel.setItemId(model.getItemId());
51          soapModel.setName(model.getName());
52          soapModel.setValues(model.getValues());
53          soapModel.setDescription(model.getDescription());
54  
55          return soapModel;
56      }
57  
58      public static ShoppingItemFieldSoap[] toSoapModels(
59          ShoppingItemField[] models) {
60          ShoppingItemFieldSoap[] soapModels = new ShoppingItemFieldSoap[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 ShoppingItemFieldSoap[][] toSoapModels(
70          ShoppingItemField[][] models) {
71          ShoppingItemFieldSoap[][] soapModels = null;
72  
73          if (models.length > 0) {
74              soapModels = new ShoppingItemFieldSoap[models.length][models[0].length];
75          }
76          else {
77              soapModels = new ShoppingItemFieldSoap[0][0];
78          }
79  
80          for (int i = 0; i < models.length; i++) {
81              soapModels[i] = toSoapModels(models[i]);
82          }
83  
84          return soapModels;
85      }
86  
87      public static ShoppingItemFieldSoap[] toSoapModels(
88          List<ShoppingItemField> models) {
89          List<ShoppingItemFieldSoap> soapModels = new ArrayList<ShoppingItemFieldSoap>(models.size());
90  
91          for (ShoppingItemField model : models) {
92              soapModels.add(toSoapModel(model));
93          }
94  
95          return soapModels.toArray(new ShoppingItemFieldSoap[soapModels.size()]);
96      }
97  
98      public ShoppingItemFieldSoap() {
99      }
100 
101     public long getPrimaryKey() {
102         return _itemFieldId;
103     }
104 
105     public void setPrimaryKey(long pk) {
106         setItemFieldId(pk);
107     }
108 
109     public long getItemFieldId() {
110         return _itemFieldId;
111     }
112 
113     public void setItemFieldId(long itemFieldId) {
114         _itemFieldId = itemFieldId;
115     }
116 
117     public long getItemId() {
118         return _itemId;
119     }
120 
121     public void setItemId(long itemId) {
122         _itemId = itemId;
123     }
124 
125     public String getName() {
126         return _name;
127     }
128 
129     public void setName(String name) {
130         _name = name;
131     }
132 
133     public String getValues() {
134         return _values;
135     }
136 
137     public void setValues(String values) {
138         _values = values;
139     }
140 
141     public String getDescription() {
142         return _description;
143     }
144 
145     public void setDescription(String description) {
146         _description = description;
147     }
148 
149     private long _itemFieldId;
150     private long _itemId;
151     private String _name;
152     private String _values;
153     private String _description;
154 }