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="ResourcePermissionSoap.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.ResourcePermissionServiceSoap}.
33   * </p>
34   *
35   * @author    Brian Wing Shun Chan
36   * @see       com.liferay.portal.service.http.ResourcePermissionServiceSoap
37   * @generated
38   */
39  public class ResourcePermissionSoap implements Serializable {
40      public static ResourcePermissionSoap toSoapModel(ResourcePermission model) {
41          ResourcePermissionSoap soapModel = new ResourcePermissionSoap();
42  
43          soapModel.setResourcePermissionId(model.getResourcePermissionId());
44          soapModel.setCompanyId(model.getCompanyId());
45          soapModel.setName(model.getName());
46          soapModel.setScope(model.getScope());
47          soapModel.setPrimKey(model.getPrimKey());
48          soapModel.setRoleId(model.getRoleId());
49          soapModel.setActionIds(model.getActionIds());
50  
51          return soapModel;
52      }
53  
54      public static ResourcePermissionSoap[] toSoapModels(
55          ResourcePermission[] models) {
56          ResourcePermissionSoap[] soapModels = new ResourcePermissionSoap[models.length];
57  
58          for (int i = 0; i < models.length; i++) {
59              soapModels[i] = toSoapModel(models[i]);
60          }
61  
62          return soapModels;
63      }
64  
65      public static ResourcePermissionSoap[][] toSoapModels(
66          ResourcePermission[][] models) {
67          ResourcePermissionSoap[][] soapModels = null;
68  
69          if (models.length > 0) {
70              soapModels = new ResourcePermissionSoap[models.length][models[0].length];
71          }
72          else {
73              soapModels = new ResourcePermissionSoap[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 ResourcePermissionSoap[] toSoapModels(
84          List<ResourcePermission> models) {
85          List<ResourcePermissionSoap> soapModels = new ArrayList<ResourcePermissionSoap>(models.size());
86  
87          for (ResourcePermission model : models) {
88              soapModels.add(toSoapModel(model));
89          }
90  
91          return soapModels.toArray(new ResourcePermissionSoap[soapModels.size()]);
92      }
93  
94      public ResourcePermissionSoap() {
95      }
96  
97      public long getPrimaryKey() {
98          return _resourcePermissionId;
99      }
100 
101     public void setPrimaryKey(long pk) {
102         setResourcePermissionId(pk);
103     }
104 
105     public long getResourcePermissionId() {
106         return _resourcePermissionId;
107     }
108 
109     public void setResourcePermissionId(long resourcePermissionId) {
110         _resourcePermissionId = resourcePermissionId;
111     }
112 
113     public long getCompanyId() {
114         return _companyId;
115     }
116 
117     public void setCompanyId(long companyId) {
118         _companyId = companyId;
119     }
120 
121     public String getName() {
122         return _name;
123     }
124 
125     public void setName(String name) {
126         _name = name;
127     }
128 
129     public int getScope() {
130         return _scope;
131     }
132 
133     public void setScope(int scope) {
134         _scope = scope;
135     }
136 
137     public String getPrimKey() {
138         return _primKey;
139     }
140 
141     public void setPrimKey(String primKey) {
142         _primKey = primKey;
143     }
144 
145     public long getRoleId() {
146         return _roleId;
147     }
148 
149     public void setRoleId(long roleId) {
150         _roleId = roleId;
151     }
152 
153     public long getActionIds() {
154         return _actionIds;
155     }
156 
157     public void setActionIds(long actionIds) {
158         _actionIds = actionIds;
159     }
160 
161     private long _resourcePermissionId;
162     private long _companyId;
163     private String _name;
164     private int _scope;
165     private String _primKey;
166     private long _roleId;
167     private long _actionIds;
168 }