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