1   /**
2    * Copyright (c) 2000-2009 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   * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
12   * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
13   * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
14   * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
15   * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
16   * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
17   * SOFTWARE.
18   */
19  
20  package com.liferay.portlet.social.model;
21  
22  import java.io.Serializable;
23  
24  import java.util.ArrayList;
25  import java.util.Date;
26  import java.util.List;
27  
28  /**
29   * <a href="SocialRelationSoap.java.html"><b><i>View Source</i></b></a>
30   *
31   * <p>
32   * ServiceBuilder generated this class. Modifications in this class will be
33   * overwritten the next time is generated.
34   * </p>
35   *
36   * <p>
37   * This class is used by
38   * <code>com.liferay.portlet.social.service.http.SocialRelationServiceSoap</code>.
39   * </p>
40   *
41   * @author Brian Wing Shun Chan
42   *
43   * @see com.liferay.portlet.social.service.http.SocialRelationServiceSoap
44   *
45   */
46  public class SocialRelationSoap implements Serializable {
47      public static SocialRelationSoap toSoapModel(SocialRelation model) {
48          SocialRelationSoap soapModel = new SocialRelationSoap();
49  
50          soapModel.setUuid(model.getUuid());
51          soapModel.setRelationId(model.getRelationId());
52          soapModel.setCompanyId(model.getCompanyId());
53          soapModel.setCreateDate(model.getCreateDate());
54          soapModel.setUserId1(model.getUserId1());
55          soapModel.setUserId2(model.getUserId2());
56          soapModel.setType(model.getType());
57  
58          return soapModel;
59      }
60  
61      public static SocialRelationSoap[] toSoapModels(List<SocialRelation> models) {
62          List<SocialRelationSoap> soapModels = new ArrayList<SocialRelationSoap>(models.size());
63  
64          for (SocialRelation model : models) {
65              soapModels.add(toSoapModel(model));
66          }
67  
68          return soapModels.toArray(new SocialRelationSoap[soapModels.size()]);
69      }
70  
71      public SocialRelationSoap() {
72      }
73  
74      public long getPrimaryKey() {
75          return _relationId;
76      }
77  
78      public void setPrimaryKey(long pk) {
79          setRelationId(pk);
80      }
81  
82      public String getUuid() {
83          return _uuid;
84      }
85  
86      public void setUuid(String uuid) {
87          _uuid = uuid;
88      }
89  
90      public long getRelationId() {
91          return _relationId;
92      }
93  
94      public void setRelationId(long relationId) {
95          _relationId = relationId;
96      }
97  
98      public long getCompanyId() {
99          return _companyId;
100     }
101 
102     public void setCompanyId(long companyId) {
103         _companyId = companyId;
104     }
105 
106     public Date getCreateDate() {
107         return _createDate;
108     }
109 
110     public void setCreateDate(Date createDate) {
111         _createDate = createDate;
112     }
113 
114     public long getUserId1() {
115         return _userId1;
116     }
117 
118     public void setUserId1(long userId1) {
119         _userId1 = userId1;
120     }
121 
122     public long getUserId2() {
123         return _userId2;
124     }
125 
126     public void setUserId2(long userId2) {
127         _userId2 = userId2;
128     }
129 
130     public int getType() {
131         return _type;
132     }
133 
134     public void setType(int type) {
135         _type = type;
136     }
137 
138     private String _uuid;
139     private long _relationId;
140     private long _companyId;
141     private Date _createDate;
142     private long _userId1;
143     private long _userId2;
144     private int _type;
145 }