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
025 import java.io.Serializable;
026
027 import java.util.Date;
028 import java.util.HashMap;
029 import java.util.Map;
030 import java.util.Objects;
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 CacheModel<RepositoryEntry> toCacheModel() {
163 return _repositoryEntry.toCacheModel();
164 }
165
166 @Override
167 public RepositoryEntry toEscapedModel() {
168 return new RepositoryEntryWrapper(_repositoryEntry.toEscapedModel());
169 }
170
171 @Override
172 public RepositoryEntry toUnescapedModel() {
173 return new RepositoryEntryWrapper(_repositoryEntry.toUnescapedModel());
174 }
175
176
181 @Override
182 public boolean getManualCheckInRequired() {
183 return _repositoryEntry.getManualCheckInRequired();
184 }
185
186 @Override
187 public boolean isCachedModel() {
188 return _repositoryEntry.isCachedModel();
189 }
190
191 @Override
192 public boolean isEscapedModel() {
193 return _repositoryEntry.isEscapedModel();
194 }
195
196
201 @Override
202 public boolean isManualCheckInRequired() {
203 return _repositoryEntry.isManualCheckInRequired();
204 }
205
206 @Override
207 public boolean isNew() {
208 return _repositoryEntry.isNew();
209 }
210
211 @Override
212 public ExpandoBridge getExpandoBridge() {
213 return _repositoryEntry.getExpandoBridge();
214 }
215
216 @Override
217 public int compareTo(RepositoryEntry repositoryEntry) {
218 return _repositoryEntry.compareTo(repositoryEntry);
219 }
220
221 @Override
222 public int hashCode() {
223 return _repositoryEntry.hashCode();
224 }
225
226 @Override
227 public Serializable getPrimaryKeyObj() {
228 return _repositoryEntry.getPrimaryKeyObj();
229 }
230
231 @Override
232 public java.lang.Object clone() {
233 return new RepositoryEntryWrapper((RepositoryEntry)_repositoryEntry.clone());
234 }
235
236
241 @Override
242 public java.lang.String getMappedId() {
243 return _repositoryEntry.getMappedId();
244 }
245
246
251 @Override
252 public java.lang.String getUserName() {
253 return _repositoryEntry.getUserName();
254 }
255
256
261 @Override
262 public java.lang.String getUserUuid() {
263 return _repositoryEntry.getUserUuid();
264 }
265
266
271 @Override
272 public java.lang.String getUuid() {
273 return _repositoryEntry.getUuid();
274 }
275
276 @Override
277 public java.lang.String toString() {
278 return _repositoryEntry.toString();
279 }
280
281 @Override
282 public java.lang.String toXmlString() {
283 return _repositoryEntry.toXmlString();
284 }
285
286
291 @Override
292 public Date getCreateDate() {
293 return _repositoryEntry.getCreateDate();
294 }
295
296
301 @Override
302 public Date getLastPublishDate() {
303 return _repositoryEntry.getLastPublishDate();
304 }
305
306
311 @Override
312 public Date getModifiedDate() {
313 return _repositoryEntry.getModifiedDate();
314 }
315
316
321 @Override
322 public long getCompanyId() {
323 return _repositoryEntry.getCompanyId();
324 }
325
326
331 @Override
332 public long getGroupId() {
333 return _repositoryEntry.getGroupId();
334 }
335
336
341 @Override
342 public long getMvccVersion() {
343 return _repositoryEntry.getMvccVersion();
344 }
345
346
351 @Override
352 public long getPrimaryKey() {
353 return _repositoryEntry.getPrimaryKey();
354 }
355
356
361 @Override
362 public long getRepositoryEntryId() {
363 return _repositoryEntry.getRepositoryEntryId();
364 }
365
366
371 @Override
372 public long getRepositoryId() {
373 return _repositoryEntry.getRepositoryId();
374 }
375
376
381 @Override
382 public long getUserId() {
383 return _repositoryEntry.getUserId();
384 }
385
386 @Override
387 public void persist() {
388 _repositoryEntry.persist();
389 }
390
391 @Override
392 public void setCachedModel(boolean cachedModel) {
393 _repositoryEntry.setCachedModel(cachedModel);
394 }
395
396
401 @Override
402 public void setCompanyId(long companyId) {
403 _repositoryEntry.setCompanyId(companyId);
404 }
405
406
411 @Override
412 public void setCreateDate(Date createDate) {
413 _repositoryEntry.setCreateDate(createDate);
414 }
415
416 @Override
417 public void setExpandoBridgeAttributes(BaseModel<?> baseModel) {
418 _repositoryEntry.setExpandoBridgeAttributes(baseModel);
419 }
420
421 @Override
422 public void setExpandoBridgeAttributes(ExpandoBridge expandoBridge) {
423 _repositoryEntry.setExpandoBridgeAttributes(expandoBridge);
424 }
425
426 @Override
427 public void setExpandoBridgeAttributes(ServiceContext serviceContext) {
428 _repositoryEntry.setExpandoBridgeAttributes(serviceContext);
429 }
430
431
436 @Override
437 public void setGroupId(long groupId) {
438 _repositoryEntry.setGroupId(groupId);
439 }
440
441
446 @Override
447 public void setLastPublishDate(Date lastPublishDate) {
448 _repositoryEntry.setLastPublishDate(lastPublishDate);
449 }
450
451
456 @Override
457 public void setManualCheckInRequired(boolean manualCheckInRequired) {
458 _repositoryEntry.setManualCheckInRequired(manualCheckInRequired);
459 }
460
461
466 @Override
467 public void setMappedId(java.lang.String mappedId) {
468 _repositoryEntry.setMappedId(mappedId);
469 }
470
471
476 @Override
477 public void setModifiedDate(Date modifiedDate) {
478 _repositoryEntry.setModifiedDate(modifiedDate);
479 }
480
481
486 @Override
487 public void setMvccVersion(long mvccVersion) {
488 _repositoryEntry.setMvccVersion(mvccVersion);
489 }
490
491 @Override
492 public void setNew(boolean n) {
493 _repositoryEntry.setNew(n);
494 }
495
496
501 @Override
502 public void setPrimaryKey(long primaryKey) {
503 _repositoryEntry.setPrimaryKey(primaryKey);
504 }
505
506 @Override
507 public void setPrimaryKeyObj(Serializable primaryKeyObj) {
508 _repositoryEntry.setPrimaryKeyObj(primaryKeyObj);
509 }
510
511
516 @Override
517 public void setRepositoryEntryId(long repositoryEntryId) {
518 _repositoryEntry.setRepositoryEntryId(repositoryEntryId);
519 }
520
521
526 @Override
527 public void setRepositoryId(long repositoryId) {
528 _repositoryEntry.setRepositoryId(repositoryId);
529 }
530
531
536 @Override
537 public void setUserId(long userId) {
538 _repositoryEntry.setUserId(userId);
539 }
540
541
546 @Override
547 public void setUserName(java.lang.String userName) {
548 _repositoryEntry.setUserName(userName);
549 }
550
551
556 @Override
557 public void setUserUuid(java.lang.String userUuid) {
558 _repositoryEntry.setUserUuid(userUuid);
559 }
560
561
566 @Override
567 public void setUuid(java.lang.String uuid) {
568 _repositoryEntry.setUuid(uuid);
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 (Objects.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 }