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