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 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    }