001    /**
002     * Copyright (c) 2000-present Liferay, Inc. All rights reserved.
003     *
004     * This library is free software; you can redistribute it and/or modify it under
005     * the terms of the GNU Lesser General Public License as published by the Free
006     * Software Foundation; either version 2.1 of the License, or (at your option)
007     * any later version.
008     *
009     * This library is distributed in the hope that it will be useful, but WITHOUT
010     * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
011     * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
012     * details.
013     */
014    
015    package com.liferay.portlet.social.model;
016    
017    import aQute.bnd.annotation.ProviderType;
018    
019    import java.io.Serializable;
020    
021    import java.util.ArrayList;
022    import java.util.List;
023    
024    /**
025     * This class is used by SOAP remote services.
026     *
027     * @author Brian Wing Shun Chan
028     * @generated
029     */
030    @ProviderType
031    public class SocialRelationSoap implements Serializable {
032            public static SocialRelationSoap toSoapModel(SocialRelation model) {
033                    SocialRelationSoap soapModel = new SocialRelationSoap();
034    
035                    soapModel.setUuid(model.getUuid());
036                    soapModel.setRelationId(model.getRelationId());
037                    soapModel.setCompanyId(model.getCompanyId());
038                    soapModel.setCreateDate(model.getCreateDate());
039                    soapModel.setUserId1(model.getUserId1());
040                    soapModel.setUserId2(model.getUserId2());
041                    soapModel.setType(model.getType());
042    
043                    return soapModel;
044            }
045    
046            public static SocialRelationSoap[] toSoapModels(SocialRelation[] models) {
047                    SocialRelationSoap[] soapModels = new SocialRelationSoap[models.length];
048    
049                    for (int i = 0; i < models.length; i++) {
050                            soapModels[i] = toSoapModel(models[i]);
051                    }
052    
053                    return soapModels;
054            }
055    
056            public static SocialRelationSoap[][] toSoapModels(SocialRelation[][] models) {
057                    SocialRelationSoap[][] soapModels = null;
058    
059                    if (models.length > 0) {
060                            soapModels = new SocialRelationSoap[models.length][models[0].length];
061                    }
062                    else {
063                            soapModels = new SocialRelationSoap[0][0];
064                    }
065    
066                    for (int i = 0; i < models.length; i++) {
067                            soapModels[i] = toSoapModels(models[i]);
068                    }
069    
070                    return soapModels;
071            }
072    
073            public static SocialRelationSoap[] toSoapModels(List<SocialRelation> models) {
074                    List<SocialRelationSoap> soapModels = new ArrayList<SocialRelationSoap>(models.size());
075    
076                    for (SocialRelation model : models) {
077                            soapModels.add(toSoapModel(model));
078                    }
079    
080                    return soapModels.toArray(new SocialRelationSoap[soapModels.size()]);
081            }
082    
083            public SocialRelationSoap() {
084            }
085    
086            public long getPrimaryKey() {
087                    return _relationId;
088            }
089    
090            public void setPrimaryKey(long pk) {
091                    setRelationId(pk);
092            }
093    
094            public String getUuid() {
095                    return _uuid;
096            }
097    
098            public void setUuid(String uuid) {
099                    _uuid = uuid;
100            }
101    
102            public long getRelationId() {
103                    return _relationId;
104            }
105    
106            public void setRelationId(long relationId) {
107                    _relationId = relationId;
108            }
109    
110            public long getCompanyId() {
111                    return _companyId;
112            }
113    
114            public void setCompanyId(long companyId) {
115                    _companyId = companyId;
116            }
117    
118            public long getCreateDate() {
119                    return _createDate;
120            }
121    
122            public void setCreateDate(long createDate) {
123                    _createDate = createDate;
124            }
125    
126            public long getUserId1() {
127                    return _userId1;
128            }
129    
130            public void setUserId1(long userId1) {
131                    _userId1 = userId1;
132            }
133    
134            public long getUserId2() {
135                    return _userId2;
136            }
137    
138            public void setUserId2(long userId2) {
139                    _userId2 = userId2;
140            }
141    
142            public int getType() {
143                    return _type;
144            }
145    
146            public void setType(int type) {
147                    _type = type;
148            }
149    
150            private String _uuid;
151            private long _relationId;
152            private long _companyId;
153            private long _createDate;
154            private long _userId1;
155            private long _userId2;
156            private int _type;
157    }