1   /**
2    * Copyright (c) 2000-2010 Liferay, Inc. All rights reserved.
3    *
4    * The contents of this file are subject to the terms of the Liferay Enterprise
5    * Subscription License ("License"). You may not use this file except in
6    * compliance with the License. You can obtain a copy of the License by
7    * contacting Liferay, Inc. See the License for the specific language governing
8    * permissions and limitations under the License, including but not limited to
9    * distribution rights of the Software.
10   *
11   *
12   *
13   */
14  
15  package com.liferay.portal.model;
16  
17  import com.liferay.portal.service.persistence.UserGroupRolePK;
18  
19  import java.io.Serializable;
20  
21  import java.util.ArrayList;
22  import java.util.List;
23  
24  /**
25   * <a href="UserGroupRoleSoap.java.html"><b><i>View Source</i></b></a>
26   *
27   * <p>
28   * ServiceBuilder generated this class. Modifications in this class will be
29   * overwritten the next time is generated.
30   * </p>
31   *
32   * <p>
33   * This class is used by
34   * {@link com.liferay.portal.service.http.UserGroupRoleServiceSoap}.
35   * </p>
36   *
37   * @author    Brian Wing Shun Chan
38   * @see       com.liferay.portal.service.http.UserGroupRoleServiceSoap
39   * @generated
40   */
41  public class UserGroupRoleSoap implements Serializable {
42      public static UserGroupRoleSoap toSoapModel(UserGroupRole model) {
43          UserGroupRoleSoap soapModel = new UserGroupRoleSoap();
44  
45          soapModel.setUserId(model.getUserId());
46          soapModel.setGroupId(model.getGroupId());
47          soapModel.setRoleId(model.getRoleId());
48  
49          return soapModel;
50      }
51  
52      public static UserGroupRoleSoap[] toSoapModels(UserGroupRole[] models) {
53          UserGroupRoleSoap[] soapModels = new UserGroupRoleSoap[models.length];
54  
55          for (int i = 0; i < models.length; i++) {
56              soapModels[i] = toSoapModel(models[i]);
57          }
58  
59          return soapModels;
60      }
61  
62      public static UserGroupRoleSoap[][] toSoapModels(UserGroupRole[][] models) {
63          UserGroupRoleSoap[][] soapModels = null;
64  
65          if (models.length > 0) {
66              soapModels = new UserGroupRoleSoap[models.length][models[0].length];
67          }
68          else {
69              soapModels = new UserGroupRoleSoap[0][0];
70          }
71  
72          for (int i = 0; i < models.length; i++) {
73              soapModels[i] = toSoapModels(models[i]);
74          }
75  
76          return soapModels;
77      }
78  
79      public static UserGroupRoleSoap[] toSoapModels(List<UserGroupRole> models) {
80          List<UserGroupRoleSoap> soapModels = new ArrayList<UserGroupRoleSoap>(models.size());
81  
82          for (UserGroupRole model : models) {
83              soapModels.add(toSoapModel(model));
84          }
85  
86          return soapModels.toArray(new UserGroupRoleSoap[soapModels.size()]);
87      }
88  
89      public UserGroupRoleSoap() {
90      }
91  
92      public UserGroupRolePK getPrimaryKey() {
93          return new UserGroupRolePK(_userId, _groupId, _roleId);
94      }
95  
96      public void setPrimaryKey(UserGroupRolePK pk) {
97          setUserId(pk.userId);
98          setGroupId(pk.groupId);
99          setRoleId(pk.roleId);
100     }
101 
102     public long getUserId() {
103         return _userId;
104     }
105 
106     public void setUserId(long userId) {
107         _userId = userId;
108     }
109 
110     public long getGroupId() {
111         return _groupId;
112     }
113 
114     public void setGroupId(long groupId) {
115         _groupId = groupId;
116     }
117 
118     public long getRoleId() {
119         return _roleId;
120     }
121 
122     public void setRoleId(long roleId) {
123         _roleId = roleId;
124     }
125 
126     private long _userId;
127     private long _groupId;
128     private long _roleId;
129 }