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.portlet.social.model;
24  
25  import java.io.Serializable;
26  
27  import java.util.ArrayList;
28  import java.util.List;
29  
30  /**
31   * <a href="SocialActivitySoap.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.portlet.social.service.http.SocialActivityServiceSoap</code>.
41   * </p>
42   *
43   * @author Brian Wing Shun Chan
44   *
45   * @see com.liferay.portlet.social.service.http.SocialActivityServiceSoap
46   *
47   */
48  public class SocialActivitySoap implements Serializable {
49      public static SocialActivitySoap toSoapModel(SocialActivity model) {
50          SocialActivitySoap soapModel = new SocialActivitySoap();
51  
52          soapModel.setActivityId(model.getActivityId());
53          soapModel.setGroupId(model.getGroupId());
54          soapModel.setCompanyId(model.getCompanyId());
55          soapModel.setUserId(model.getUserId());
56          soapModel.setCreateDate(model.getCreateDate());
57          soapModel.setMirrorActivityId(model.getMirrorActivityId());
58          soapModel.setClassNameId(model.getClassNameId());
59          soapModel.setClassPK(model.getClassPK());
60          soapModel.setType(model.getType());
61          soapModel.setExtraData(model.getExtraData());
62          soapModel.setReceiverUserId(model.getReceiverUserId());
63  
64          return soapModel;
65      }
66  
67      public static SocialActivitySoap[] toSoapModels(SocialActivity[] models) {
68          SocialActivitySoap[] soapModels = new SocialActivitySoap[models.length];
69  
70          for (int i = 0; i < models.length; i++) {
71              soapModels[i] = toSoapModel(models[i]);
72          }
73  
74          return soapModels;
75      }
76  
77      public static SocialActivitySoap[][] toSoapModels(SocialActivity[][] models) {
78          SocialActivitySoap[][] soapModels = null;
79  
80          if (models.length > 0) {
81              soapModels = new SocialActivitySoap[models.length][models[0].length];
82          }
83          else {
84              soapModels = new SocialActivitySoap[0][0];
85          }
86  
87          for (int i = 0; i < models.length; i++) {
88              soapModels[i] = toSoapModels(models[i]);
89          }
90  
91          return soapModels;
92      }
93  
94      public static SocialActivitySoap[] toSoapModels(List<SocialActivity> models) {
95          List<SocialActivitySoap> soapModels = new ArrayList<SocialActivitySoap>(models.size());
96  
97          for (SocialActivity model : models) {
98              soapModels.add(toSoapModel(model));
99          }
100 
101         return soapModels.toArray(new SocialActivitySoap[soapModels.size()]);
102     }
103 
104     public SocialActivitySoap() {
105     }
106 
107     public long getPrimaryKey() {
108         return _activityId;
109     }
110 
111     public void setPrimaryKey(long pk) {
112         setActivityId(pk);
113     }
114 
115     public long getActivityId() {
116         return _activityId;
117     }
118 
119     public void setActivityId(long activityId) {
120         _activityId = activityId;
121     }
122 
123     public long getGroupId() {
124         return _groupId;
125     }
126 
127     public void setGroupId(long groupId) {
128         _groupId = groupId;
129     }
130 
131     public long getCompanyId() {
132         return _companyId;
133     }
134 
135     public void setCompanyId(long companyId) {
136         _companyId = companyId;
137     }
138 
139     public long getUserId() {
140         return _userId;
141     }
142 
143     public void setUserId(long userId) {
144         _userId = userId;
145     }
146 
147     public long getCreateDate() {
148         return _createDate;
149     }
150 
151     public void setCreateDate(long createDate) {
152         _createDate = createDate;
153     }
154 
155     public long getMirrorActivityId() {
156         return _mirrorActivityId;
157     }
158 
159     public void setMirrorActivityId(long mirrorActivityId) {
160         _mirrorActivityId = mirrorActivityId;
161     }
162 
163     public long getClassNameId() {
164         return _classNameId;
165     }
166 
167     public void setClassNameId(long classNameId) {
168         _classNameId = classNameId;
169     }
170 
171     public long getClassPK() {
172         return _classPK;
173     }
174 
175     public void setClassPK(long classPK) {
176         _classPK = classPK;
177     }
178 
179     public int getType() {
180         return _type;
181     }
182 
183     public void setType(int type) {
184         _type = type;
185     }
186 
187     public String getExtraData() {
188         return _extraData;
189     }
190 
191     public void setExtraData(String extraData) {
192         _extraData = extraData;
193     }
194 
195     public long getReceiverUserId() {
196         return _receiverUserId;
197     }
198 
199     public void setReceiverUserId(long receiverUserId) {
200         _receiverUserId = receiverUserId;
201     }
202 
203     private long _activityId;
204     private long _groupId;
205     private long _companyId;
206     private long _userId;
207     private long _createDate;
208     private long _mirrorActivityId;
209     private long _classNameId;
210     private long _classPK;
211     private int _type;
212     private String _extraData;
213     private long _receiverUserId;
214 }