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