001
014
015 package com.liferay.portal.kernel.model;
016
017 import aQute.bnd.annotation.ProviderType;
018
019 import com.liferay.expando.kernel.model.ExpandoBridge;
020
021 import com.liferay.exportimport.kernel.lar.StagedModelType;
022
023 import com.liferay.portal.kernel.service.ServiceContext;
024 import com.liferay.portal.kernel.util.Validator;
025
026 import java.io.Serializable;
027
028 import java.util.Date;
029 import java.util.HashMap;
030 import java.util.Map;
031
032
041 @ProviderType
042 public class RepositoryEntryWrapper implements RepositoryEntry,
043 ModelWrapper<RepositoryEntry> {
044 public RepositoryEntryWrapper(RepositoryEntry repositoryEntry) {
045 _repositoryEntry = repositoryEntry;
046 }
047
048 @Override
049 public Class<?> getModelClass() {
050 return RepositoryEntry.class;
051 }
052
053 @Override
054 public String getModelClassName() {
055 return RepositoryEntry.class.getName();
056 }
057
058 @Override
059 public Map<String, Object> getModelAttributes() {
060 Map<String, Object> attributes = new HashMap<String, Object>();
061
062 attributes.put("mvccVersion", getMvccVersion());
063 attributes.put("uuid", getUuid());
064 attributes.put("repositoryEntryId", getRepositoryEntryId());
065 attributes.put("groupId", getGroupId());
066 attributes.put("companyId", getCompanyId());
067 attributes.put("userId", getUserId());
068 attributes.put("userName", getUserName());
069 attributes.put("createDate", getCreateDate());
070 attributes.put("modifiedDate", getModifiedDate());
071 attributes.put("repositoryId", getRepositoryId());
072 attributes.put("mappedId", getMappedId());
073 attributes.put("manualCheckInRequired", getManualCheckInRequired());
074 attributes.put("lastPublishDate", getLastPublishDate());
075
076 return attributes;
077 }
078
079 @Override
080 public void setModelAttributes(Map<String, Object> attributes) {
081 Long mvccVersion = (Long)attributes.get("mvccVersion");
082
083 if (mvccVersion != null) {
084 setMvccVersion(mvccVersion);
085 }
086
087 String uuid = (String)attributes.get("uuid");
088
089 if (uuid != null) {
090 setUuid(uuid);
091 }
092
093 Long repositoryEntryId = (Long)attributes.get("repositoryEntryId");
094
095 if (repositoryEntryId != null) {
096 setRepositoryEntryId(repositoryEntryId);
097 }
098
099 Long groupId = (Long)attributes.get("groupId");
100
101 if (groupId != null) {
102 setGroupId(groupId);
103 }
104
105 Long companyId = (Long)attributes.get("companyId");
106
107 if (companyId != null) {
108 setCompanyId(companyId);
109 }
110
111 Long userId = (Long)attributes.get("userId");
112
113 if (userId != null) {
114 setUserId(userId);
115 }
116
117 String userName = (String)attributes.get("userName");
118
119 if (userName != null) {
120 setUserName(userName);
121 }
122
123 Date createDate = (Date)attributes.get("createDate");
124
125 if (createDate != null) {
126 setCreateDate(createDate);
127 }
128
129 Date modifiedDate = (Date)attributes.get("modifiedDate");
130
131 if (modifiedDate != null) {
132 setModifiedDate(modifiedDate);
133 }
134
135 Long repositoryId = (Long)attributes.get("repositoryId");
136
137 if (repositoryId != null) {
138 setRepositoryId(repositoryId);
139 }
140
141 String mappedId = (String)attributes.get("mappedId");
142
143 if (mappedId != null) {
144 setMappedId(mappedId);
145 }
146
147 Boolean manualCheckInRequired = (Boolean)attributes.get(
148 "manualCheckInRequired");
149
150 if (manualCheckInRequired != null) {
151 setManualCheckInRequired(manualCheckInRequired);
152 }
153
154 Date lastPublishDate = (Date)attributes.get("lastPublishDate");
155
156 if (lastPublishDate != null) {
157 setLastPublishDate(lastPublishDate);
158 }
159 }
160
161 @Override
162 public java.lang.Object clone() {
163 return new RepositoryEntryWrapper((RepositoryEntry)_repositoryEntry.clone());
164 }
165
166 @Override
167 public int compareTo(
168 com.liferay.portal.kernel.model.RepositoryEntry repositoryEntry) {
169 return _repositoryEntry.compareTo(repositoryEntry);
170 }
171
172
177 @Override
178 public long getCompanyId() {
179 return _repositoryEntry.getCompanyId();
180 }
181
182
187 @Override
188 public Date getCreateDate() {
189 return _repositoryEntry.getCreateDate();
190 }
191
192 @Override
193 public ExpandoBridge getExpandoBridge() {
194 return _repositoryEntry.getExpandoBridge();
195 }
196
197
202 @Override
203 public long getGroupId() {
204 return _repositoryEntry.getGroupId();
205 }
206
207
212 @Override
213 public Date getLastPublishDate() {
214 return _repositoryEntry.getLastPublishDate();
215 }
216
217
222 @Override
223 public boolean getManualCheckInRequired() {
224 return _repositoryEntry.getManualCheckInRequired();
225 }
226
227
232 @Override
233 public java.lang.String getMappedId() {
234 return _repositoryEntry.getMappedId();
235 }
236
237
242 @Override
243 public Date getModifiedDate() {
244 return _repositoryEntry.getModifiedDate();
245 }
246
247
252 @Override
253 public long getMvccVersion() {
254 return _repositoryEntry.getMvccVersion();
255 }
256
257
262 @Override
263 public long getPrimaryKey() {
264 return _repositoryEntry.getPrimaryKey();
265 }
266
267 @Override
268 public Serializable getPrimaryKeyObj() {
269 return _repositoryEntry.getPrimaryKeyObj();
270 }
271
272
277 @Override
278 public long getRepositoryEntryId() {
279 return _repositoryEntry.getRepositoryEntryId();
280 }
281
282
287 @Override
288 public long getRepositoryId() {
289 return _repositoryEntry.getRepositoryId();
290 }
291
292
297 @Override
298 public long getUserId() {
299 return _repositoryEntry.getUserId();
300 }
301
302
307 @Override
308 public java.lang.String getUserName() {
309 return _repositoryEntry.getUserName();
310 }
311
312
317 @Override
318 public java.lang.String getUserUuid() {
319 return _repositoryEntry.getUserUuid();
320 }
321
322
327 @Override
328 public java.lang.String getUuid() {
329 return _repositoryEntry.getUuid();
330 }
331
332 @Override
333 public int hashCode() {
334 return _repositoryEntry.hashCode();
335 }
336
337 @Override
338 public boolean isCachedModel() {
339 return _repositoryEntry.isCachedModel();
340 }
341
342 @Override
343 public boolean isEscapedModel() {
344 return _repositoryEntry.isEscapedModel();
345 }
346
347
352 @Override
353 public boolean isManualCheckInRequired() {
354 return _repositoryEntry.isManualCheckInRequired();
355 }
356
357 @Override
358 public boolean isNew() {
359 return _repositoryEntry.isNew();
360 }
361
362 @Override
363 public void persist() {
364 _repositoryEntry.persist();
365 }
366
367 @Override
368 public void setCachedModel(boolean cachedModel) {
369 _repositoryEntry.setCachedModel(cachedModel);
370 }
371
372
377 @Override
378 public void setCompanyId(long companyId) {
379 _repositoryEntry.setCompanyId(companyId);
380 }
381
382
387 @Override
388 public void setCreateDate(Date createDate) {
389 _repositoryEntry.setCreateDate(createDate);
390 }
391
392 @Override
393 public void setExpandoBridgeAttributes(BaseModel<?> baseModel) {
394 _repositoryEntry.setExpandoBridgeAttributes(baseModel);
395 }
396
397 @Override
398 public void setExpandoBridgeAttributes(ExpandoBridge expandoBridge) {
399 _repositoryEntry.setExpandoBridgeAttributes(expandoBridge);
400 }
401
402 @Override
403 public void setExpandoBridgeAttributes(ServiceContext serviceContext) {
404 _repositoryEntry.setExpandoBridgeAttributes(serviceContext);
405 }
406
407
412 @Override
413 public void setGroupId(long groupId) {
414 _repositoryEntry.setGroupId(groupId);
415 }
416
417
422 @Override
423 public void setLastPublishDate(Date lastPublishDate) {
424 _repositoryEntry.setLastPublishDate(lastPublishDate);
425 }
426
427
432 @Override
433 public void setManualCheckInRequired(boolean manualCheckInRequired) {
434 _repositoryEntry.setManualCheckInRequired(manualCheckInRequired);
435 }
436
437
442 @Override
443 public void setMappedId(java.lang.String mappedId) {
444 _repositoryEntry.setMappedId(mappedId);
445 }
446
447
452 @Override
453 public void setModifiedDate(Date modifiedDate) {
454 _repositoryEntry.setModifiedDate(modifiedDate);
455 }
456
457
462 @Override
463 public void setMvccVersion(long mvccVersion) {
464 _repositoryEntry.setMvccVersion(mvccVersion);
465 }
466
467 @Override
468 public void setNew(boolean n) {
469 _repositoryEntry.setNew(n);
470 }
471
472
477 @Override
478 public void setPrimaryKey(long primaryKey) {
479 _repositoryEntry.setPrimaryKey(primaryKey);
480 }
481
482 @Override
483 public void setPrimaryKeyObj(Serializable primaryKeyObj) {
484 _repositoryEntry.setPrimaryKeyObj(primaryKeyObj);
485 }
486
487
492 @Override
493 public void setRepositoryEntryId(long repositoryEntryId) {
494 _repositoryEntry.setRepositoryEntryId(repositoryEntryId);
495 }
496
497
502 @Override
503 public void setRepositoryId(long repositoryId) {
504 _repositoryEntry.setRepositoryId(repositoryId);
505 }
506
507
512 @Override
513 public void setUserId(long userId) {
514 _repositoryEntry.setUserId(userId);
515 }
516
517
522 @Override
523 public void setUserName(java.lang.String userName) {
524 _repositoryEntry.setUserName(userName);
525 }
526
527
532 @Override
533 public void setUserUuid(java.lang.String userUuid) {
534 _repositoryEntry.setUserUuid(userUuid);
535 }
536
537
542 @Override
543 public void setUuid(java.lang.String uuid) {
544 _repositoryEntry.setUuid(uuid);
545 }
546
547 @Override
548 public CacheModel<com.liferay.portal.kernel.model.RepositoryEntry> toCacheModel() {
549 return _repositoryEntry.toCacheModel();
550 }
551
552 @Override
553 public com.liferay.portal.kernel.model.RepositoryEntry toEscapedModel() {
554 return new RepositoryEntryWrapper(_repositoryEntry.toEscapedModel());
555 }
556
557 @Override
558 public java.lang.String toString() {
559 return _repositoryEntry.toString();
560 }
561
562 @Override
563 public com.liferay.portal.kernel.model.RepositoryEntry toUnescapedModel() {
564 return new RepositoryEntryWrapper(_repositoryEntry.toUnescapedModel());
565 }
566
567 @Override
568 public java.lang.String toXmlString() {
569 return _repositoryEntry.toXmlString();
570 }
571
572 @Override
573 public boolean equals(Object obj) {
574 if (this == obj) {
575 return true;
576 }
577
578 if (!(obj instanceof RepositoryEntryWrapper)) {
579 return false;
580 }
581
582 RepositoryEntryWrapper repositoryEntryWrapper = (RepositoryEntryWrapper)obj;
583
584 if (Validator.equals(_repositoryEntry,
585 repositoryEntryWrapper._repositoryEntry)) {
586 return true;
587 }
588
589 return false;
590 }
591
592 @Override
593 public StagedModelType getStagedModelType() {
594 return _repositoryEntry.getStagedModelType();
595 }
596
597 @Override
598 public RepositoryEntry getWrappedModel() {
599 return _repositoryEntry;
600 }
601
602 @Override
603 public boolean isEntityCacheEnabled() {
604 return _repositoryEntry.isEntityCacheEnabled();
605 }
606
607 @Override
608 public boolean isFinderCacheEnabled() {
609 return _repositoryEntry.isFinderCacheEnabled();
610 }
611
612 @Override
613 public void resetOriginalValues() {
614 _repositoryEntry.resetOriginalValues();
615 }
616
617 private final RepositoryEntry _repositoryEntry;
618 }