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.portlet.social.model;
16  
17  import java.io.Serializable;
18  
19  import java.util.ArrayList;
20  import java.util.List;
21  
22  /**
23   * <a href="SocialRelationSoap.java.html"><b><i>View Source</i></b></a>
24   *
25   * <p>
26   * ServiceBuilder generated this class. Modifications in this class will be
27   * overwritten the next time is generated.
28   * </p>
29   *
30   * <p>
31   * This class is used by
32   * {@link com.liferay.portlet.social.service.http.SocialRelationServiceSoap}.
33   * </p>
34   *
35   * @author    Brian Wing Shun Chan
36   * @see       com.liferay.portlet.social.service.http.SocialRelationServiceSoap
37   * @generated
38   */
39  public class SocialRelationSoap implements Serializable {
40      public static SocialRelationSoap toSoapModel(SocialRelation model) {
41          SocialRelationSoap soapModel = new SocialRelationSoap();
42  
43          soapModel.setUuid(model.getUuid());
44          soapModel.setRelationId(model.getRelationId());
45          soapModel.setCompanyId(model.getCompanyId());
46          soapModel.setCreateDate(model.getCreateDate());
47          soapModel.setUserId1(model.getUserId1());
48          soapModel.setUserId2(model.getUserId2());
49          soapModel.setType(model.getType());
50  
51          return soapModel;
52      }
53  
54      public static SocialRelationSoap[] toSoapModels(SocialRelation[] models) {
55          SocialRelationSoap[] soapModels = new SocialRelationSoap[models.length];
56  
57          for (int i = 0; i < models.length; i++) {
58              soapModels[i] = toSoapModel(models[i]);
59          }
60  
61          return soapModels;
62      }
63  
64      public static SocialRelationSoap[][] toSoapModels(SocialRelation[][] models) {
65          SocialRelationSoap[][] soapModels = null;
66  
67          if (models.length > 0) {
68              soapModels = new SocialRelationSoap[models.length][models[0].length];
69          }
70          else {
71              soapModels = new SocialRelationSoap[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 SocialRelationSoap[] toSoapModels(List<SocialRelation> models) {
82          List<SocialRelationSoap> soapModels = new ArrayList<SocialRelationSoap>(models.size());
83  
84          for (SocialRelation model : models) {
85              soapModels.add(toSoapModel(model));
86          }
87  
88          return soapModels.toArray(new SocialRelationSoap[soapModels.size()]);
89      }
90  
91      public SocialRelationSoap() {
92      }
93  
94      public long getPrimaryKey() {
95          return _relationId;
96      }
97  
98      public void setPrimaryKey(long pk) {
99          setRelationId(pk);
100     }
101 
102     public String getUuid() {
103         return _uuid;
104     }
105 
106     public void setUuid(String uuid) {
107         _uuid = uuid;
108     }
109 
110     public long getRelationId() {
111         return _relationId;
112     }
113 
114     public void setRelationId(long relationId) {
115         _relationId = relationId;
116     }
117 
118     public long getCompanyId() {
119         return _companyId;
120     }
121 
122     public void setCompanyId(long companyId) {
123         _companyId = companyId;
124     }
125 
126     public long getCreateDate() {
127         return _createDate;
128     }
129 
130     public void setCreateDate(long createDate) {
131         _createDate = createDate;
132     }
133 
134     public long getUserId1() {
135         return _userId1;
136     }
137 
138     public void setUserId1(long userId1) {
139         _userId1 = userId1;
140     }
141 
142     public long getUserId2() {
143         return _userId2;
144     }
145 
146     public void setUserId2(long userId2) {
147         _userId2 = userId2;
148     }
149 
150     public int getType() {
151         return _type;
152     }
153 
154     public void setType(int type) {
155         _type = type;
156     }
157 
158     private String _uuid;
159     private long _relationId;
160     private long _companyId;
161     private long _createDate;
162     private long _userId1;
163     private long _userId2;
164     private int _type;
165 }