001
014
015 package com.liferay.portlet.social.model;
016
017 import aQute.bnd.annotation.ProviderType;
018
019 import com.liferay.portal.kernel.util.Validator;
020 import com.liferay.portal.model.ModelWrapper;
021
022 import java.util.HashMap;
023 import java.util.Map;
024
025
034 @ProviderType
035 public class SocialRelationWrapper implements SocialRelation,
036 ModelWrapper<SocialRelation> {
037 public SocialRelationWrapper(SocialRelation socialRelation) {
038 _socialRelation = socialRelation;
039 }
040
041 @Override
042 public Class<?> getModelClass() {
043 return SocialRelation.class;
044 }
045
046 @Override
047 public String getModelClassName() {
048 return SocialRelation.class.getName();
049 }
050
051 @Override
052 public Map<String, Object> getModelAttributes() {
053 Map<String, Object> attributes = new HashMap<String, Object>();
054
055 attributes.put("uuid", getUuid());
056 attributes.put("relationId", getRelationId());
057 attributes.put("companyId", getCompanyId());
058 attributes.put("createDate", getCreateDate());
059 attributes.put("userId1", getUserId1());
060 attributes.put("userId2", getUserId2());
061 attributes.put("type", getType());
062
063 return attributes;
064 }
065
066 @Override
067 public void setModelAttributes(Map<String, Object> attributes) {
068 String uuid = (String)attributes.get("uuid");
069
070 if (uuid != null) {
071 setUuid(uuid);
072 }
073
074 Long relationId = (Long)attributes.get("relationId");
075
076 if (relationId != null) {
077 setRelationId(relationId);
078 }
079
080 Long companyId = (Long)attributes.get("companyId");
081
082 if (companyId != null) {
083 setCompanyId(companyId);
084 }
085
086 Long createDate = (Long)attributes.get("createDate");
087
088 if (createDate != null) {
089 setCreateDate(createDate);
090 }
091
092 Long userId1 = (Long)attributes.get("userId1");
093
094 if (userId1 != null) {
095 setUserId1(userId1);
096 }
097
098 Long userId2 = (Long)attributes.get("userId2");
099
100 if (userId2 != null) {
101 setUserId2(userId2);
102 }
103
104 Integer type = (Integer)attributes.get("type");
105
106 if (type != null) {
107 setType(type);
108 }
109 }
110
111
116 @Override
117 public long getPrimaryKey() {
118 return _socialRelation.getPrimaryKey();
119 }
120
121
126 @Override
127 public void setPrimaryKey(long primaryKey) {
128 _socialRelation.setPrimaryKey(primaryKey);
129 }
130
131
136 @Override
137 public java.lang.String getUuid() {
138 return _socialRelation.getUuid();
139 }
140
141
146 @Override
147 public void setUuid(java.lang.String uuid) {
148 _socialRelation.setUuid(uuid);
149 }
150
151
156 @Override
157 public long getRelationId() {
158 return _socialRelation.getRelationId();
159 }
160
161
166 @Override
167 public void setRelationId(long relationId) {
168 _socialRelation.setRelationId(relationId);
169 }
170
171
176 @Override
177 public long getCompanyId() {
178 return _socialRelation.getCompanyId();
179 }
180
181
186 @Override
187 public void setCompanyId(long companyId) {
188 _socialRelation.setCompanyId(companyId);
189 }
190
191
196 @Override
197 public long getCreateDate() {
198 return _socialRelation.getCreateDate();
199 }
200
201
206 @Override
207 public void setCreateDate(long createDate) {
208 _socialRelation.setCreateDate(createDate);
209 }
210
211
216 @Override
217 public long getUserId1() {
218 return _socialRelation.getUserId1();
219 }
220
221
226 @Override
227 public void setUserId1(long userId1) {
228 _socialRelation.setUserId1(userId1);
229 }
230
231
236 @Override
237 public long getUserId2() {
238 return _socialRelation.getUserId2();
239 }
240
241
246 @Override
247 public void setUserId2(long userId2) {
248 _socialRelation.setUserId2(userId2);
249 }
250
251
256 @Override
257 public int getType() {
258 return _socialRelation.getType();
259 }
260
261
266 @Override
267 public void setType(int type) {
268 _socialRelation.setType(type);
269 }
270
271 @Override
272 public boolean isNew() {
273 return _socialRelation.isNew();
274 }
275
276 @Override
277 public void setNew(boolean n) {
278 _socialRelation.setNew(n);
279 }
280
281 @Override
282 public boolean isCachedModel() {
283 return _socialRelation.isCachedModel();
284 }
285
286 @Override
287 public void setCachedModel(boolean cachedModel) {
288 _socialRelation.setCachedModel(cachedModel);
289 }
290
291 @Override
292 public boolean isEscapedModel() {
293 return _socialRelation.isEscapedModel();
294 }
295
296 @Override
297 public java.io.Serializable getPrimaryKeyObj() {
298 return _socialRelation.getPrimaryKeyObj();
299 }
300
301 @Override
302 public void setPrimaryKeyObj(java.io.Serializable primaryKeyObj) {
303 _socialRelation.setPrimaryKeyObj(primaryKeyObj);
304 }
305
306 @Override
307 public com.liferay.portlet.expando.model.ExpandoBridge getExpandoBridge() {
308 return _socialRelation.getExpandoBridge();
309 }
310
311 @Override
312 public void setExpandoBridgeAttributes(
313 com.liferay.portal.model.BaseModel<?> baseModel) {
314 _socialRelation.setExpandoBridgeAttributes(baseModel);
315 }
316
317 @Override
318 public void setExpandoBridgeAttributes(
319 com.liferay.portlet.expando.model.ExpandoBridge expandoBridge) {
320 _socialRelation.setExpandoBridgeAttributes(expandoBridge);
321 }
322
323 @Override
324 public void setExpandoBridgeAttributes(
325 com.liferay.portal.service.ServiceContext serviceContext) {
326 _socialRelation.setExpandoBridgeAttributes(serviceContext);
327 }
328
329 @Override
330 public java.lang.Object clone() {
331 return new SocialRelationWrapper((SocialRelation)_socialRelation.clone());
332 }
333
334 @Override
335 public int compareTo(
336 com.liferay.portlet.social.model.SocialRelation socialRelation) {
337 return _socialRelation.compareTo(socialRelation);
338 }
339
340 @Override
341 public int hashCode() {
342 return _socialRelation.hashCode();
343 }
344
345 @Override
346 public com.liferay.portal.model.CacheModel<com.liferay.portlet.social.model.SocialRelation> toCacheModel() {
347 return _socialRelation.toCacheModel();
348 }
349
350 @Override
351 public com.liferay.portlet.social.model.SocialRelation toEscapedModel() {
352 return new SocialRelationWrapper(_socialRelation.toEscapedModel());
353 }
354
355 @Override
356 public com.liferay.portlet.social.model.SocialRelation toUnescapedModel() {
357 return new SocialRelationWrapper(_socialRelation.toUnescapedModel());
358 }
359
360 @Override
361 public java.lang.String toString() {
362 return _socialRelation.toString();
363 }
364
365 @Override
366 public java.lang.String toXmlString() {
367 return _socialRelation.toXmlString();
368 }
369
370 @Override
371 public void persist()
372 throws com.liferay.portal.kernel.exception.SystemException {
373 _socialRelation.persist();
374 }
375
376 @Override
377 public boolean equals(Object obj) {
378 if (this == obj) {
379 return true;
380 }
381
382 if (!(obj instanceof SocialRelationWrapper)) {
383 return false;
384 }
385
386 SocialRelationWrapper socialRelationWrapper = (SocialRelationWrapper)obj;
387
388 if (Validator.equals(_socialRelation,
389 socialRelationWrapper._socialRelation)) {
390 return true;
391 }
392
393 return false;
394 }
395
396
399 public SocialRelation getWrappedSocialRelation() {
400 return _socialRelation;
401 }
402
403 @Override
404 public SocialRelation getWrappedModel() {
405 return _socialRelation;
406 }
407
408 @Override
409 public void resetOriginalValues() {
410 _socialRelation.resetOriginalValues();
411 }
412
413 private SocialRelation _socialRelation;
414 }