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                    soapModel.setCompanyId(model.getCompanyId());
042    
043                    return soapModel;
044            }
045    
046            public static OrgGroupRoleSoap[] toSoapModels(OrgGroupRole[] models) {
047                    OrgGroupRoleSoap[] soapModels = new OrgGroupRoleSoap[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 OrgGroupRoleSoap[][] toSoapModels(OrgGroupRole[][] models) {
057                    OrgGroupRoleSoap[][] soapModels = null;
058    
059                    if (models.length > 0) {
060                            soapModels = new OrgGroupRoleSoap[models.length][models[0].length];
061                    }
062                    else {
063                            soapModels = new OrgGroupRoleSoap[0][0];
064                    }
065    
066                    for (int i = 0; i < models.length; i++) {
067                            soapModels[i] = toSoapModels(models[i]);
068                    }
069    
070                    return soapModels;
071            }
072    
073            public static OrgGroupRoleSoap[] toSoapModels(List<OrgGroupRole> models) {
074                    List<OrgGroupRoleSoap> soapModels = new ArrayList<OrgGroupRoleSoap>(models.size());
075    
076                    for (OrgGroupRole model : models) {
077                            soapModels.add(toSoapModel(model));
078                    }
079    
080                    return soapModels.toArray(new OrgGroupRoleSoap[soapModels.size()]);
081            }
082    
083            public OrgGroupRoleSoap() {
084            }
085    
086            public OrgGroupRolePK getPrimaryKey() {
087                    return new OrgGroupRolePK(_organizationId, _groupId, _roleId);
088            }
089    
090            public void setPrimaryKey(OrgGroupRolePK pk) {
091                    setOrganizationId(pk.organizationId);
092                    setGroupId(pk.groupId);
093                    setRoleId(pk.roleId);
094            }
095    
096            public long getMvccVersion() {
097                    return _mvccVersion;
098            }
099    
100            public void setMvccVersion(long mvccVersion) {
101                    _mvccVersion = mvccVersion;
102            }
103    
104            public long getOrganizationId() {
105                    return _organizationId;
106            }
107    
108            public void setOrganizationId(long organizationId) {
109                    _organizationId = organizationId;
110            }
111    
112            public long getGroupId() {
113                    return _groupId;
114            }
115    
116            public void setGroupId(long groupId) {
117                    _groupId = groupId;
118            }
119    
120            public long getRoleId() {
121                    return _roleId;
122            }
123    
124            public void setRoleId(long roleId) {
125                    _roleId = roleId;
126            }
127    
128            public long getCompanyId() {
129                    return _companyId;
130            }
131    
132            public void setCompanyId(long companyId) {
133                    _companyId = companyId;
134            }
135    
136            private long _mvccVersion;
137            private long _organizationId;
138            private long _groupId;
139            private long _roleId;
140            private long _companyId;
141    }