001    /**
002     * Copyright (c) 2000-2011 Liferay, Inc. All rights reserved.
003     *
004     * The contents of this file are subject to the terms of the Liferay Enterprise
005     * Subscription License ("License"). You may not use this file except in
006     * compliance with the License. You can obtain a copy of the License by
007     * contacting Liferay, Inc. See the License for the specific language governing
008     * permissions and limitations under the License, including but not limited to
009     * distribution rights of the Software.
010     *
011     *
012     *
013     */
014    
015    package com.liferay.portal.model;
016    
017    import com.liferay.portal.service.persistence.OrgGroupRolePK;
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.
026     *
027     * @author    Brian Wing Shun Chan
028     * @generated
029     */
030    public class OrgGroupRoleSoap implements Serializable {
031            public static OrgGroupRoleSoap toSoapModel(OrgGroupRole model) {
032                    OrgGroupRoleSoap soapModel = new OrgGroupRoleSoap();
033    
034                    soapModel.setOrganizationId(model.getOrganizationId());
035                    soapModel.setGroupId(model.getGroupId());
036                    soapModel.setRoleId(model.getRoleId());
037    
038                    return soapModel;
039            }
040    
041            public static OrgGroupRoleSoap[] toSoapModels(OrgGroupRole[] models) {
042                    OrgGroupRoleSoap[] soapModels = new OrgGroupRoleSoap[models.length];
043    
044                    for (int i = 0; i < models.length; i++) {
045                            soapModels[i] = toSoapModel(models[i]);
046                    }
047    
048                    return soapModels;
049            }
050    
051            public static OrgGroupRoleSoap[][] toSoapModels(OrgGroupRole[][] models) {
052                    OrgGroupRoleSoap[][] soapModels = null;
053    
054                    if (models.length > 0) {
055                            soapModels = new OrgGroupRoleSoap[models.length][models[0].length];
056                    }
057                    else {
058                            soapModels = new OrgGroupRoleSoap[0][0];
059                    }
060    
061                    for (int i = 0; i < models.length; i++) {
062                            soapModels[i] = toSoapModels(models[i]);
063                    }
064    
065                    return soapModels;
066            }
067    
068            public static OrgGroupRoleSoap[] toSoapModels(List<OrgGroupRole> models) {
069                    List<OrgGroupRoleSoap> soapModels = new ArrayList<OrgGroupRoleSoap>(models.size());
070    
071                    for (OrgGroupRole model : models) {
072                            soapModels.add(toSoapModel(model));
073                    }
074    
075                    return soapModels.toArray(new OrgGroupRoleSoap[soapModels.size()]);
076            }
077    
078            public OrgGroupRoleSoap() {
079            }
080    
081            public OrgGroupRolePK getPrimaryKey() {
082                    return new OrgGroupRolePK(_organizationId, _groupId, _roleId);
083            }
084    
085            public void setPrimaryKey(OrgGroupRolePK pk) {
086                    setOrganizationId(pk.organizationId);
087                    setGroupId(pk.groupId);
088                    setRoleId(pk.roleId);
089            }
090    
091            public long getOrganizationId() {
092                    return _organizationId;
093            }
094    
095            public void setOrganizationId(long organizationId) {
096                    _organizationId = organizationId;
097            }
098    
099            public long getGroupId() {
100                    return _groupId;
101            }
102    
103            public void setGroupId(long groupId) {
104                    _groupId = groupId;
105            }
106    
107            public long getRoleId() {
108                    return _roleId;
109            }
110    
111            public void setRoleId(long roleId) {
112                    _roleId = roleId;
113            }
114    
115            private long _organizationId;
116            private long _groupId;
117            private long _roleId;
118    }