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