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.OrgGroupRolePK;
18  
19  import java.io.Serializable;
20  
21  import java.util.ArrayList;
22  import java.util.List;
23  
24  /**
25   * <a href="OrgGroupRoleSoap.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.OrgGroupRoleServiceSoap}.
35   * </p>
36   *
37   * @author    Brian Wing Shun Chan
38   * @see       com.liferay.portal.service.http.OrgGroupRoleServiceSoap
39   * @generated
40   */
41  public class OrgGroupRoleSoap implements Serializable {
42      public static OrgGroupRoleSoap toSoapModel(OrgGroupRole model) {
43          OrgGroupRoleSoap soapModel = new OrgGroupRoleSoap();
44  
45          soapModel.setOrganizationId(model.getOrganizationId());
46          soapModel.setGroupId(model.getGroupId());
47          soapModel.setRoleId(model.getRoleId());
48  
49          return soapModel;
50      }
51  
52      public static OrgGroupRoleSoap[] toSoapModels(OrgGroupRole[] models) {
53          OrgGroupRoleSoap[] soapModels = new OrgGroupRoleSoap[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 OrgGroupRoleSoap[][] toSoapModels(OrgGroupRole[][] models) {
63          OrgGroupRoleSoap[][] soapModels = null;
64  
65          if (models.length > 0) {
66              soapModels = new OrgGroupRoleSoap[models.length][models[0].length];
67          }
68          else {
69              soapModels = new OrgGroupRoleSoap[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 OrgGroupRoleSoap[] toSoapModels(List<OrgGroupRole> models) {
80          List<OrgGroupRoleSoap> soapModels = new ArrayList<OrgGroupRoleSoap>(models.size());
81  
82          for (OrgGroupRole model : models) {
83              soapModels.add(toSoapModel(model));
84          }
85  
86          return soapModels.toArray(new OrgGroupRoleSoap[soapModels.size()]);
87      }
88  
89      public OrgGroupRoleSoap() {
90      }
91  
92      public OrgGroupRolePK getPrimaryKey() {
93          return new OrgGroupRolePK(_organizationId, _groupId, _roleId);
94      }
95  
96      public void setPrimaryKey(OrgGroupRolePK pk) {
97          setOrganizationId(pk.organizationId);
98          setGroupId(pk.groupId);
99          setRoleId(pk.roleId);
100     }
101 
102     public long getOrganizationId() {
103         return _organizationId;
104     }
105 
106     public void setOrganizationId(long organizationId) {
107         _organizationId = organizationId;
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 _organizationId;
127     private long _groupId;
128     private long _roleId;
129 }