001
014
015 package com.liferay.portlet.social.model;
016
017 import java.io.Serializable;
018
019 import java.util.ArrayList;
020 import java.util.List;
021
022
028 public class SocialRelationSoap implements Serializable {
029 public static SocialRelationSoap toSoapModel(SocialRelation model) {
030 SocialRelationSoap soapModel = new SocialRelationSoap();
031
032 soapModel.setUuid(model.getUuid());
033 soapModel.setRelationId(model.getRelationId());
034 soapModel.setCompanyId(model.getCompanyId());
035 soapModel.setCreateDate(model.getCreateDate());
036 soapModel.setUserId1(model.getUserId1());
037 soapModel.setUserId2(model.getUserId2());
038 soapModel.setType(model.getType());
039
040 return soapModel;
041 }
042
043 public static SocialRelationSoap[] toSoapModels(SocialRelation[] models) {
044 SocialRelationSoap[] soapModels = new SocialRelationSoap[models.length];
045
046 for (int i = 0; i < models.length; i++) {
047 soapModels[i] = toSoapModel(models[i]);
048 }
049
050 return soapModels;
051 }
052
053 public static SocialRelationSoap[][] toSoapModels(SocialRelation[][] models) {
054 SocialRelationSoap[][] soapModels = null;
055
056 if (models.length > 0) {
057 soapModels = new SocialRelationSoap[models.length][models[0].length];
058 }
059 else {
060 soapModels = new SocialRelationSoap[0][0];
061 }
062
063 for (int i = 0; i < models.length; i++) {
064 soapModels[i] = toSoapModels(models[i]);
065 }
066
067 return soapModels;
068 }
069
070 public static SocialRelationSoap[] toSoapModels(List<SocialRelation> models) {
071 List<SocialRelationSoap> soapModels = new ArrayList<SocialRelationSoap>(models.size());
072
073 for (SocialRelation model : models) {
074 soapModels.add(toSoapModel(model));
075 }
076
077 return soapModels.toArray(new SocialRelationSoap[soapModels.size()]);
078 }
079
080 public SocialRelationSoap() {
081 }
082
083 public long getPrimaryKey() {
084 return _relationId;
085 }
086
087 public void setPrimaryKey(long pk) {
088 setRelationId(pk);
089 }
090
091 public String getUuid() {
092 return _uuid;
093 }
094
095 public void setUuid(String uuid) {
096 _uuid = uuid;
097 }
098
099 public long getRelationId() {
100 return _relationId;
101 }
102
103 public void setRelationId(long relationId) {
104 _relationId = relationId;
105 }
106
107 public long getCompanyId() {
108 return _companyId;
109 }
110
111 public void setCompanyId(long companyId) {
112 _companyId = companyId;
113 }
114
115 public long getCreateDate() {
116 return _createDate;
117 }
118
119 public void setCreateDate(long createDate) {
120 _createDate = createDate;
121 }
122
123 public long getUserId1() {
124 return _userId1;
125 }
126
127 public void setUserId1(long userId1) {
128 _userId1 = userId1;
129 }
130
131 public long getUserId2() {
132 return _userId2;
133 }
134
135 public void setUserId2(long userId2) {
136 _userId2 = userId2;
137 }
138
139 public int getType() {
140 return _type;
141 }
142
143 public void setType(int type) {
144 _type = type;
145 }
146
147 private String _uuid;
148 private long _relationId;
149 private long _companyId;
150 private long _createDate;
151 private long _userId1;
152 private long _userId2;
153 private int _type;
154 }