1   /**
2    * Copyright (c) 2000-2009 Liferay, Inc. All rights reserved.
3    *
4    *
5    *
6    *
7    * The contents of this file are subject to the terms of the Liferay Enterprise
8    * Subscription License ("License"). You may not use this file except in
9    * compliance with the License. You can obtain a copy of the License by
10   * contacting Liferay, Inc. See the License for the specific language governing
11   * permissions and limitations under the License, including but not limited to
12   * distribution rights 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.portal.model;
24  
25  import java.io.Serializable;
26  
27  import java.util.ArrayList;
28  import java.util.List;
29  
30  /**
31   * <a href="ListTypeSoap.java.html"><b><i>View Source</i></b></a>
32   *
33   * <p>
34   * ServiceBuilder generated this class. Modifications in this class will be
35   * overwritten the next time is generated.
36   * </p>
37   *
38   * <p>
39   * This class is used by
40   * {@link com.liferay.portal.service.http.ListTypeServiceSoap}.
41   * </p>
42   *
43   * @author    Brian Wing Shun Chan
44   * @see       com.liferay.portal.service.http.ListTypeServiceSoap
45   * @generated
46   */
47  public class ListTypeSoap implements Serializable {
48      public static ListTypeSoap toSoapModel(ListType model) {
49          ListTypeSoap soapModel = new ListTypeSoap();
50  
51          soapModel.setListTypeId(model.getListTypeId());
52          soapModel.setName(model.getName());
53          soapModel.setType(model.getType());
54  
55          return soapModel;
56      }
57  
58      public static ListTypeSoap[] toSoapModels(ListType[] models) {
59          ListTypeSoap[] soapModels = new ListTypeSoap[models.length];
60  
61          for (int i = 0; i < models.length; i++) {
62              soapModels[i] = toSoapModel(models[i]);
63          }
64  
65          return soapModels;
66      }
67  
68      public static ListTypeSoap[][] toSoapModels(ListType[][] models) {
69          ListTypeSoap[][] soapModels = null;
70  
71          if (models.length > 0) {
72              soapModels = new ListTypeSoap[models.length][models[0].length];
73          }
74          else {
75              soapModels = new ListTypeSoap[0][0];
76          }
77  
78          for (int i = 0; i < models.length; i++) {
79              soapModels[i] = toSoapModels(models[i]);
80          }
81  
82          return soapModels;
83      }
84  
85      public static ListTypeSoap[] toSoapModels(List<ListType> models) {
86          List<ListTypeSoap> soapModels = new ArrayList<ListTypeSoap>(models.size());
87  
88          for (ListType model : models) {
89              soapModels.add(toSoapModel(model));
90          }
91  
92          return soapModels.toArray(new ListTypeSoap[soapModels.size()]);
93      }
94  
95      public ListTypeSoap() {
96      }
97  
98      public int getPrimaryKey() {
99          return _listTypeId;
100     }
101 
102     public void setPrimaryKey(int pk) {
103         setListTypeId(pk);
104     }
105 
106     public int getListTypeId() {
107         return _listTypeId;
108     }
109 
110     public void setListTypeId(int listTypeId) {
111         _listTypeId = listTypeId;
112     }
113 
114     public String getName() {
115         return _name;
116     }
117 
118     public void setName(String name) {
119         _name = name;
120     }
121 
122     public String getType() {
123         return _type;
124     }
125 
126     public void setType(String type) {
127         _type = type;
128     }
129 
130     private int _listTypeId;
131     private String _name;
132     private String _type;
133 }