001
014
015 package com.liferay.portlet.social.model;
016
017 import com.liferay.portal.kernel.util.Validator;
018 import com.liferay.portal.model.ModelWrapper;
019
020 import java.util.HashMap;
021 import java.util.Map;
022
023
032 public class SocialRelationWrapper implements SocialRelation,
033 ModelWrapper<SocialRelation> {
034 public SocialRelationWrapper(SocialRelation socialRelation) {
035 _socialRelation = socialRelation;
036 }
037
038 public Class<?> getModelClass() {
039 return SocialRelation.class;
040 }
041
042 public String getModelClassName() {
043 return SocialRelation.class.getName();
044 }
045
046 public Map<String, Object> getModelAttributes() {
047 Map<String, Object> attributes = new HashMap<String, Object>();
048
049 attributes.put("uuid", getUuid());
050 attributes.put("relationId", getRelationId());
051 attributes.put("companyId", getCompanyId());
052 attributes.put("createDate", getCreateDate());
053 attributes.put("userId1", getUserId1());
054 attributes.put("userId2", getUserId2());
055 attributes.put("type", getType());
056
057 return attributes;
058 }
059
060 public void setModelAttributes(Map<String, Object> attributes) {
061 String uuid = (String)attributes.get("uuid");
062
063 if (uuid != null) {
064 setUuid(uuid);
065 }
066
067 Long relationId = (Long)attributes.get("relationId");
068
069 if (relationId != null) {
070 setRelationId(relationId);
071 }
072
073 Long companyId = (Long)attributes.get("companyId");
074
075 if (companyId != null) {
076 setCompanyId(companyId);
077 }
078
079 Long createDate = (Long)attributes.get("createDate");
080
081 if (createDate != null) {
082 setCreateDate(createDate);
083 }
084
085 Long userId1 = (Long)attributes.get("userId1");
086
087 if (userId1 != null) {
088 setUserId1(userId1);
089 }
090
091 Long userId2 = (Long)attributes.get("userId2");
092
093 if (userId2 != null) {
094 setUserId2(userId2);
095 }
096
097 Integer type = (Integer)attributes.get("type");
098
099 if (type != null) {
100 setType(type);
101 }
102 }
103
104
109 public long getPrimaryKey() {
110 return _socialRelation.getPrimaryKey();
111 }
112
113
118 public void setPrimaryKey(long primaryKey) {
119 _socialRelation.setPrimaryKey(primaryKey);
120 }
121
122
127 public java.lang.String getUuid() {
128 return _socialRelation.getUuid();
129 }
130
131
136 public void setUuid(java.lang.String uuid) {
137 _socialRelation.setUuid(uuid);
138 }
139
140
145 public long getRelationId() {
146 return _socialRelation.getRelationId();
147 }
148
149
154 public void setRelationId(long relationId) {
155 _socialRelation.setRelationId(relationId);
156 }
157
158
163 public long getCompanyId() {
164 return _socialRelation.getCompanyId();
165 }
166
167
172 public void setCompanyId(long companyId) {
173 _socialRelation.setCompanyId(companyId);
174 }
175
176
181 public long getCreateDate() {
182 return _socialRelation.getCreateDate();
183 }
184
185
190 public void setCreateDate(long createDate) {
191 _socialRelation.setCreateDate(createDate);
192 }
193
194
199 public long getUserId1() {
200 return _socialRelation.getUserId1();
201 }
202
203
208 public void setUserId1(long userId1) {
209 _socialRelation.setUserId1(userId1);
210 }
211
212
217 public long getUserId2() {
218 return _socialRelation.getUserId2();
219 }
220
221
226 public void setUserId2(long userId2) {
227 _socialRelation.setUserId2(userId2);
228 }
229
230
235 public int getType() {
236 return _socialRelation.getType();
237 }
238
239
244 public void setType(int type) {
245 _socialRelation.setType(type);
246 }
247
248 public boolean isNew() {
249 return _socialRelation.isNew();
250 }
251
252 public void setNew(boolean n) {
253 _socialRelation.setNew(n);
254 }
255
256 public boolean isCachedModel() {
257 return _socialRelation.isCachedModel();
258 }
259
260 public void setCachedModel(boolean cachedModel) {
261 _socialRelation.setCachedModel(cachedModel);
262 }
263
264 public boolean isEscapedModel() {
265 return _socialRelation.isEscapedModel();
266 }
267
268 public java.io.Serializable getPrimaryKeyObj() {
269 return _socialRelation.getPrimaryKeyObj();
270 }
271
272 public void setPrimaryKeyObj(java.io.Serializable primaryKeyObj) {
273 _socialRelation.setPrimaryKeyObj(primaryKeyObj);
274 }
275
276 public com.liferay.portlet.expando.model.ExpandoBridge getExpandoBridge() {
277 return _socialRelation.getExpandoBridge();
278 }
279
280 public void setExpandoBridgeAttributes(
281 com.liferay.portal.service.ServiceContext serviceContext) {
282 _socialRelation.setExpandoBridgeAttributes(serviceContext);
283 }
284
285 @Override
286 public java.lang.Object clone() {
287 return new SocialRelationWrapper((SocialRelation)_socialRelation.clone());
288 }
289
290 public int compareTo(
291 com.liferay.portlet.social.model.SocialRelation socialRelation) {
292 return _socialRelation.compareTo(socialRelation);
293 }
294
295 @Override
296 public int hashCode() {
297 return _socialRelation.hashCode();
298 }
299
300 public com.liferay.portal.model.CacheModel<com.liferay.portlet.social.model.SocialRelation> toCacheModel() {
301 return _socialRelation.toCacheModel();
302 }
303
304 public com.liferay.portlet.social.model.SocialRelation toEscapedModel() {
305 return new SocialRelationWrapper(_socialRelation.toEscapedModel());
306 }
307
308 public com.liferay.portlet.social.model.SocialRelation toUnescapedModel() {
309 return new SocialRelationWrapper(_socialRelation.toUnescapedModel());
310 }
311
312 @Override
313 public java.lang.String toString() {
314 return _socialRelation.toString();
315 }
316
317 public java.lang.String toXmlString() {
318 return _socialRelation.toXmlString();
319 }
320
321 public void persist()
322 throws com.liferay.portal.kernel.exception.SystemException {
323 _socialRelation.persist();
324 }
325
326 @Override
327 public boolean equals(Object obj) {
328 if (this == obj) {
329 return true;
330 }
331
332 if (!(obj instanceof SocialRelationWrapper)) {
333 return false;
334 }
335
336 SocialRelationWrapper socialRelationWrapper = (SocialRelationWrapper)obj;
337
338 if (Validator.equals(_socialRelation,
339 socialRelationWrapper._socialRelation)) {
340 return true;
341 }
342
343 return false;
344 }
345
346
349 public SocialRelation getWrappedSocialRelation() {
350 return _socialRelation;
351 }
352
353 public SocialRelation getWrappedModel() {
354 return _socialRelation;
355 }
356
357 public void resetOriginalValues() {
358 _socialRelation.resetOriginalValues();
359 }
360
361 private SocialRelation _socialRelation;
362 }