1   /**
2    * Copyright (c) 2000-2009 Liferay, Inc. All rights reserved.
3    *
4    * Permission is hereby granted, free of charge, to any person obtaining a copy
5    * of this software and associated documentation files (the "Software"), to deal
6    * in the Software without restriction, including without limitation the rights
7    * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8    * copies of the Software, and to permit persons to whom the Software is
9    * furnished to do so, subject to the following conditions:
10   *
11   * The above copyright notice and this permission notice shall be included in
12   * all copies or substantial portions of the Software.
13   *
14   * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15   * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16   * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17   * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18   * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19   * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20   * SOFTWARE.
21   */
22  
23  package com.liferay.portal.model;
24  
25  import java.io.Serializable;
26  
27  import java.util.ArrayList;
28  import java.util.List;
29  
30  /**
31   * <a href="GroupSoap.java.html"><b><i>View Source</i></b></a>
32   *
33   * <p>
34   * ServiceBuilder generated this class. Modifications in this class will be
35   * overwritten the next time is generated.
36   * </p>
37   *
38   * <p>
39   * This class is used by
40   * <code>com.liferay.portal.service.http.GroupServiceSoap</code>.
41   * </p>
42   *
43   * @author Brian Wing Shun Chan
44   *
45   * @see com.liferay.portal.service.http.GroupServiceSoap
46   *
47   */
48  public class GroupSoap implements Serializable {
49      public static GroupSoap toSoapModel(Group model) {
50          GroupSoap soapModel = new GroupSoap();
51  
52          soapModel.setGroupId(model.getGroupId());
53          soapModel.setCompanyId(model.getCompanyId());
54          soapModel.setCreatorUserId(model.getCreatorUserId());
55          soapModel.setClassNameId(model.getClassNameId());
56          soapModel.setClassPK(model.getClassPK());
57          soapModel.setParentGroupId(model.getParentGroupId());
58          soapModel.setLiveGroupId(model.getLiveGroupId());
59          soapModel.setName(model.getName());
60          soapModel.setDescription(model.getDescription());
61          soapModel.setType(model.getType());
62          soapModel.setTypeSettings(model.getTypeSettings());
63          soapModel.setFriendlyURL(model.getFriendlyURL());
64          soapModel.setActive(model.getActive());
65  
66          return soapModel;
67      }
68  
69      public static GroupSoap[] toSoapModels(Group[] models) {
70          GroupSoap[] soapModels = new GroupSoap[models.length];
71  
72          for (int i = 0; i < models.length; i++) {
73              soapModels[i] = toSoapModel(models[i]);
74          }
75  
76          return soapModels;
77      }
78  
79      public static GroupSoap[][] toSoapModels(Group[][] models) {
80          GroupSoap[][] soapModels = null;
81  
82          if (models.length > 0) {
83              soapModels = new GroupSoap[models.length][models[0].length];
84          }
85          else {
86              soapModels = new GroupSoap[0][0];
87          }
88  
89          for (int i = 0; i < models.length; i++) {
90              soapModels[i] = toSoapModels(models[i]);
91          }
92  
93          return soapModels;
94      }
95  
96      public static GroupSoap[] toSoapModels(List<Group> models) {
97          List<GroupSoap> soapModels = new ArrayList<GroupSoap>(models.size());
98  
99          for (Group model : models) {
100             soapModels.add(toSoapModel(model));
101         }
102 
103         return soapModels.toArray(new GroupSoap[soapModels.size()]);
104     }
105 
106     public GroupSoap() {
107     }
108 
109     public long getPrimaryKey() {
110         return _groupId;
111     }
112 
113     public void setPrimaryKey(long pk) {
114         setGroupId(pk);
115     }
116 
117     public long getGroupId() {
118         return _groupId;
119     }
120 
121     public void setGroupId(long groupId) {
122         _groupId = groupId;
123     }
124 
125     public long getCompanyId() {
126         return _companyId;
127     }
128 
129     public void setCompanyId(long companyId) {
130         _companyId = companyId;
131     }
132 
133     public long getCreatorUserId() {
134         return _creatorUserId;
135     }
136 
137     public void setCreatorUserId(long creatorUserId) {
138         _creatorUserId = creatorUserId;
139     }
140 
141     public long getClassNameId() {
142         return _classNameId;
143     }
144 
145     public void setClassNameId(long classNameId) {
146         _classNameId = classNameId;
147     }
148 
149     public long getClassPK() {
150         return _classPK;
151     }
152 
153     public void setClassPK(long classPK) {
154         _classPK = classPK;
155     }
156 
157     public long getParentGroupId() {
158         return _parentGroupId;
159     }
160 
161     public void setParentGroupId(long parentGroupId) {
162         _parentGroupId = parentGroupId;
163     }
164 
165     public long getLiveGroupId() {
166         return _liveGroupId;
167     }
168 
169     public void setLiveGroupId(long liveGroupId) {
170         _liveGroupId = liveGroupId;
171     }
172 
173     public String getName() {
174         return _name;
175     }
176 
177     public void setName(String name) {
178         _name = name;
179     }
180 
181     public String getDescription() {
182         return _description;
183     }
184 
185     public void setDescription(String description) {
186         _description = description;
187     }
188 
189     public int getType() {
190         return _type;
191     }
192 
193     public void setType(int type) {
194         _type = type;
195     }
196 
197     public String getTypeSettings() {
198         return _typeSettings;
199     }
200 
201     public void setTypeSettings(String typeSettings) {
202         _typeSettings = typeSettings;
203     }
204 
205     public String getFriendlyURL() {
206         return _friendlyURL;
207     }
208 
209     public void setFriendlyURL(String friendlyURL) {
210         _friendlyURL = friendlyURL;
211     }
212 
213     public boolean getActive() {
214         return _active;
215     }
216 
217     public boolean isActive() {
218         return _active;
219     }
220 
221     public void setActive(boolean active) {
222         _active = active;
223     }
224 
225     private long _groupId;
226     private long _companyId;
227     private long _creatorUserId;
228     private long _classNameId;
229     private long _classPK;
230     private long _parentGroupId;
231     private long _liveGroupId;
232     private String _name;
233     private String _description;
234     private int _type;
235     private String _typeSettings;
236     private String _friendlyURL;
237     private boolean _active;
238 }