001    /**
002     * Copyright (c) 2000-2013 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 java.io.Serializable;
018    
019    import java.util.ArrayList;
020    import java.util.List;
021    
022    /**
023     * This class is used by SOAP remote services, specifically {@link com.liferay.portal.service.http.ResourcePermissionServiceSoap}.
024     *
025     * @author    Brian Wing Shun Chan
026     * @see       com.liferay.portal.service.http.ResourcePermissionServiceSoap
027     * @generated
028     */
029    public class ResourcePermissionSoap implements Serializable {
030            public static ResourcePermissionSoap toSoapModel(ResourcePermission model) {
031                    ResourcePermissionSoap soapModel = new ResourcePermissionSoap();
032    
033                    soapModel.setResourcePermissionId(model.getResourcePermissionId());
034                    soapModel.setCompanyId(model.getCompanyId());
035                    soapModel.setName(model.getName());
036                    soapModel.setScope(model.getScope());
037                    soapModel.setPrimKey(model.getPrimKey());
038                    soapModel.setRoleId(model.getRoleId());
039                    soapModel.setOwnerId(model.getOwnerId());
040                    soapModel.setActionIds(model.getActionIds());
041    
042                    return soapModel;
043            }
044    
045            public static ResourcePermissionSoap[] toSoapModels(
046                    ResourcePermission[] models) {
047                    ResourcePermissionSoap[] soapModels = new ResourcePermissionSoap[models.length];
048    
049                    for (int i = 0; i < models.length; i++) {
050                            soapModels[i] = toSoapModel(models[i]);
051                    }
052    
053                    return soapModels;
054            }
055    
056            public static ResourcePermissionSoap[][] toSoapModels(
057                    ResourcePermission[][] models) {
058                    ResourcePermissionSoap[][] soapModels = null;
059    
060                    if (models.length > 0) {
061                            soapModels = new ResourcePermissionSoap[models.length][models[0].length];
062                    }
063                    else {
064                            soapModels = new ResourcePermissionSoap[0][0];
065                    }
066    
067                    for (int i = 0; i < models.length; i++) {
068                            soapModels[i] = toSoapModels(models[i]);
069                    }
070    
071                    return soapModels;
072            }
073    
074            public static ResourcePermissionSoap[] toSoapModels(
075                    List<ResourcePermission> models) {
076                    List<ResourcePermissionSoap> soapModels = new ArrayList<ResourcePermissionSoap>(models.size());
077    
078                    for (ResourcePermission model : models) {
079                            soapModels.add(toSoapModel(model));
080                    }
081    
082                    return soapModels.toArray(new ResourcePermissionSoap[soapModels.size()]);
083            }
084    
085            public ResourcePermissionSoap() {
086            }
087    
088            public long getPrimaryKey() {
089                    return _resourcePermissionId;
090            }
091    
092            public void setPrimaryKey(long pk) {
093                    setResourcePermissionId(pk);
094            }
095    
096            public long getResourcePermissionId() {
097                    return _resourcePermissionId;
098            }
099    
100            public void setResourcePermissionId(long resourcePermissionId) {
101                    _resourcePermissionId = resourcePermissionId;
102            }
103    
104            public long getCompanyId() {
105                    return _companyId;
106            }
107    
108            public void setCompanyId(long companyId) {
109                    _companyId = companyId;
110            }
111    
112            public String getName() {
113                    return _name;
114            }
115    
116            public void setName(String name) {
117                    _name = name;
118            }
119    
120            public int getScope() {
121                    return _scope;
122            }
123    
124            public void setScope(int scope) {
125                    _scope = scope;
126            }
127    
128            public String getPrimKey() {
129                    return _primKey;
130            }
131    
132            public void setPrimKey(String primKey) {
133                    _primKey = primKey;
134            }
135    
136            public long getRoleId() {
137                    return _roleId;
138            }
139    
140            public void setRoleId(long roleId) {
141                    _roleId = roleId;
142            }
143    
144            public long getOwnerId() {
145                    return _ownerId;
146            }
147    
148            public void setOwnerId(long ownerId) {
149                    _ownerId = ownerId;
150            }
151    
152            public long getActionIds() {
153                    return _actionIds;
154            }
155    
156            public void setActionIds(long actionIds) {
157                    _actionIds = actionIds;
158            }
159    
160            private long _resourcePermissionId;
161            private long _companyId;
162            private String _name;
163            private int _scope;
164            private String _primKey;
165            private long _roleId;
166            private long _ownerId;
167            private long _actionIds;
168    }