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