001
014
015 package com.liferay.portlet.asset.model;
016
017 import com.liferay.portal.kernel.util.Validator;
018 import com.liferay.portal.model.ModelWrapper;
019
020 import java.util.Date;
021 import java.util.HashMap;
022 import java.util.Map;
023
024
033 public class AssetLinkWrapper implements AssetLink, ModelWrapper<AssetLink> {
034 public AssetLinkWrapper(AssetLink assetLink) {
035 _assetLink = assetLink;
036 }
037
038 public Class<?> getModelClass() {
039 return AssetLink.class;
040 }
041
042 public String getModelClassName() {
043 return AssetLink.class.getName();
044 }
045
046 public Map<String, Object> getModelAttributes() {
047 Map<String, Object> attributes = new HashMap<String, Object>();
048
049 attributes.put("linkId", getLinkId());
050 attributes.put("companyId", getCompanyId());
051 attributes.put("userId", getUserId());
052 attributes.put("userName", getUserName());
053 attributes.put("createDate", getCreateDate());
054 attributes.put("entryId1", getEntryId1());
055 attributes.put("entryId2", getEntryId2());
056 attributes.put("type", getType());
057 attributes.put("weight", getWeight());
058
059 return attributes;
060 }
061
062 public void setModelAttributes(Map<String, Object> attributes) {
063 Long linkId = (Long)attributes.get("linkId");
064
065 if (linkId != null) {
066 setLinkId(linkId);
067 }
068
069 Long companyId = (Long)attributes.get("companyId");
070
071 if (companyId != null) {
072 setCompanyId(companyId);
073 }
074
075 Long userId = (Long)attributes.get("userId");
076
077 if (userId != null) {
078 setUserId(userId);
079 }
080
081 String userName = (String)attributes.get("userName");
082
083 if (userName != null) {
084 setUserName(userName);
085 }
086
087 Date createDate = (Date)attributes.get("createDate");
088
089 if (createDate != null) {
090 setCreateDate(createDate);
091 }
092
093 Long entryId1 = (Long)attributes.get("entryId1");
094
095 if (entryId1 != null) {
096 setEntryId1(entryId1);
097 }
098
099 Long entryId2 = (Long)attributes.get("entryId2");
100
101 if (entryId2 != null) {
102 setEntryId2(entryId2);
103 }
104
105 Integer type = (Integer)attributes.get("type");
106
107 if (type != null) {
108 setType(type);
109 }
110
111 Integer weight = (Integer)attributes.get("weight");
112
113 if (weight != null) {
114 setWeight(weight);
115 }
116 }
117
118
123 public long getPrimaryKey() {
124 return _assetLink.getPrimaryKey();
125 }
126
127
132 public void setPrimaryKey(long primaryKey) {
133 _assetLink.setPrimaryKey(primaryKey);
134 }
135
136
141 public long getLinkId() {
142 return _assetLink.getLinkId();
143 }
144
145
150 public void setLinkId(long linkId) {
151 _assetLink.setLinkId(linkId);
152 }
153
154
159 public long getCompanyId() {
160 return _assetLink.getCompanyId();
161 }
162
163
168 public void setCompanyId(long companyId) {
169 _assetLink.setCompanyId(companyId);
170 }
171
172
177 public long getUserId() {
178 return _assetLink.getUserId();
179 }
180
181
186 public void setUserId(long userId) {
187 _assetLink.setUserId(userId);
188 }
189
190
196 public java.lang.String getUserUuid()
197 throws com.liferay.portal.kernel.exception.SystemException {
198 return _assetLink.getUserUuid();
199 }
200
201
206 public void setUserUuid(java.lang.String userUuid) {
207 _assetLink.setUserUuid(userUuid);
208 }
209
210
215 public java.lang.String getUserName() {
216 return _assetLink.getUserName();
217 }
218
219
224 public void setUserName(java.lang.String userName) {
225 _assetLink.setUserName(userName);
226 }
227
228
233 public java.util.Date getCreateDate() {
234 return _assetLink.getCreateDate();
235 }
236
237
242 public void setCreateDate(java.util.Date createDate) {
243 _assetLink.setCreateDate(createDate);
244 }
245
246
251 public long getEntryId1() {
252 return _assetLink.getEntryId1();
253 }
254
255
260 public void setEntryId1(long entryId1) {
261 _assetLink.setEntryId1(entryId1);
262 }
263
264
269 public long getEntryId2() {
270 return _assetLink.getEntryId2();
271 }
272
273
278 public void setEntryId2(long entryId2) {
279 _assetLink.setEntryId2(entryId2);
280 }
281
282
287 public int getType() {
288 return _assetLink.getType();
289 }
290
291
296 public void setType(int type) {
297 _assetLink.setType(type);
298 }
299
300
305 public int getWeight() {
306 return _assetLink.getWeight();
307 }
308
309
314 public void setWeight(int weight) {
315 _assetLink.setWeight(weight);
316 }
317
318 public boolean isNew() {
319 return _assetLink.isNew();
320 }
321
322 public void setNew(boolean n) {
323 _assetLink.setNew(n);
324 }
325
326 public boolean isCachedModel() {
327 return _assetLink.isCachedModel();
328 }
329
330 public void setCachedModel(boolean cachedModel) {
331 _assetLink.setCachedModel(cachedModel);
332 }
333
334 public boolean isEscapedModel() {
335 return _assetLink.isEscapedModel();
336 }
337
338 public java.io.Serializable getPrimaryKeyObj() {
339 return _assetLink.getPrimaryKeyObj();
340 }
341
342 public void setPrimaryKeyObj(java.io.Serializable primaryKeyObj) {
343 _assetLink.setPrimaryKeyObj(primaryKeyObj);
344 }
345
346 public com.liferay.portlet.expando.model.ExpandoBridge getExpandoBridge() {
347 return _assetLink.getExpandoBridge();
348 }
349
350 public void setExpandoBridgeAttributes(
351 com.liferay.portal.service.ServiceContext serviceContext) {
352 _assetLink.setExpandoBridgeAttributes(serviceContext);
353 }
354
355 @Override
356 public java.lang.Object clone() {
357 return new AssetLinkWrapper((AssetLink)_assetLink.clone());
358 }
359
360 public int compareTo(com.liferay.portlet.asset.model.AssetLink assetLink) {
361 return _assetLink.compareTo(assetLink);
362 }
363
364 @Override
365 public int hashCode() {
366 return _assetLink.hashCode();
367 }
368
369 public com.liferay.portal.model.CacheModel<com.liferay.portlet.asset.model.AssetLink> toCacheModel() {
370 return _assetLink.toCacheModel();
371 }
372
373 public com.liferay.portlet.asset.model.AssetLink toEscapedModel() {
374 return new AssetLinkWrapper(_assetLink.toEscapedModel());
375 }
376
377 public com.liferay.portlet.asset.model.AssetLink toUnescapedModel() {
378 return new AssetLinkWrapper(_assetLink.toUnescapedModel());
379 }
380
381 @Override
382 public java.lang.String toString() {
383 return _assetLink.toString();
384 }
385
386 public java.lang.String toXmlString() {
387 return _assetLink.toXmlString();
388 }
389
390 public void persist()
391 throws com.liferay.portal.kernel.exception.SystemException {
392 _assetLink.persist();
393 }
394
395 @Override
396 public boolean equals(Object obj) {
397 if (this == obj) {
398 return true;
399 }
400
401 if (!(obj instanceof AssetLinkWrapper)) {
402 return false;
403 }
404
405 AssetLinkWrapper assetLinkWrapper = (AssetLinkWrapper)obj;
406
407 if (Validator.equals(_assetLink, assetLinkWrapper._assetLink)) {
408 return true;
409 }
410
411 return false;
412 }
413
414
417 public AssetLink getWrappedAssetLink() {
418 return _assetLink;
419 }
420
421 public AssetLink getWrappedModel() {
422 return _assetLink;
423 }
424
425 public void resetOriginalValues() {
426 _assetLink.resetOriginalValues();
427 }
428
429 private AssetLink _assetLink;
430 }