001    /**
002     * Copyright (c) 2000-present Liferay, Inc. All rights reserved.
003     *
004     * This library is free software; you can redistribute it and/or modify it under
005     * the terms of the GNU Lesser General Public License as published by the Free
006     * Software Foundation; either version 2.1 of the License, or (at your option)
007     * any later version.
008     *
009     * This library is distributed in the hope that it will be useful, but WITHOUT
010     * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
011     * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
012     * details.
013     */
014    
015    package com.liferay.portal.model;
016    
017    import aQute.bnd.annotation.ProviderType;
018    
019    import java.io.Serializable;
020    
021    import java.util.ArrayList;
022    import java.util.List;
023    
024    /**
025     * This class is used by SOAP remote services, specifically {@link com.liferay.portal.service.http.ResourcePermissionServiceSoap}.
026     *
027     * @author Brian Wing Shun Chan
028     * @see com.liferay.portal.service.http.ResourcePermissionServiceSoap
029     * @generated
030     */
031    @ProviderType
032    public class ResourcePermissionSoap implements Serializable {
033            public static ResourcePermissionSoap toSoapModel(ResourcePermission model) {
034                    ResourcePermissionSoap soapModel = new ResourcePermissionSoap();
035    
036                    soapModel.setMvccVersion(model.getMvccVersion());
037                    soapModel.setResourcePermissionId(model.getResourcePermissionId());
038                    soapModel.setCompanyId(model.getCompanyId());
039                    soapModel.setName(model.getName());
040                    soapModel.setScope(model.getScope());
041                    soapModel.setPrimKey(model.getPrimKey());
042                    soapModel.setPrimKeyId(model.getPrimKeyId());
043                    soapModel.setRoleId(model.getRoleId());
044                    soapModel.setOwnerId(model.getOwnerId());
045                    soapModel.setActionIds(model.getActionIds());
046                    soapModel.setViewActionId(model.getViewActionId());
047    
048                    return soapModel;
049            }
050    
051            public static ResourcePermissionSoap[] toSoapModels(
052                    ResourcePermission[] models) {
053                    ResourcePermissionSoap[] soapModels = new ResourcePermissionSoap[models.length];
054    
055                    for (int i = 0; i < models.length; i++) {
056                            soapModels[i] = toSoapModel(models[i]);
057                    }
058    
059                    return soapModels;
060            }
061    
062            public static ResourcePermissionSoap[][] toSoapModels(
063                    ResourcePermission[][] models) {
064                    ResourcePermissionSoap[][] soapModels = null;
065    
066                    if (models.length > 0) {
067                            soapModels = new ResourcePermissionSoap[models.length][models[0].length];
068                    }
069                    else {
070                            soapModels = new ResourcePermissionSoap[0][0];
071                    }
072    
073                    for (int i = 0; i < models.length; i++) {
074                            soapModels[i] = toSoapModels(models[i]);
075                    }
076    
077                    return soapModels;
078            }
079    
080            public static ResourcePermissionSoap[] toSoapModels(
081                    List<ResourcePermission> models) {
082                    List<ResourcePermissionSoap> soapModels = new ArrayList<ResourcePermissionSoap>(models.size());
083    
084                    for (ResourcePermission model : models) {
085                            soapModels.add(toSoapModel(model));
086                    }
087    
088                    return soapModels.toArray(new ResourcePermissionSoap[soapModels.size()]);
089            }
090    
091            public ResourcePermissionSoap() {
092            }
093    
094            public long getPrimaryKey() {
095                    return _resourcePermissionId;
096            }
097    
098            public void setPrimaryKey(long pk) {
099                    setResourcePermissionId(pk);
100            }
101    
102            public long getMvccVersion() {
103                    return _mvccVersion;
104            }
105    
106            public void setMvccVersion(long mvccVersion) {
107                    _mvccVersion = mvccVersion;
108            }
109    
110            public long getResourcePermissionId() {
111                    return _resourcePermissionId;
112            }
113    
114            public void setResourcePermissionId(long resourcePermissionId) {
115                    _resourcePermissionId = resourcePermissionId;
116            }
117    
118            public long getCompanyId() {
119                    return _companyId;
120            }
121    
122            public void setCompanyId(long companyId) {
123                    _companyId = companyId;
124            }
125    
126            public String getName() {
127                    return _name;
128            }
129    
130            public void setName(String name) {
131                    _name = name;
132            }
133    
134            public int getScope() {
135                    return _scope;
136            }
137    
138            public void setScope(int scope) {
139                    _scope = scope;
140            }
141    
142            public String getPrimKey() {
143                    return _primKey;
144            }
145    
146            public void setPrimKey(String primKey) {
147                    _primKey = primKey;
148            }
149    
150            public long getPrimKeyId() {
151                    return _primKeyId;
152            }
153    
154            public void setPrimKeyId(long primKeyId) {
155                    _primKeyId = primKeyId;
156            }
157    
158            public long getRoleId() {
159                    return _roleId;
160            }
161    
162            public void setRoleId(long roleId) {
163                    _roleId = roleId;
164            }
165    
166            public long getOwnerId() {
167                    return _ownerId;
168            }
169    
170            public void setOwnerId(long ownerId) {
171                    _ownerId = ownerId;
172            }
173    
174            public long getActionIds() {
175                    return _actionIds;
176            }
177    
178            public void setActionIds(long actionIds) {
179                    _actionIds = actionIds;
180            }
181    
182            public boolean getViewActionId() {
183                    return _viewActionId;
184            }
185    
186            public boolean isViewActionId() {
187                    return _viewActionId;
188            }
189    
190            public void setViewActionId(boolean viewActionId) {
191                    _viewActionId = viewActionId;
192            }
193    
194            private long _mvccVersion;
195            private long _resourcePermissionId;
196            private long _companyId;
197            private String _name;
198            private int _scope;
199            private String _primKey;
200            private long _primKeyId;
201            private long _roleId;
202            private long _ownerId;
203            private long _actionIds;
204            private boolean _viewActionId;
205    }