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.setDescription(model.getDescription());
49          soapModel.setType(model.getType());
50  
51          return soapModel;
52      }
53  
54      public static RoleSoap[] toSoapModels(Role[] models) {
55          RoleSoap[] soapModels = new RoleSoap[models.length];
56  
57          for (int i = 0; i < models.length; i++) {
58              soapModels[i] = toSoapModel(models[i]);
59          }
60  
61          return soapModels;
62      }
63  
64      public static RoleSoap[][] toSoapModels(Role[][] models) {
65          RoleSoap[][] soapModels = null;
66  
67          if (models.length > 0) {
68              soapModels = new RoleSoap[models.length][models[0].length];
69          }
70          else {
71              soapModels = new RoleSoap[0][0];
72          }
73  
74          for (int i = 0; i < models.length; i++) {
75              soapModels[i] = toSoapModels(models[i]);
76          }
77  
78          return soapModels;
79      }
80  
81      public static RoleSoap[] toSoapModels(List<Role> models) {
82          List<RoleSoap> soapModels = new ArrayList<RoleSoap>(models.size());
83  
84          for (Role model : models) {
85              soapModels.add(toSoapModel(model));
86          }
87  
88          return soapModels.toArray(new RoleSoap[soapModels.size()]);
89      }
90  
91      public RoleSoap() {
92      }
93  
94      public long getPrimaryKey() {
95          return _roleId;
96      }
97  
98      public void setPrimaryKey(long pk) {
99          setRoleId(pk);
100     }
101 
102     public long getRoleId() {
103         return _roleId;
104     }
105 
106     public void setRoleId(long roleId) {
107         _roleId = roleId;
108     }
109 
110     public long getCompanyId() {
111         return _companyId;
112     }
113 
114     public void setCompanyId(long companyId) {
115         _companyId = companyId;
116     }
117 
118     public long getClassNameId() {
119         return _classNameId;
120     }
121 
122     public void setClassNameId(long classNameId) {
123         _classNameId = classNameId;
124     }
125 
126     public long getClassPK() {
127         return _classPK;
128     }
129 
130     public void setClassPK(long classPK) {
131         _classPK = classPK;
132     }
133 
134     public String getName() {
135         return _name;
136     }
137 
138     public void setName(String name) {
139         _name = name;
140     }
141 
142     public String getDescription() {
143         return _description;
144     }
145 
146     public void setDescription(String description) {
147         _description = description;
148     }
149 
150     public int getType() {
151         return _type;
152     }
153 
154     public void setType(int type) {
155         _type = type;
156     }
157 
158     private long _roleId;
159     private long _companyId;
160     private long _classNameId;
161     private long _classPK;
162     private String _name;
163     private String _description;
164     private int _type;
165 }