001
014
015 package com.liferay.portal.model;
016
017 import com.liferay.portal.kernel.util.Validator;
018
019 import java.util.Date;
020 import java.util.HashMap;
021 import java.util.Map;
022
023
032 public class RepositoryWrapper implements Repository, ModelWrapper<Repository> {
033 public RepositoryWrapper(Repository repository) {
034 _repository = repository;
035 }
036
037 public Class<?> getModelClass() {
038 return Repository.class;
039 }
040
041 public String getModelClassName() {
042 return Repository.class.getName();
043 }
044
045 public Map<String, Object> getModelAttributes() {
046 Map<String, Object> attributes = new HashMap<String, Object>();
047
048 attributes.put("uuid", getUuid());
049 attributes.put("repositoryId", getRepositoryId());
050 attributes.put("groupId", getGroupId());
051 attributes.put("companyId", getCompanyId());
052 attributes.put("userId", getUserId());
053 attributes.put("userName", getUserName());
054 attributes.put("createDate", getCreateDate());
055 attributes.put("modifiedDate", getModifiedDate());
056 attributes.put("classNameId", getClassNameId());
057 attributes.put("name", getName());
058 attributes.put("description", getDescription());
059 attributes.put("portletId", getPortletId());
060 attributes.put("typeSettings", getTypeSettings());
061 attributes.put("dlFolderId", getDlFolderId());
062
063 return attributes;
064 }
065
066 public void setModelAttributes(Map<String, Object> attributes) {
067 String uuid = (String)attributes.get("uuid");
068
069 if (uuid != null) {
070 setUuid(uuid);
071 }
072
073 Long repositoryId = (Long)attributes.get("repositoryId");
074
075 if (repositoryId != null) {
076 setRepositoryId(repositoryId);
077 }
078
079 Long groupId = (Long)attributes.get("groupId");
080
081 if (groupId != null) {
082 setGroupId(groupId);
083 }
084
085 Long companyId = (Long)attributes.get("companyId");
086
087 if (companyId != null) {
088 setCompanyId(companyId);
089 }
090
091 Long userId = (Long)attributes.get("userId");
092
093 if (userId != null) {
094 setUserId(userId);
095 }
096
097 String userName = (String)attributes.get("userName");
098
099 if (userName != null) {
100 setUserName(userName);
101 }
102
103 Date createDate = (Date)attributes.get("createDate");
104
105 if (createDate != null) {
106 setCreateDate(createDate);
107 }
108
109 Date modifiedDate = (Date)attributes.get("modifiedDate");
110
111 if (modifiedDate != null) {
112 setModifiedDate(modifiedDate);
113 }
114
115 Long classNameId = (Long)attributes.get("classNameId");
116
117 if (classNameId != null) {
118 setClassNameId(classNameId);
119 }
120
121 String name = (String)attributes.get("name");
122
123 if (name != null) {
124 setName(name);
125 }
126
127 String description = (String)attributes.get("description");
128
129 if (description != null) {
130 setDescription(description);
131 }
132
133 String portletId = (String)attributes.get("portletId");
134
135 if (portletId != null) {
136 setPortletId(portletId);
137 }
138
139 String typeSettings = (String)attributes.get("typeSettings");
140
141 if (typeSettings != null) {
142 setTypeSettings(typeSettings);
143 }
144
145 Long dlFolderId = (Long)attributes.get("dlFolderId");
146
147 if (dlFolderId != null) {
148 setDlFolderId(dlFolderId);
149 }
150 }
151
152
157 public long getPrimaryKey() {
158 return _repository.getPrimaryKey();
159 }
160
161
166 public void setPrimaryKey(long primaryKey) {
167 _repository.setPrimaryKey(primaryKey);
168 }
169
170
175 public java.lang.String getUuid() {
176 return _repository.getUuid();
177 }
178
179
184 public void setUuid(java.lang.String uuid) {
185 _repository.setUuid(uuid);
186 }
187
188
193 public long getRepositoryId() {
194 return _repository.getRepositoryId();
195 }
196
197
202 public void setRepositoryId(long repositoryId) {
203 _repository.setRepositoryId(repositoryId);
204 }
205
206
211 public long getGroupId() {
212 return _repository.getGroupId();
213 }
214
215
220 public void setGroupId(long groupId) {
221 _repository.setGroupId(groupId);
222 }
223
224
229 public long getCompanyId() {
230 return _repository.getCompanyId();
231 }
232
233
238 public void setCompanyId(long companyId) {
239 _repository.setCompanyId(companyId);
240 }
241
242
247 public long getUserId() {
248 return _repository.getUserId();
249 }
250
251
256 public void setUserId(long userId) {
257 _repository.setUserId(userId);
258 }
259
260
266 public java.lang.String getUserUuid()
267 throws com.liferay.portal.kernel.exception.SystemException {
268 return _repository.getUserUuid();
269 }
270
271
276 public void setUserUuid(java.lang.String userUuid) {
277 _repository.setUserUuid(userUuid);
278 }
279
280
285 public java.lang.String getUserName() {
286 return _repository.getUserName();
287 }
288
289
294 public void setUserName(java.lang.String userName) {
295 _repository.setUserName(userName);
296 }
297
298
303 public java.util.Date getCreateDate() {
304 return _repository.getCreateDate();
305 }
306
307
312 public void setCreateDate(java.util.Date createDate) {
313 _repository.setCreateDate(createDate);
314 }
315
316
321 public java.util.Date getModifiedDate() {
322 return _repository.getModifiedDate();
323 }
324
325
330 public void setModifiedDate(java.util.Date modifiedDate) {
331 _repository.setModifiedDate(modifiedDate);
332 }
333
334
339 public java.lang.String getClassName() {
340 return _repository.getClassName();
341 }
342
343 public void setClassName(java.lang.String className) {
344 _repository.setClassName(className);
345 }
346
347
352 public long getClassNameId() {
353 return _repository.getClassNameId();
354 }
355
356
361 public void setClassNameId(long classNameId) {
362 _repository.setClassNameId(classNameId);
363 }
364
365
370 public java.lang.String getName() {
371 return _repository.getName();
372 }
373
374
379 public void setName(java.lang.String name) {
380 _repository.setName(name);
381 }
382
383
388 public java.lang.String getDescription() {
389 return _repository.getDescription();
390 }
391
392
397 public void setDescription(java.lang.String description) {
398 _repository.setDescription(description);
399 }
400
401
406 public java.lang.String getPortletId() {
407 return _repository.getPortletId();
408 }
409
410
415 public void setPortletId(java.lang.String portletId) {
416 _repository.setPortletId(portletId);
417 }
418
419
424 public java.lang.String getTypeSettings() {
425 return _repository.getTypeSettings();
426 }
427
428
433 public void setTypeSettings(java.lang.String typeSettings) {
434 _repository.setTypeSettings(typeSettings);
435 }
436
437
442 public long getDlFolderId() {
443 return _repository.getDlFolderId();
444 }
445
446
451 public void setDlFolderId(long dlFolderId) {
452 _repository.setDlFolderId(dlFolderId);
453 }
454
455 public boolean isNew() {
456 return _repository.isNew();
457 }
458
459 public void setNew(boolean n) {
460 _repository.setNew(n);
461 }
462
463 public boolean isCachedModel() {
464 return _repository.isCachedModel();
465 }
466
467 public void setCachedModel(boolean cachedModel) {
468 _repository.setCachedModel(cachedModel);
469 }
470
471 public boolean isEscapedModel() {
472 return _repository.isEscapedModel();
473 }
474
475 public java.io.Serializable getPrimaryKeyObj() {
476 return _repository.getPrimaryKeyObj();
477 }
478
479 public void setPrimaryKeyObj(java.io.Serializable primaryKeyObj) {
480 _repository.setPrimaryKeyObj(primaryKeyObj);
481 }
482
483 public com.liferay.portlet.expando.model.ExpandoBridge getExpandoBridge() {
484 return _repository.getExpandoBridge();
485 }
486
487 public void setExpandoBridgeAttributes(
488 com.liferay.portal.service.ServiceContext serviceContext) {
489 _repository.setExpandoBridgeAttributes(serviceContext);
490 }
491
492 @Override
493 public java.lang.Object clone() {
494 return new RepositoryWrapper((Repository)_repository.clone());
495 }
496
497 public int compareTo(com.liferay.portal.model.Repository repository) {
498 return _repository.compareTo(repository);
499 }
500
501 @Override
502 public int hashCode() {
503 return _repository.hashCode();
504 }
505
506 public com.liferay.portal.model.CacheModel<com.liferay.portal.model.Repository> toCacheModel() {
507 return _repository.toCacheModel();
508 }
509
510 public com.liferay.portal.model.Repository toEscapedModel() {
511 return new RepositoryWrapper(_repository.toEscapedModel());
512 }
513
514 public com.liferay.portal.model.Repository toUnescapedModel() {
515 return new RepositoryWrapper(_repository.toUnescapedModel());
516 }
517
518 @Override
519 public java.lang.String toString() {
520 return _repository.toString();
521 }
522
523 public java.lang.String toXmlString() {
524 return _repository.toXmlString();
525 }
526
527 public void persist()
528 throws com.liferay.portal.kernel.exception.SystemException {
529 _repository.persist();
530 }
531
532 public com.liferay.portal.kernel.util.UnicodeProperties getTypeSettingsProperties() {
533 return _repository.getTypeSettingsProperties();
534 }
535
536 public void setTypeSettingsProperties(
537 com.liferay.portal.kernel.util.UnicodeProperties typeSettingsProperties) {
538 _repository.setTypeSettingsProperties(typeSettingsProperties);
539 }
540
541 @Override
542 public boolean equals(Object obj) {
543 if (this == obj) {
544 return true;
545 }
546
547 if (!(obj instanceof RepositoryWrapper)) {
548 return false;
549 }
550
551 RepositoryWrapper repositoryWrapper = (RepositoryWrapper)obj;
552
553 if (Validator.equals(_repository, repositoryWrapper._repository)) {
554 return true;
555 }
556
557 return false;
558 }
559
560
563 public Repository getWrappedRepository() {
564 return _repository;
565 }
566
567 public Repository getWrappedModel() {
568 return _repository;
569 }
570
571 public void resetOriginalValues() {
572 _repository.resetOriginalValues();
573 }
574
575 private Repository _repository;
576 }