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="RoleSoap.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.RoleServiceSoap}.
41   * </p>
42   *
43   * @author    Brian Wing Shun Chan
44   * @see       com.liferay.portal.service.http.RoleServiceSoap
45   * @generated
46   */
47  public class RoleSoap implements Serializable {
48      public static RoleSoap toSoapModel(Role model) {
49          RoleSoap soapModel = new RoleSoap();
50  
51          soapModel.setRoleId(model.getRoleId());
52          soapModel.setCompanyId(model.getCompanyId());
53          soapModel.setClassNameId(model.getClassNameId());
54          soapModel.setClassPK(model.getClassPK());
55          soapModel.setName(model.getName());
56          soapModel.setTitle(model.getTitle());
57          soapModel.setDescription(model.getDescription());
58          soapModel.setType(model.getType());
59          soapModel.setSubtype(model.getSubtype());
60  
61          return soapModel;
62      }
63  
64      public static RoleSoap[] toSoapModels(Role[] models) {
65          RoleSoap[] soapModels = new RoleSoap[models.length];
66  
67          for (int i = 0; i < models.length; i++) {
68              soapModels[i] = toSoapModel(models[i]);
69          }
70  
71          return soapModels;
72      }
73  
74      public static RoleSoap[][] toSoapModels(Role[][] models) {
75          RoleSoap[][] soapModels = null;
76  
77          if (models.length > 0) {
78              soapModels = new RoleSoap[models.length][models[0].length];
79          }
80          else {
81              soapModels = new RoleSoap[0][0];
82          }
83  
84          for (int i = 0; i < models.length; i++) {
85              soapModels[i] = toSoapModels(models[i]);
86          }
87  
88          return soapModels;
89      }
90  
91      public static RoleSoap[] toSoapModels(List<Role> models) {
92          List<RoleSoap> soapModels = new ArrayList<RoleSoap>(models.size());
93  
94          for (Role model : models) {
95              soapModels.add(toSoapModel(model));
96          }
97  
98          return soapModels.toArray(new RoleSoap[soapModels.size()]);
99      }
100 
101     public RoleSoap() {
102     }
103 
104     public long getPrimaryKey() {
105         return _roleId;
106     }
107 
108     public void setPrimaryKey(long pk) {
109         setRoleId(pk);
110     }
111 
112     public long getRoleId() {
113         return _roleId;
114     }
115 
116     public void setRoleId(long roleId) {
117         _roleId = roleId;
118     }
119 
120     public long getCompanyId() {
121         return _companyId;
122     }
123 
124     public void setCompanyId(long companyId) {
125         _companyId = companyId;
126     }
127 
128     public long getClassNameId() {
129         return _classNameId;
130     }
131 
132     public void setClassNameId(long classNameId) {
133         _classNameId = classNameId;
134     }
135 
136     public long getClassPK() {
137         return _classPK;
138     }
139 
140     public void setClassPK(long classPK) {
141         _classPK = classPK;
142     }
143 
144     public String getName() {
145         return _name;
146     }
147 
148     public void setName(String name) {
149         _name = name;
150     }
151 
152     public String getTitle() {
153         return _title;
154     }
155 
156     public void setTitle(String title) {
157         _title = title;
158     }
159 
160     public String getDescription() {
161         return _description;
162     }
163 
164     public void setDescription(String description) {
165         _description = description;
166     }
167 
168     public int getType() {
169         return _type;
170     }
171 
172     public void setType(int type) {
173         _type = type;
174     }
175 
176     public String getSubtype() {
177         return _subtype;
178     }
179 
180     public void setSubtype(String subtype) {
181         _subtype = subtype;
182     }
183 
184     private long _roleId;
185     private long _companyId;
186     private long _classNameId;
187     private long _classPK;
188     private String _name;
189     private String _title;
190     private String _description;
191     private int _type;
192     private String _subtype;
193 }