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