001: /**
002: * Copyright (c) 2000-2008 Liferay, Inc. All rights reserved.
003: *
004: * Permission is hereby granted, free of charge, to any person obtaining a copy
005: * of this software and associated documentation files (the "Software"), to deal
006: * in the Software without restriction, including without limitation the rights
007: * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
008: * copies of the Software, and to permit persons to whom the Software is
009: * furnished to do so, subject to the following conditions:
010: *
011: * The above copyright notice and this permission notice shall be included in
012: * all copies or substantial portions of the Software.
013: *
014: * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
015: * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
016: * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
017: * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
018: * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
019: * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
020: * SOFTWARE.
021: */package com.liferay.portal.model;
022:
023: import com.liferay.portal.service.persistence.UserGroupRolePK;
024:
025: import java.io.Serializable;
026:
027: import java.util.ArrayList;
028: import java.util.List;
029:
030: /**
031: * <a href="UserGroupRoleSoap.java.html"><b><i>View Source</i></b></a>
032: *
033: * <p>
034: * ServiceBuilder generated this class. Modifications in this class will be
035: * overwritten the next time is generated.
036: * </p>
037: *
038: * <p>
039: * This class is used by
040: * <code>com.liferay.portal.service.http.UserGroupRoleServiceSoap</code>.
041: * </p>
042: *
043: * @author Brian Wing Shun Chan
044: *
045: * @see com.liferay.portal.service.http.UserGroupRoleServiceSoap
046: *
047: */
048: public class UserGroupRoleSoap implements Serializable {
049: public static UserGroupRoleSoap toSoapModel(UserGroupRole model) {
050: UserGroupRoleSoap soapModel = new UserGroupRoleSoap();
051:
052: soapModel.setUserId(model.getUserId());
053: soapModel.setGroupId(model.getGroupId());
054: soapModel.setRoleId(model.getRoleId());
055:
056: return soapModel;
057: }
058:
059: public static UserGroupRoleSoap[] toSoapModels(List models) {
060: List soapModels = new ArrayList(models.size());
061:
062: for (int i = 0; i < models.size(); i++) {
063: UserGroupRole model = (UserGroupRole) models.get(i);
064:
065: soapModels.add(toSoapModel(model));
066: }
067:
068: return (UserGroupRoleSoap[]) soapModels
069: .toArray(new UserGroupRoleSoap[0]);
070: }
071:
072: public UserGroupRoleSoap() {
073: }
074:
075: public UserGroupRolePK getPrimaryKey() {
076: return new UserGroupRolePK(_userId, _groupId, _roleId);
077: }
078:
079: public void setPrimaryKey(UserGroupRolePK pk) {
080: setUserId(pk.userId);
081: setGroupId(pk.groupId);
082: setRoleId(pk.roleId);
083: }
084:
085: public long getUserId() {
086: return _userId;
087: }
088:
089: public void setUserId(long userId) {
090: _userId = userId;
091: }
092:
093: public long getGroupId() {
094: return _groupId;
095: }
096:
097: public void setGroupId(long groupId) {
098: _groupId = groupId;
099: }
100:
101: public long getRoleId() {
102: return _roleId;
103: }
104:
105: public void setRoleId(long roleId) {
106: _roleId = roleId;
107: }
108:
109: private long _userId;
110: private long _groupId;
111: private long _roleId;
112: }
|