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