001
014
015 package com.liferay.portal.model;
016
017 import com.liferay.portal.kernel.lar.StagedModelType;
018 import com.liferay.portal.kernel.util.Validator;
019
020 import java.util.Date;
021 import java.util.HashMap;
022 import java.util.Map;
023
024
033 public class RepositoryEntryWrapper implements RepositoryEntry,
034 ModelWrapper<RepositoryEntry> {
035 public RepositoryEntryWrapper(RepositoryEntry repositoryEntry) {
036 _repositoryEntry = repositoryEntry;
037 }
038
039 @Override
040 public Class<?> getModelClass() {
041 return RepositoryEntry.class;
042 }
043
044 @Override
045 public String getModelClassName() {
046 return RepositoryEntry.class.getName();
047 }
048
049 @Override
050 public Map<String, Object> getModelAttributes() {
051 Map<String, Object> attributes = new HashMap<String, Object>();
052
053 attributes.put("uuid", getUuid());
054 attributes.put("repositoryEntryId", getRepositoryEntryId());
055 attributes.put("groupId", getGroupId());
056 attributes.put("companyId", getCompanyId());
057 attributes.put("userId", getUserId());
058 attributes.put("userName", getUserName());
059 attributes.put("createDate", getCreateDate());
060 attributes.put("modifiedDate", getModifiedDate());
061 attributes.put("repositoryId", getRepositoryId());
062 attributes.put("mappedId", getMappedId());
063 attributes.put("manualCheckInRequired", getManualCheckInRequired());
064
065 return attributes;
066 }
067
068 @Override
069 public void setModelAttributes(Map<String, Object> attributes) {
070 String uuid = (String)attributes.get("uuid");
071
072 if (uuid != null) {
073 setUuid(uuid);
074 }
075
076 Long repositoryEntryId = (Long)attributes.get("repositoryEntryId");
077
078 if (repositoryEntryId != null) {
079 setRepositoryEntryId(repositoryEntryId);
080 }
081
082 Long groupId = (Long)attributes.get("groupId");
083
084 if (groupId != null) {
085 setGroupId(groupId);
086 }
087
088 Long companyId = (Long)attributes.get("companyId");
089
090 if (companyId != null) {
091 setCompanyId(companyId);
092 }
093
094 Long userId = (Long)attributes.get("userId");
095
096 if (userId != null) {
097 setUserId(userId);
098 }
099
100 String userName = (String)attributes.get("userName");
101
102 if (userName != null) {
103 setUserName(userName);
104 }
105
106 Date createDate = (Date)attributes.get("createDate");
107
108 if (createDate != null) {
109 setCreateDate(createDate);
110 }
111
112 Date modifiedDate = (Date)attributes.get("modifiedDate");
113
114 if (modifiedDate != null) {
115 setModifiedDate(modifiedDate);
116 }
117
118 Long repositoryId = (Long)attributes.get("repositoryId");
119
120 if (repositoryId != null) {
121 setRepositoryId(repositoryId);
122 }
123
124 String mappedId = (String)attributes.get("mappedId");
125
126 if (mappedId != null) {
127 setMappedId(mappedId);
128 }
129
130 Boolean manualCheckInRequired = (Boolean)attributes.get(
131 "manualCheckInRequired");
132
133 if (manualCheckInRequired != null) {
134 setManualCheckInRequired(manualCheckInRequired);
135 }
136 }
137
138
143 @Override
144 public long getPrimaryKey() {
145 return _repositoryEntry.getPrimaryKey();
146 }
147
148
153 @Override
154 public void setPrimaryKey(long primaryKey) {
155 _repositoryEntry.setPrimaryKey(primaryKey);
156 }
157
158
163 @Override
164 public java.lang.String getUuid() {
165 return _repositoryEntry.getUuid();
166 }
167
168
173 @Override
174 public void setUuid(java.lang.String uuid) {
175 _repositoryEntry.setUuid(uuid);
176 }
177
178
183 @Override
184 public long getRepositoryEntryId() {
185 return _repositoryEntry.getRepositoryEntryId();
186 }
187
188
193 @Override
194 public void setRepositoryEntryId(long repositoryEntryId) {
195 _repositoryEntry.setRepositoryEntryId(repositoryEntryId);
196 }
197
198
203 @Override
204 public long getGroupId() {
205 return _repositoryEntry.getGroupId();
206 }
207
208
213 @Override
214 public void setGroupId(long groupId) {
215 _repositoryEntry.setGroupId(groupId);
216 }
217
218
223 @Override
224 public long getCompanyId() {
225 return _repositoryEntry.getCompanyId();
226 }
227
228
233 @Override
234 public void setCompanyId(long companyId) {
235 _repositoryEntry.setCompanyId(companyId);
236 }
237
238
243 @Override
244 public long getUserId() {
245 return _repositoryEntry.getUserId();
246 }
247
248
253 @Override
254 public void setUserId(long userId) {
255 _repositoryEntry.setUserId(userId);
256 }
257
258
264 @Override
265 public java.lang.String getUserUuid()
266 throws com.liferay.portal.kernel.exception.SystemException {
267 return _repositoryEntry.getUserUuid();
268 }
269
270
275 @Override
276 public void setUserUuid(java.lang.String userUuid) {
277 _repositoryEntry.setUserUuid(userUuid);
278 }
279
280
285 @Override
286 public java.lang.String getUserName() {
287 return _repositoryEntry.getUserName();
288 }
289
290
295 @Override
296 public void setUserName(java.lang.String userName) {
297 _repositoryEntry.setUserName(userName);
298 }
299
300
305 @Override
306 public java.util.Date getCreateDate() {
307 return _repositoryEntry.getCreateDate();
308 }
309
310
315 @Override
316 public void setCreateDate(java.util.Date createDate) {
317 _repositoryEntry.setCreateDate(createDate);
318 }
319
320
325 @Override
326 public java.util.Date getModifiedDate() {
327 return _repositoryEntry.getModifiedDate();
328 }
329
330
335 @Override
336 public void setModifiedDate(java.util.Date modifiedDate) {
337 _repositoryEntry.setModifiedDate(modifiedDate);
338 }
339
340
345 @Override
346 public long getRepositoryId() {
347 return _repositoryEntry.getRepositoryId();
348 }
349
350
355 @Override
356 public void setRepositoryId(long repositoryId) {
357 _repositoryEntry.setRepositoryId(repositoryId);
358 }
359
360
365 @Override
366 public java.lang.String getMappedId() {
367 return _repositoryEntry.getMappedId();
368 }
369
370
375 @Override
376 public void setMappedId(java.lang.String mappedId) {
377 _repositoryEntry.setMappedId(mappedId);
378 }
379
380
385 @Override
386 public boolean getManualCheckInRequired() {
387 return _repositoryEntry.getManualCheckInRequired();
388 }
389
390
395 @Override
396 public boolean isManualCheckInRequired() {
397 return _repositoryEntry.isManualCheckInRequired();
398 }
399
400
405 @Override
406 public void setManualCheckInRequired(boolean manualCheckInRequired) {
407 _repositoryEntry.setManualCheckInRequired(manualCheckInRequired);
408 }
409
410 @Override
411 public boolean isNew() {
412 return _repositoryEntry.isNew();
413 }
414
415 @Override
416 public void setNew(boolean n) {
417 _repositoryEntry.setNew(n);
418 }
419
420 @Override
421 public boolean isCachedModel() {
422 return _repositoryEntry.isCachedModel();
423 }
424
425 @Override
426 public void setCachedModel(boolean cachedModel) {
427 _repositoryEntry.setCachedModel(cachedModel);
428 }
429
430 @Override
431 public boolean isEscapedModel() {
432 return _repositoryEntry.isEscapedModel();
433 }
434
435 @Override
436 public java.io.Serializable getPrimaryKeyObj() {
437 return _repositoryEntry.getPrimaryKeyObj();
438 }
439
440 @Override
441 public void setPrimaryKeyObj(java.io.Serializable primaryKeyObj) {
442 _repositoryEntry.setPrimaryKeyObj(primaryKeyObj);
443 }
444
445 @Override
446 public com.liferay.portlet.expando.model.ExpandoBridge getExpandoBridge() {
447 return _repositoryEntry.getExpandoBridge();
448 }
449
450 @Override
451 public void setExpandoBridgeAttributes(
452 com.liferay.portal.model.BaseModel<?> baseModel) {
453 _repositoryEntry.setExpandoBridgeAttributes(baseModel);
454 }
455
456 @Override
457 public void setExpandoBridgeAttributes(
458 com.liferay.portlet.expando.model.ExpandoBridge expandoBridge) {
459 _repositoryEntry.setExpandoBridgeAttributes(expandoBridge);
460 }
461
462 @Override
463 public void setExpandoBridgeAttributes(
464 com.liferay.portal.service.ServiceContext serviceContext) {
465 _repositoryEntry.setExpandoBridgeAttributes(serviceContext);
466 }
467
468 @Override
469 public java.lang.Object clone() {
470 return new RepositoryEntryWrapper((RepositoryEntry)_repositoryEntry.clone());
471 }
472
473 @Override
474 public int compareTo(
475 com.liferay.portal.model.RepositoryEntry repositoryEntry) {
476 return _repositoryEntry.compareTo(repositoryEntry);
477 }
478
479 @Override
480 public int hashCode() {
481 return _repositoryEntry.hashCode();
482 }
483
484 @Override
485 public com.liferay.portal.model.CacheModel<com.liferay.portal.model.RepositoryEntry> toCacheModel() {
486 return _repositoryEntry.toCacheModel();
487 }
488
489 @Override
490 public com.liferay.portal.model.RepositoryEntry toEscapedModel() {
491 return new RepositoryEntryWrapper(_repositoryEntry.toEscapedModel());
492 }
493
494 @Override
495 public com.liferay.portal.model.RepositoryEntry toUnescapedModel() {
496 return new RepositoryEntryWrapper(_repositoryEntry.toUnescapedModel());
497 }
498
499 @Override
500 public java.lang.String toString() {
501 return _repositoryEntry.toString();
502 }
503
504 @Override
505 public java.lang.String toXmlString() {
506 return _repositoryEntry.toXmlString();
507 }
508
509 @Override
510 public void persist()
511 throws com.liferay.portal.kernel.exception.SystemException {
512 _repositoryEntry.persist();
513 }
514
515 @Override
516 public boolean equals(Object obj) {
517 if (this == obj) {
518 return true;
519 }
520
521 if (!(obj instanceof RepositoryEntryWrapper)) {
522 return false;
523 }
524
525 RepositoryEntryWrapper repositoryEntryWrapper = (RepositoryEntryWrapper)obj;
526
527 if (Validator.equals(_repositoryEntry,
528 repositoryEntryWrapper._repositoryEntry)) {
529 return true;
530 }
531
532 return false;
533 }
534
535 @Override
536 public StagedModelType getStagedModelType() {
537 return _repositoryEntry.getStagedModelType();
538 }
539
540
543 public RepositoryEntry getWrappedRepositoryEntry() {
544 return _repositoryEntry;
545 }
546
547 @Override
548 public RepositoryEntry getWrappedModel() {
549 return _repositoryEntry;
550 }
551
552 @Override
553 public void resetOriginalValues() {
554 _repositoryEntry.resetOriginalValues();
555 }
556
557 private RepositoryEntry _repositoryEntry;
558 }