1   /**
2    * Copyright (c) 2000-2010 Liferay, Inc. All rights reserved.
3    *
4    * This library is free software; you can redistribute it and/or modify it under
5    * the terms of the GNU Lesser General Public License as published by the Free
6    * Software Foundation; either version 2.1 of the License, or (at your option)
7    * any later version.
8    *
9    * This library is distributed in the hope that it will be useful, but WITHOUT
10   * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
11   * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
12   * details.
13   */
14  
15  package com.liferay.portal.model;
16  
17  import java.io.Serializable;
18  
19  import java.util.ArrayList;
20  import java.util.List;
21  
22  /**
23   * <a href="ListTypeSoap.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.portal.service.http.ListTypeServiceSoap}.
33   * </p>
34   *
35   * @author    Brian Wing Shun Chan
36   * @see       com.liferay.portal.service.http.ListTypeServiceSoap
37   * @generated
38   */
39  public class ListTypeSoap implements Serializable {
40      public static ListTypeSoap toSoapModel(ListType model) {
41          ListTypeSoap soapModel = new ListTypeSoap();
42  
43          soapModel.setListTypeId(model.getListTypeId());
44          soapModel.setName(model.getName());
45          soapModel.setType(model.getType());
46  
47          return soapModel;
48      }
49  
50      public static ListTypeSoap[] toSoapModels(ListType[] models) {
51          ListTypeSoap[] soapModels = new ListTypeSoap[models.length];
52  
53          for (int i = 0; i < models.length; i++) {
54              soapModels[i] = toSoapModel(models[i]);
55          }
56  
57          return soapModels;
58      }
59  
60      public static ListTypeSoap[][] toSoapModels(ListType[][] models) {
61          ListTypeSoap[][] soapModels = null;
62  
63          if (models.length > 0) {
64              soapModels = new ListTypeSoap[models.length][models[0].length];
65          }
66          else {
67              soapModels = new ListTypeSoap[0][0];
68          }
69  
70          for (int i = 0; i < models.length; i++) {
71              soapModels[i] = toSoapModels(models[i]);
72          }
73  
74          return soapModels;
75      }
76  
77      public static ListTypeSoap[] toSoapModels(List<ListType> models) {
78          List<ListTypeSoap> soapModels = new ArrayList<ListTypeSoap>(models.size());
79  
80          for (ListType model : models) {
81              soapModels.add(toSoapModel(model));
82          }
83  
84          return soapModels.toArray(new ListTypeSoap[soapModels.size()]);
85      }
86  
87      public ListTypeSoap() {
88      }
89  
90      public int getPrimaryKey() {
91          return _listTypeId;
92      }
93  
94      public void setPrimaryKey(int pk) {
95          setListTypeId(pk);
96      }
97  
98      public int getListTypeId() {
99          return _listTypeId;
100     }
101 
102     public void setListTypeId(int listTypeId) {
103         _listTypeId = listTypeId;
104     }
105 
106     public String getName() {
107         return _name;
108     }
109 
110     public void setName(String name) {
111         _name = name;
112     }
113 
114     public String getType() {
115         return _type;
116     }
117 
118     public void setType(String type) {
119         _type = type;
120     }
121 
122     private int _listTypeId;
123     private String _name;
124     private String _type;
125 }