1   /**
2    * Copyright (c) 2000-2010 Liferay, Inc. All rights reserved.
3    *
4    * This library is free software; you can redistribute it and/or modify it under
5    * the terms of the GNU Lesser General Public License as published by the Free
6    * Software Foundation; either version 2.1 of the License, or (at your option)
7    * any later version.
8    *
9    * This library is distributed in the hope that it will be useful, but WITHOUT
10   * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
11   * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
12   * details.
13   */
14  
15  package com.liferay.portal.model;
16  
17  import com.liferay.portal.service.persistence.UserGroupGroupRolePK;
18  
19  import java.io.Serializable;
20  
21  import java.util.ArrayList;
22  import java.util.List;
23  
24  /**
25   * <a href="UserGroupGroupRoleSoap.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.UserGroupGroupRoleServiceSoap}.
35   * </p>
36   *
37   * @author    Brian Wing Shun Chan
38   * @see       com.liferay.portal.service.http.UserGroupGroupRoleServiceSoap
39   * @generated
40   */
41  public class UserGroupGroupRoleSoap implements Serializable {
42      public static UserGroupGroupRoleSoap toSoapModel(UserGroupGroupRole model) {
43          UserGroupGroupRoleSoap soapModel = new UserGroupGroupRoleSoap();
44  
45          soapModel.setUserGroupId(model.getUserGroupId());
46          soapModel.setGroupId(model.getGroupId());
47          soapModel.setRoleId(model.getRoleId());
48  
49          return soapModel;
50      }
51  
52      public static UserGroupGroupRoleSoap[] toSoapModels(
53          UserGroupGroupRole[] models) {
54          UserGroupGroupRoleSoap[] soapModels = new UserGroupGroupRoleSoap[models.length];
55  
56          for (int i = 0; i < models.length; i++) {
57              soapModels[i] = toSoapModel(models[i]);
58          }
59  
60          return soapModels;
61      }
62  
63      public static UserGroupGroupRoleSoap[][] toSoapModels(
64          UserGroupGroupRole[][] models) {
65          UserGroupGroupRoleSoap[][] soapModels = null;
66  
67          if (models.length > 0) {
68              soapModels = new UserGroupGroupRoleSoap[models.length][models[0].length];
69          }
70          else {
71              soapModels = new UserGroupGroupRoleSoap[0][0];
72          }
73  
74          for (int i = 0; i < models.length; i++) {
75              soapModels[i] = toSoapModels(models[i]);
76          }
77  
78          return soapModels;
79      }
80  
81      public static UserGroupGroupRoleSoap[] toSoapModels(
82          List<UserGroupGroupRole> models) {
83          List<UserGroupGroupRoleSoap> soapModels = new ArrayList<UserGroupGroupRoleSoap>(models.size());
84  
85          for (UserGroupGroupRole model : models) {
86              soapModels.add(toSoapModel(model));
87          }
88  
89          return soapModels.toArray(new UserGroupGroupRoleSoap[soapModels.size()]);
90      }
91  
92      public UserGroupGroupRoleSoap() {
93      }
94  
95      public UserGroupGroupRolePK getPrimaryKey() {
96          return new UserGroupGroupRolePK(_userGroupId, _groupId, _roleId);
97      }
98  
99      public void setPrimaryKey(UserGroupGroupRolePK pk) {
100         setUserGroupId(pk.userGroupId);
101         setGroupId(pk.groupId);
102         setRoleId(pk.roleId);
103     }
104 
105     public long getUserGroupId() {
106         return _userGroupId;
107     }
108 
109     public void setUserGroupId(long userGroupId) {
110         _userGroupId = userGroupId;
111     }
112 
113     public long getGroupId() {
114         return _groupId;
115     }
116 
117     public void setGroupId(long groupId) {
118         _groupId = groupId;
119     }
120 
121     public long getRoleId() {
122         return _roleId;
123     }
124 
125     public void setRoleId(long roleId) {
126         _roleId = roleId;
127     }
128 
129     private long _userGroupId;
130     private long _groupId;
131     private long _roleId;
132 }