1   /**
2    * Copyright (c) 2000-2009 Liferay, Inc. All rights reserved.
3    *
4    *
5    *
6    *
7    * The contents of this file are subject to the terms of the Liferay Enterprise
8    * Subscription License ("License"). You may not use this file except in
9    * compliance with the License. You can obtain a copy of the License by
10   * contacting Liferay, Inc. See the License for the specific language governing
11   * permissions and limitations under the License, including but not limited to
12   * distribution rights 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="SocialRelationSoap.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   * {@link com.liferay.portlet.social.service.http.SocialRelationServiceSoap}.
41   * </p>
42   *
43   * @author    Brian Wing Shun Chan
44   * @see       com.liferay.portlet.social.service.http.SocialRelationServiceSoap
45   * @generated
46   */
47  public class SocialRelationSoap implements Serializable {
48      public static SocialRelationSoap toSoapModel(SocialRelation model) {
49          SocialRelationSoap soapModel = new SocialRelationSoap();
50  
51          soapModel.setUuid(model.getUuid());
52          soapModel.setRelationId(model.getRelationId());
53          soapModel.setCompanyId(model.getCompanyId());
54          soapModel.setCreateDate(model.getCreateDate());
55          soapModel.setUserId1(model.getUserId1());
56          soapModel.setUserId2(model.getUserId2());
57          soapModel.setType(model.getType());
58  
59          return soapModel;
60      }
61  
62      public static SocialRelationSoap[] toSoapModels(SocialRelation[] models) {
63          SocialRelationSoap[] soapModels = new SocialRelationSoap[models.length];
64  
65          for (int i = 0; i < models.length; i++) {
66              soapModels[i] = toSoapModel(models[i]);
67          }
68  
69          return soapModels;
70      }
71  
72      public static SocialRelationSoap[][] toSoapModels(SocialRelation[][] models) {
73          SocialRelationSoap[][] soapModels = null;
74  
75          if (models.length > 0) {
76              soapModels = new SocialRelationSoap[models.length][models[0].length];
77          }
78          else {
79              soapModels = new SocialRelationSoap[0][0];
80          }
81  
82          for (int i = 0; i < models.length; i++) {
83              soapModels[i] = toSoapModels(models[i]);
84          }
85  
86          return soapModels;
87      }
88  
89      public static SocialRelationSoap[] toSoapModels(List<SocialRelation> models) {
90          List<SocialRelationSoap> soapModels = new ArrayList<SocialRelationSoap>(models.size());
91  
92          for (SocialRelation model : models) {
93              soapModels.add(toSoapModel(model));
94          }
95  
96          return soapModels.toArray(new SocialRelationSoap[soapModels.size()]);
97      }
98  
99      public SocialRelationSoap() {
100     }
101 
102     public long getPrimaryKey() {
103         return _relationId;
104     }
105 
106     public void setPrimaryKey(long pk) {
107         setRelationId(pk);
108     }
109 
110     public String getUuid() {
111         return _uuid;
112     }
113 
114     public void setUuid(String uuid) {
115         _uuid = uuid;
116     }
117 
118     public long getRelationId() {
119         return _relationId;
120     }
121 
122     public void setRelationId(long relationId) {
123         _relationId = relationId;
124     }
125 
126     public long getCompanyId() {
127         return _companyId;
128     }
129 
130     public void setCompanyId(long companyId) {
131         _companyId = companyId;
132     }
133 
134     public long getCreateDate() {
135         return _createDate;
136     }
137 
138     public void setCreateDate(long createDate) {
139         _createDate = createDate;
140     }
141 
142     public long getUserId1() {
143         return _userId1;
144     }
145 
146     public void setUserId1(long userId1) {
147         _userId1 = userId1;
148     }
149 
150     public long getUserId2() {
151         return _userId2;
152     }
153 
154     public void setUserId2(long userId2) {
155         _userId2 = userId2;
156     }
157 
158     public int getType() {
159         return _type;
160     }
161 
162     public void setType(int type) {
163         _type = type;
164     }
165 
166     private String _uuid;
167     private long _relationId;
168     private long _companyId;
169     private long _createDate;
170     private long _userId1;
171     private long _userId2;
172     private int _type;
173 }