001
014
015 package com.liferay.portlet.softwarecatalog.model;
016
017 import com.liferay.portal.kernel.util.Validator;
018 import com.liferay.portal.model.ModelWrapper;
019
020 import java.util.Date;
021 import java.util.HashMap;
022 import java.util.Map;
023
024
033 public class SCProductEntryWrapper implements SCProductEntry,
034 ModelWrapper<SCProductEntry> {
035 public SCProductEntryWrapper(SCProductEntry scProductEntry) {
036 _scProductEntry = scProductEntry;
037 }
038
039 @Override
040 public Class<?> getModelClass() {
041 return SCProductEntry.class;
042 }
043
044 @Override
045 public String getModelClassName() {
046 return SCProductEntry.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("productEntryId", getProductEntryId());
054 attributes.put("groupId", getGroupId());
055 attributes.put("companyId", getCompanyId());
056 attributes.put("userId", getUserId());
057 attributes.put("userName", getUserName());
058 attributes.put("createDate", getCreateDate());
059 attributes.put("modifiedDate", getModifiedDate());
060 attributes.put("name", getName());
061 attributes.put("type", getType());
062 attributes.put("tags", getTags());
063 attributes.put("shortDescription", getShortDescription());
064 attributes.put("longDescription", getLongDescription());
065 attributes.put("pageURL", getPageURL());
066 attributes.put("author", getAuthor());
067 attributes.put("repoGroupId", getRepoGroupId());
068 attributes.put("repoArtifactId", getRepoArtifactId());
069
070 return attributes;
071 }
072
073 @Override
074 public void setModelAttributes(Map<String, Object> attributes) {
075 Long productEntryId = (Long)attributes.get("productEntryId");
076
077 if (productEntryId != null) {
078 setProductEntryId(productEntryId);
079 }
080
081 Long groupId = (Long)attributes.get("groupId");
082
083 if (groupId != null) {
084 setGroupId(groupId);
085 }
086
087 Long companyId = (Long)attributes.get("companyId");
088
089 if (companyId != null) {
090 setCompanyId(companyId);
091 }
092
093 Long userId = (Long)attributes.get("userId");
094
095 if (userId != null) {
096 setUserId(userId);
097 }
098
099 String userName = (String)attributes.get("userName");
100
101 if (userName != null) {
102 setUserName(userName);
103 }
104
105 Date createDate = (Date)attributes.get("createDate");
106
107 if (createDate != null) {
108 setCreateDate(createDate);
109 }
110
111 Date modifiedDate = (Date)attributes.get("modifiedDate");
112
113 if (modifiedDate != null) {
114 setModifiedDate(modifiedDate);
115 }
116
117 String name = (String)attributes.get("name");
118
119 if (name != null) {
120 setName(name);
121 }
122
123 String type = (String)attributes.get("type");
124
125 if (type != null) {
126 setType(type);
127 }
128
129 String tags = (String)attributes.get("tags");
130
131 if (tags != null) {
132 setTags(tags);
133 }
134
135 String shortDescription = (String)attributes.get("shortDescription");
136
137 if (shortDescription != null) {
138 setShortDescription(shortDescription);
139 }
140
141 String longDescription = (String)attributes.get("longDescription");
142
143 if (longDescription != null) {
144 setLongDescription(longDescription);
145 }
146
147 String pageURL = (String)attributes.get("pageURL");
148
149 if (pageURL != null) {
150 setPageURL(pageURL);
151 }
152
153 String author = (String)attributes.get("author");
154
155 if (author != null) {
156 setAuthor(author);
157 }
158
159 String repoGroupId = (String)attributes.get("repoGroupId");
160
161 if (repoGroupId != null) {
162 setRepoGroupId(repoGroupId);
163 }
164
165 String repoArtifactId = (String)attributes.get("repoArtifactId");
166
167 if (repoArtifactId != null) {
168 setRepoArtifactId(repoArtifactId);
169 }
170 }
171
172
177 @Override
178 public long getPrimaryKey() {
179 return _scProductEntry.getPrimaryKey();
180 }
181
182
187 @Override
188 public void setPrimaryKey(long primaryKey) {
189 _scProductEntry.setPrimaryKey(primaryKey);
190 }
191
192
197 @Override
198 public long getProductEntryId() {
199 return _scProductEntry.getProductEntryId();
200 }
201
202
207 @Override
208 public void setProductEntryId(long productEntryId) {
209 _scProductEntry.setProductEntryId(productEntryId);
210 }
211
212
217 @Override
218 public long getGroupId() {
219 return _scProductEntry.getGroupId();
220 }
221
222
227 @Override
228 public void setGroupId(long groupId) {
229 _scProductEntry.setGroupId(groupId);
230 }
231
232
237 @Override
238 public long getCompanyId() {
239 return _scProductEntry.getCompanyId();
240 }
241
242
247 @Override
248 public void setCompanyId(long companyId) {
249 _scProductEntry.setCompanyId(companyId);
250 }
251
252
257 @Override
258 public long getUserId() {
259 return _scProductEntry.getUserId();
260 }
261
262
267 @Override
268 public void setUserId(long userId) {
269 _scProductEntry.setUserId(userId);
270 }
271
272
278 @Override
279 public java.lang.String getUserUuid()
280 throws com.liferay.portal.kernel.exception.SystemException {
281 return _scProductEntry.getUserUuid();
282 }
283
284
289 @Override
290 public void setUserUuid(java.lang.String userUuid) {
291 _scProductEntry.setUserUuid(userUuid);
292 }
293
294
299 @Override
300 public java.lang.String getUserName() {
301 return _scProductEntry.getUserName();
302 }
303
304
309 @Override
310 public void setUserName(java.lang.String userName) {
311 _scProductEntry.setUserName(userName);
312 }
313
314
319 @Override
320 public java.util.Date getCreateDate() {
321 return _scProductEntry.getCreateDate();
322 }
323
324
329 @Override
330 public void setCreateDate(java.util.Date createDate) {
331 _scProductEntry.setCreateDate(createDate);
332 }
333
334
339 @Override
340 public java.util.Date getModifiedDate() {
341 return _scProductEntry.getModifiedDate();
342 }
343
344
349 @Override
350 public void setModifiedDate(java.util.Date modifiedDate) {
351 _scProductEntry.setModifiedDate(modifiedDate);
352 }
353
354
359 @Override
360 public java.lang.String getName() {
361 return _scProductEntry.getName();
362 }
363
364
369 @Override
370 public void setName(java.lang.String name) {
371 _scProductEntry.setName(name);
372 }
373
374
379 @Override
380 public java.lang.String getType() {
381 return _scProductEntry.getType();
382 }
383
384
389 @Override
390 public void setType(java.lang.String type) {
391 _scProductEntry.setType(type);
392 }
393
394
399 @Override
400 public java.lang.String getTags() {
401 return _scProductEntry.getTags();
402 }
403
404
409 @Override
410 public void setTags(java.lang.String tags) {
411 _scProductEntry.setTags(tags);
412 }
413
414
419 @Override
420 public java.lang.String getShortDescription() {
421 return _scProductEntry.getShortDescription();
422 }
423
424
429 @Override
430 public void setShortDescription(java.lang.String shortDescription) {
431 _scProductEntry.setShortDescription(shortDescription);
432 }
433
434
439 @Override
440 public java.lang.String getLongDescription() {
441 return _scProductEntry.getLongDescription();
442 }
443
444
449 @Override
450 public void setLongDescription(java.lang.String longDescription) {
451 _scProductEntry.setLongDescription(longDescription);
452 }
453
454
459 @Override
460 public java.lang.String getPageURL() {
461 return _scProductEntry.getPageURL();
462 }
463
464
469 @Override
470 public void setPageURL(java.lang.String pageURL) {
471 _scProductEntry.setPageURL(pageURL);
472 }
473
474
479 @Override
480 public java.lang.String getAuthor() {
481 return _scProductEntry.getAuthor();
482 }
483
484
489 @Override
490 public void setAuthor(java.lang.String author) {
491 _scProductEntry.setAuthor(author);
492 }
493
494
499 @Override
500 public java.lang.String getRepoGroupId() {
501 return _scProductEntry.getRepoGroupId();
502 }
503
504
509 @Override
510 public void setRepoGroupId(java.lang.String repoGroupId) {
511 _scProductEntry.setRepoGroupId(repoGroupId);
512 }
513
514
519 @Override
520 public java.lang.String getRepoArtifactId() {
521 return _scProductEntry.getRepoArtifactId();
522 }
523
524
529 @Override
530 public void setRepoArtifactId(java.lang.String repoArtifactId) {
531 _scProductEntry.setRepoArtifactId(repoArtifactId);
532 }
533
534 @Override
535 public boolean isNew() {
536 return _scProductEntry.isNew();
537 }
538
539 @Override
540 public void setNew(boolean n) {
541 _scProductEntry.setNew(n);
542 }
543
544 @Override
545 public boolean isCachedModel() {
546 return _scProductEntry.isCachedModel();
547 }
548
549 @Override
550 public void setCachedModel(boolean cachedModel) {
551 _scProductEntry.setCachedModel(cachedModel);
552 }
553
554 @Override
555 public boolean isEscapedModel() {
556 return _scProductEntry.isEscapedModel();
557 }
558
559 @Override
560 public java.io.Serializable getPrimaryKeyObj() {
561 return _scProductEntry.getPrimaryKeyObj();
562 }
563
564 @Override
565 public void setPrimaryKeyObj(java.io.Serializable primaryKeyObj) {
566 _scProductEntry.setPrimaryKeyObj(primaryKeyObj);
567 }
568
569 @Override
570 public com.liferay.portlet.expando.model.ExpandoBridge getExpandoBridge() {
571 return _scProductEntry.getExpandoBridge();
572 }
573
574 @Override
575 public void setExpandoBridgeAttributes(
576 com.liferay.portal.model.BaseModel<?> baseModel) {
577 _scProductEntry.setExpandoBridgeAttributes(baseModel);
578 }
579
580 @Override
581 public void setExpandoBridgeAttributes(
582 com.liferay.portlet.expando.model.ExpandoBridge expandoBridge) {
583 _scProductEntry.setExpandoBridgeAttributes(expandoBridge);
584 }
585
586 @Override
587 public void setExpandoBridgeAttributes(
588 com.liferay.portal.service.ServiceContext serviceContext) {
589 _scProductEntry.setExpandoBridgeAttributes(serviceContext);
590 }
591
592 @Override
593 public java.lang.Object clone() {
594 return new SCProductEntryWrapper((SCProductEntry)_scProductEntry.clone());
595 }
596
597 @Override
598 public int compareTo(
599 com.liferay.portlet.softwarecatalog.model.SCProductEntry scProductEntry) {
600 return _scProductEntry.compareTo(scProductEntry);
601 }
602
603 @Override
604 public int hashCode() {
605 return _scProductEntry.hashCode();
606 }
607
608 @Override
609 public com.liferay.portal.model.CacheModel<com.liferay.portlet.softwarecatalog.model.SCProductEntry> toCacheModel() {
610 return _scProductEntry.toCacheModel();
611 }
612
613 @Override
614 public com.liferay.portlet.softwarecatalog.model.SCProductEntry toEscapedModel() {
615 return new SCProductEntryWrapper(_scProductEntry.toEscapedModel());
616 }
617
618 @Override
619 public com.liferay.portlet.softwarecatalog.model.SCProductEntry toUnescapedModel() {
620 return new SCProductEntryWrapper(_scProductEntry.toUnescapedModel());
621 }
622
623 @Override
624 public java.lang.String toString() {
625 return _scProductEntry.toString();
626 }
627
628 @Override
629 public java.lang.String toXmlString() {
630 return _scProductEntry.toXmlString();
631 }
632
633 @Override
634 public void persist()
635 throws com.liferay.portal.kernel.exception.SystemException {
636 _scProductEntry.persist();
637 }
638
639 @Override
640 public com.liferay.portlet.softwarecatalog.model.SCProductVersion getLatestVersion()
641 throws com.liferay.portal.kernel.exception.SystemException {
642 return _scProductEntry.getLatestVersion();
643 }
644
645 @Override
646 public java.util.List<com.liferay.portlet.softwarecatalog.model.SCLicense> getLicenses()
647 throws com.liferay.portal.kernel.exception.SystemException {
648 return _scProductEntry.getLicenses();
649 }
650
651 @Override
652 public java.util.List<com.liferay.portlet.softwarecatalog.model.SCProductScreenshot> getScreenshots()
653 throws com.liferay.portal.kernel.exception.SystemException {
654 return _scProductEntry.getScreenshots();
655 }
656
657 @Override
658 public boolean equals(Object obj) {
659 if (this == obj) {
660 return true;
661 }
662
663 if (!(obj instanceof SCProductEntryWrapper)) {
664 return false;
665 }
666
667 SCProductEntryWrapper scProductEntryWrapper = (SCProductEntryWrapper)obj;
668
669 if (Validator.equals(_scProductEntry,
670 scProductEntryWrapper._scProductEntry)) {
671 return true;
672 }
673
674 return false;
675 }
676
677
680 public SCProductEntry getWrappedSCProductEntry() {
681 return _scProductEntry;
682 }
683
684 @Override
685 public SCProductEntry getWrappedModel() {
686 return _scProductEntry;
687 }
688
689 @Override
690 public void resetOriginalValues() {
691 _scProductEntry.resetOriginalValues();
692 }
693
694 private SCProductEntry _scProductEntry;
695 }