1   /**
2    * Copyright (c) 2000-2009 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   * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
12   * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
13   * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
14   * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
15   * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
16   * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
17   * SOFTWARE.
18   */
19  
20  package com.liferay.portal.model;
21  
22  import java.io.Serializable;
23  
24  import java.util.ArrayList;
25  import java.util.List;
26  
27  /**
28   * <a href="RoleSoap.java.html"><b><i>View Source</i></b></a>
29   *
30   * <p>
31   * ServiceBuilder generated this class. Modifications in this class will be
32   * overwritten the next time is generated.
33   * </p>
34   *
35   * <p>
36   * This class is used by
37   * <code>com.liferay.portal.service.http.RoleServiceSoap</code>.
38   * </p>
39   *
40   * @author Brian Wing Shun Chan
41   *
42   * @see com.liferay.portal.service.http.RoleServiceSoap
43   *
44   */
45  public class RoleSoap implements Serializable {
46      public static RoleSoap toSoapModel(Role model) {
47          RoleSoap soapModel = new RoleSoap();
48  
49          soapModel.setRoleId(model.getRoleId());
50          soapModel.setCompanyId(model.getCompanyId());
51          soapModel.setClassNameId(model.getClassNameId());
52          soapModel.setClassPK(model.getClassPK());
53          soapModel.setName(model.getName());
54          soapModel.setTitle(model.getTitle());
55          soapModel.setDescription(model.getDescription());
56          soapModel.setType(model.getType());
57          soapModel.setSubtype(model.getSubtype());
58  
59          return soapModel;
60      }
61  
62      public static RoleSoap[] toSoapModels(Role[] models) {
63          RoleSoap[] soapModels = new RoleSoap[models.length];
64  
65          for (int i = 0; i < models.length; i++) {
66              soapModels[i] = toSoapModel(models[i]);
67          }
68  
69          return soapModels;
70      }
71  
72      public static RoleSoap[][] toSoapModels(Role[][] models) {
73          RoleSoap[][] soapModels = null;
74  
75          if (models.length > 0) {
76              soapModels = new RoleSoap[models.length][models[0].length];
77          }
78          else {
79              soapModels = new RoleSoap[0][0];
80          }
81  
82          for (int i = 0; i < models.length; i++) {
83              soapModels[i] = toSoapModels(models[i]);
84          }
85  
86          return soapModels;
87      }
88  
89      public static RoleSoap[] toSoapModels(List<Role> models) {
90          List<RoleSoap> soapModels = new ArrayList<RoleSoap>(models.size());
91  
92          for (Role model : models) {
93              soapModels.add(toSoapModel(model));
94          }
95  
96          return soapModels.toArray(new RoleSoap[soapModels.size()]);
97      }
98  
99      public RoleSoap() {
100     }
101 
102     public long getPrimaryKey() {
103         return _roleId;
104     }
105 
106     public void setPrimaryKey(long pk) {
107         setRoleId(pk);
108     }
109 
110     public long getRoleId() {
111         return _roleId;
112     }
113 
114     public void setRoleId(long roleId) {
115         _roleId = roleId;
116     }
117 
118     public long getCompanyId() {
119         return _companyId;
120     }
121 
122     public void setCompanyId(long companyId) {
123         _companyId = companyId;
124     }
125 
126     public long getClassNameId() {
127         return _classNameId;
128     }
129 
130     public void setClassNameId(long classNameId) {
131         _classNameId = classNameId;
132     }
133 
134     public long getClassPK() {
135         return _classPK;
136     }
137 
138     public void setClassPK(long classPK) {
139         _classPK = classPK;
140     }
141 
142     public String getName() {
143         return _name;
144     }
145 
146     public void setName(String name) {
147         _name = name;
148     }
149 
150     public String getTitle() {
151         return _title;
152     }
153 
154     public void setTitle(String title) {
155         _title = title;
156     }
157 
158     public String getDescription() {
159         return _description;
160     }
161 
162     public void setDescription(String description) {
163         _description = description;
164     }
165 
166     public int getType() {
167         return _type;
168     }
169 
170     public void setType(int type) {
171         _type = type;
172     }
173 
174     public String getSubtype() {
175         return _subtype;
176     }
177 
178     public void setSubtype(String subtype) {
179         _subtype = subtype;
180     }
181 
182     private long _roleId;
183     private long _companyId;
184     private long _classNameId;
185     private long _classPK;
186     private String _name;
187     private String _title;
188     private String _description;
189     private int _type;
190     private String _subtype;
191 }