001
014
015 package com.liferay.portlet.asset.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.Date;
023 import java.util.HashMap;
024 import java.util.Map;
025
026
035 @ProviderType
036 public class AssetLinkWrapper implements AssetLink, ModelWrapper<AssetLink> {
037 public AssetLinkWrapper(AssetLink assetLink) {
038 _assetLink = assetLink;
039 }
040
041 @Override
042 public Class<?> getModelClass() {
043 return AssetLink.class;
044 }
045
046 @Override
047 public String getModelClassName() {
048 return AssetLink.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("linkId", getLinkId());
056 attributes.put("companyId", getCompanyId());
057 attributes.put("userId", getUserId());
058 attributes.put("userName", getUserName());
059 attributes.put("createDate", getCreateDate());
060 attributes.put("entryId1", getEntryId1());
061 attributes.put("entryId2", getEntryId2());
062 attributes.put("type", getType());
063 attributes.put("weight", getWeight());
064
065 return attributes;
066 }
067
068 @Override
069 public void setModelAttributes(Map<String, Object> attributes) {
070 Long linkId = (Long)attributes.get("linkId");
071
072 if (linkId != null) {
073 setLinkId(linkId);
074 }
075
076 Long companyId = (Long)attributes.get("companyId");
077
078 if (companyId != null) {
079 setCompanyId(companyId);
080 }
081
082 Long userId = (Long)attributes.get("userId");
083
084 if (userId != null) {
085 setUserId(userId);
086 }
087
088 String userName = (String)attributes.get("userName");
089
090 if (userName != null) {
091 setUserName(userName);
092 }
093
094 Date createDate = (Date)attributes.get("createDate");
095
096 if (createDate != null) {
097 setCreateDate(createDate);
098 }
099
100 Long entryId1 = (Long)attributes.get("entryId1");
101
102 if (entryId1 != null) {
103 setEntryId1(entryId1);
104 }
105
106 Long entryId2 = (Long)attributes.get("entryId2");
107
108 if (entryId2 != null) {
109 setEntryId2(entryId2);
110 }
111
112 Integer type = (Integer)attributes.get("type");
113
114 if (type != null) {
115 setType(type);
116 }
117
118 Integer weight = (Integer)attributes.get("weight");
119
120 if (weight != null) {
121 setWeight(weight);
122 }
123 }
124
125
130 @Override
131 public long getPrimaryKey() {
132 return _assetLink.getPrimaryKey();
133 }
134
135
140 @Override
141 public void setPrimaryKey(long primaryKey) {
142 _assetLink.setPrimaryKey(primaryKey);
143 }
144
145
150 @Override
151 public long getLinkId() {
152 return _assetLink.getLinkId();
153 }
154
155
160 @Override
161 public void setLinkId(long linkId) {
162 _assetLink.setLinkId(linkId);
163 }
164
165
170 @Override
171 public long getCompanyId() {
172 return _assetLink.getCompanyId();
173 }
174
175
180 @Override
181 public void setCompanyId(long companyId) {
182 _assetLink.setCompanyId(companyId);
183 }
184
185
190 @Override
191 public long getUserId() {
192 return _assetLink.getUserId();
193 }
194
195
200 @Override
201 public void setUserId(long userId) {
202 _assetLink.setUserId(userId);
203 }
204
205
211 @Override
212 public java.lang.String getUserUuid()
213 throws com.liferay.portal.kernel.exception.SystemException {
214 return _assetLink.getUserUuid();
215 }
216
217
222 @Override
223 public void setUserUuid(java.lang.String userUuid) {
224 _assetLink.setUserUuid(userUuid);
225 }
226
227
232 @Override
233 public java.lang.String getUserName() {
234 return _assetLink.getUserName();
235 }
236
237
242 @Override
243 public void setUserName(java.lang.String userName) {
244 _assetLink.setUserName(userName);
245 }
246
247
252 @Override
253 public java.util.Date getCreateDate() {
254 return _assetLink.getCreateDate();
255 }
256
257
262 @Override
263 public void setCreateDate(java.util.Date createDate) {
264 _assetLink.setCreateDate(createDate);
265 }
266
267
272 @Override
273 public long getEntryId1() {
274 return _assetLink.getEntryId1();
275 }
276
277
282 @Override
283 public void setEntryId1(long entryId1) {
284 _assetLink.setEntryId1(entryId1);
285 }
286
287
292 @Override
293 public long getEntryId2() {
294 return _assetLink.getEntryId2();
295 }
296
297
302 @Override
303 public void setEntryId2(long entryId2) {
304 _assetLink.setEntryId2(entryId2);
305 }
306
307
312 @Override
313 public int getType() {
314 return _assetLink.getType();
315 }
316
317
322 @Override
323 public void setType(int type) {
324 _assetLink.setType(type);
325 }
326
327
332 @Override
333 public int getWeight() {
334 return _assetLink.getWeight();
335 }
336
337
342 @Override
343 public void setWeight(int weight) {
344 _assetLink.setWeight(weight);
345 }
346
347 @Override
348 public boolean isNew() {
349 return _assetLink.isNew();
350 }
351
352 @Override
353 public void setNew(boolean n) {
354 _assetLink.setNew(n);
355 }
356
357 @Override
358 public boolean isCachedModel() {
359 return _assetLink.isCachedModel();
360 }
361
362 @Override
363 public void setCachedModel(boolean cachedModel) {
364 _assetLink.setCachedModel(cachedModel);
365 }
366
367 @Override
368 public boolean isEscapedModel() {
369 return _assetLink.isEscapedModel();
370 }
371
372 @Override
373 public java.io.Serializable getPrimaryKeyObj() {
374 return _assetLink.getPrimaryKeyObj();
375 }
376
377 @Override
378 public void setPrimaryKeyObj(java.io.Serializable primaryKeyObj) {
379 _assetLink.setPrimaryKeyObj(primaryKeyObj);
380 }
381
382 @Override
383 public com.liferay.portlet.expando.model.ExpandoBridge getExpandoBridge() {
384 return _assetLink.getExpandoBridge();
385 }
386
387 @Override
388 public void setExpandoBridgeAttributes(
389 com.liferay.portal.model.BaseModel<?> baseModel) {
390 _assetLink.setExpandoBridgeAttributes(baseModel);
391 }
392
393 @Override
394 public void setExpandoBridgeAttributes(
395 com.liferay.portlet.expando.model.ExpandoBridge expandoBridge) {
396 _assetLink.setExpandoBridgeAttributes(expandoBridge);
397 }
398
399 @Override
400 public void setExpandoBridgeAttributes(
401 com.liferay.portal.service.ServiceContext serviceContext) {
402 _assetLink.setExpandoBridgeAttributes(serviceContext);
403 }
404
405 @Override
406 public java.lang.Object clone() {
407 return new AssetLinkWrapper((AssetLink)_assetLink.clone());
408 }
409
410 @Override
411 public int compareTo(com.liferay.portlet.asset.model.AssetLink assetLink) {
412 return _assetLink.compareTo(assetLink);
413 }
414
415 @Override
416 public int hashCode() {
417 return _assetLink.hashCode();
418 }
419
420 @Override
421 public com.liferay.portal.model.CacheModel<com.liferay.portlet.asset.model.AssetLink> toCacheModel() {
422 return _assetLink.toCacheModel();
423 }
424
425 @Override
426 public com.liferay.portlet.asset.model.AssetLink toEscapedModel() {
427 return new AssetLinkWrapper(_assetLink.toEscapedModel());
428 }
429
430 @Override
431 public com.liferay.portlet.asset.model.AssetLink toUnescapedModel() {
432 return new AssetLinkWrapper(_assetLink.toUnescapedModel());
433 }
434
435 @Override
436 public java.lang.String toString() {
437 return _assetLink.toString();
438 }
439
440 @Override
441 public java.lang.String toXmlString() {
442 return _assetLink.toXmlString();
443 }
444
445 @Override
446 public void persist()
447 throws com.liferay.portal.kernel.exception.SystemException {
448 _assetLink.persist();
449 }
450
451 @Override
452 public boolean equals(Object obj) {
453 if (this == obj) {
454 return true;
455 }
456
457 if (!(obj instanceof AssetLinkWrapper)) {
458 return false;
459 }
460
461 AssetLinkWrapper assetLinkWrapper = (AssetLinkWrapper)obj;
462
463 if (Validator.equals(_assetLink, assetLinkWrapper._assetLink)) {
464 return true;
465 }
466
467 return false;
468 }
469
470
473 public AssetLink getWrappedAssetLink() {
474 return _assetLink;
475 }
476
477 @Override
478 public AssetLink getWrappedModel() {
479 return _assetLink;
480 }
481
482 @Override
483 public void resetOriginalValues() {
484 _assetLink.resetOriginalValues();
485 }
486
487 private AssetLink _assetLink;
488 }