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.ResourceBlockServiceSoap}.
024     *
025     * @author    Brian Wing Shun Chan
026     * @see       com.liferay.portal.service.http.ResourceBlockServiceSoap
027     * @generated
028     */
029    public class ResourceBlockSoap implements Serializable {
030            public static ResourceBlockSoap toSoapModel(ResourceBlock model) {
031                    ResourceBlockSoap soapModel = new ResourceBlockSoap();
032    
033                    soapModel.setResourceBlockId(model.getResourceBlockId());
034                    soapModel.setCompanyId(model.getCompanyId());
035                    soapModel.setGroupId(model.getGroupId());
036                    soapModel.setName(model.getName());
037                    soapModel.setPermissionsHash(model.getPermissionsHash());
038                    soapModel.setReferenceCount(model.getReferenceCount());
039    
040                    return soapModel;
041            }
042    
043            public static ResourceBlockSoap[] toSoapModels(ResourceBlock[] models) {
044                    ResourceBlockSoap[] soapModels = new ResourceBlockSoap[models.length];
045    
046                    for (int i = 0; i < models.length; i++) {
047                            soapModels[i] = toSoapModel(models[i]);
048                    }
049    
050                    return soapModels;
051            }
052    
053            public static ResourceBlockSoap[][] toSoapModels(ResourceBlock[][] models) {
054                    ResourceBlockSoap[][] soapModels = null;
055    
056                    if (models.length > 0) {
057                            soapModels = new ResourceBlockSoap[models.length][models[0].length];
058                    }
059                    else {
060                            soapModels = new ResourceBlockSoap[0][0];
061                    }
062    
063                    for (int i = 0; i < models.length; i++) {
064                            soapModels[i] = toSoapModels(models[i]);
065                    }
066    
067                    return soapModels;
068            }
069    
070            public static ResourceBlockSoap[] toSoapModels(List<ResourceBlock> models) {
071                    List<ResourceBlockSoap> soapModels = new ArrayList<ResourceBlockSoap>(models.size());
072    
073                    for (ResourceBlock model : models) {
074                            soapModels.add(toSoapModel(model));
075                    }
076    
077                    return soapModels.toArray(new ResourceBlockSoap[soapModels.size()]);
078            }
079    
080            public ResourceBlockSoap() {
081            }
082    
083            public long getPrimaryKey() {
084                    return _resourceBlockId;
085            }
086    
087            public void setPrimaryKey(long pk) {
088                    setResourceBlockId(pk);
089            }
090    
091            public long getResourceBlockId() {
092                    return _resourceBlockId;
093            }
094    
095            public void setResourceBlockId(long resourceBlockId) {
096                    _resourceBlockId = resourceBlockId;
097            }
098    
099            public long getCompanyId() {
100                    return _companyId;
101            }
102    
103            public void setCompanyId(long companyId) {
104                    _companyId = companyId;
105            }
106    
107            public long getGroupId() {
108                    return _groupId;
109            }
110    
111            public void setGroupId(long groupId) {
112                    _groupId = groupId;
113            }
114    
115            public String getName() {
116                    return _name;
117            }
118    
119            public void setName(String name) {
120                    _name = name;
121            }
122    
123            public String getPermissionsHash() {
124                    return _permissionsHash;
125            }
126    
127            public void setPermissionsHash(String permissionsHash) {
128                    _permissionsHash = permissionsHash;
129            }
130    
131            public long getReferenceCount() {
132                    return _referenceCount;
133            }
134    
135            public void setReferenceCount(long referenceCount) {
136                    _referenceCount = referenceCount;
137            }
138    
139            private long _resourceBlockId;
140            private long _companyId;
141            private long _groupId;
142            private String _name;
143            private String _permissionsHash;
144            private long _referenceCount;
145    }