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 com.liferay.portal.service.persistence.OrgGroupRolePK;
020    
021    import java.io.Serializable;
022    
023    import java.util.ArrayList;
024    import java.util.List;
025    
026    /**
027     * This class is used by SOAP remote services.
028     *
029     * @author Brian Wing Shun Chan
030     * @generated
031     */
032    @ProviderType
033    public class OrgGroupRoleSoap implements Serializable {
034            public static OrgGroupRoleSoap toSoapModel(OrgGroupRole model) {
035                    OrgGroupRoleSoap soapModel = new OrgGroupRoleSoap();
036    
037                    soapModel.setMvccVersion(model.getMvccVersion());
038                    soapModel.setOrganizationId(model.getOrganizationId());
039                    soapModel.setGroupId(model.getGroupId());
040                    soapModel.setRoleId(model.getRoleId());
041    
042                    return soapModel;
043            }
044    
045            public static OrgGroupRoleSoap[] toSoapModels(OrgGroupRole[] models) {
046                    OrgGroupRoleSoap[] soapModels = new OrgGroupRoleSoap[models.length];
047    
048                    for (int i = 0; i < models.length; i++) {
049                            soapModels[i] = toSoapModel(models[i]);
050                    }
051    
052                    return soapModels;
053            }
054    
055            public static OrgGroupRoleSoap[][] toSoapModels(OrgGroupRole[][] models) {
056                    OrgGroupRoleSoap[][] soapModels = null;
057    
058                    if (models.length > 0) {
059                            soapModels = new OrgGroupRoleSoap[models.length][models[0].length];
060                    }
061                    else {
062                            soapModels = new OrgGroupRoleSoap[0][0];
063                    }
064    
065                    for (int i = 0; i < models.length; i++) {
066                            soapModels[i] = toSoapModels(models[i]);
067                    }
068    
069                    return soapModels;
070            }
071    
072            public static OrgGroupRoleSoap[] toSoapModels(List<OrgGroupRole> models) {
073                    List<OrgGroupRoleSoap> soapModels = new ArrayList<OrgGroupRoleSoap>(models.size());
074    
075                    for (OrgGroupRole model : models) {
076                            soapModels.add(toSoapModel(model));
077                    }
078    
079                    return soapModels.toArray(new OrgGroupRoleSoap[soapModels.size()]);
080            }
081    
082            public OrgGroupRoleSoap() {
083            }
084    
085            public OrgGroupRolePK getPrimaryKey() {
086                    return new OrgGroupRolePK(_organizationId, _groupId, _roleId);
087            }
088    
089            public void setPrimaryKey(OrgGroupRolePK pk) {
090                    setOrganizationId(pk.organizationId);
091                    setGroupId(pk.groupId);
092                    setRoleId(pk.roleId);
093            }
094    
095            public long getMvccVersion() {
096                    return _mvccVersion;
097            }
098    
099            public void setMvccVersion(long mvccVersion) {
100                    _mvccVersion = mvccVersion;
101            }
102    
103            public long getOrganizationId() {
104                    return _organizationId;
105            }
106    
107            public void setOrganizationId(long organizationId) {
108                    _organizationId = organizationId;
109            }
110    
111            public long getGroupId() {
112                    return _groupId;
113            }
114    
115            public void setGroupId(long groupId) {
116                    _groupId = groupId;
117            }
118    
119            public long getRoleId() {
120                    return _roleId;
121            }
122    
123            public void setRoleId(long roleId) {
124                    _roleId = roleId;
125            }
126    
127            private long _mvccVersion;
128            private long _organizationId;
129            private long _groupId;
130            private long _roleId;
131    }