001    /**
002     * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
003     *
004     * This library is free software; you can redistribute it and/or modify it under
005     * the terms of the GNU Lesser General Public License as published by the Free
006     * Software Foundation; either version 2.1 of the License, or (at your option)
007     * any later version.
008     *
009     * This library is distributed in the hope that it will be useful, but WITHOUT
010     * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
011     * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
012     * details.
013     */
014    
015    package com.liferay.portlet.dynamicdatalists.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    /**
025     * <p>
026     * This class is a wrapper for {@link DDLRecordVersion}.
027     * </p>
028     *
029     * @author Brian Wing Shun Chan
030     * @see DDLRecordVersion
031     * @generated
032     */
033    public class DDLRecordVersionWrapper implements DDLRecordVersion,
034            ModelWrapper<DDLRecordVersion> {
035            public DDLRecordVersionWrapper(DDLRecordVersion ddlRecordVersion) {
036                    _ddlRecordVersion = ddlRecordVersion;
037            }
038    
039            @Override
040            public Class<?> getModelClass() {
041                    return DDLRecordVersion.class;
042            }
043    
044            @Override
045            public String getModelClassName() {
046                    return DDLRecordVersion.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("recordVersionId", getRecordVersionId());
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("DDMStorageId", getDDMStorageId());
060                    attributes.put("recordSetId", getRecordSetId());
061                    attributes.put("recordId", getRecordId());
062                    attributes.put("version", getVersion());
063                    attributes.put("displayIndex", getDisplayIndex());
064                    attributes.put("status", getStatus());
065                    attributes.put("statusByUserId", getStatusByUserId());
066                    attributes.put("statusByUserName", getStatusByUserName());
067                    attributes.put("statusDate", getStatusDate());
068    
069                    return attributes;
070            }
071    
072            @Override
073            public void setModelAttributes(Map<String, Object> attributes) {
074                    Long recordVersionId = (Long)attributes.get("recordVersionId");
075    
076                    if (recordVersionId != null) {
077                            setRecordVersionId(recordVersionId);
078                    }
079    
080                    Long groupId = (Long)attributes.get("groupId");
081    
082                    if (groupId != null) {
083                            setGroupId(groupId);
084                    }
085    
086                    Long companyId = (Long)attributes.get("companyId");
087    
088                    if (companyId != null) {
089                            setCompanyId(companyId);
090                    }
091    
092                    Long userId = (Long)attributes.get("userId");
093    
094                    if (userId != null) {
095                            setUserId(userId);
096                    }
097    
098                    String userName = (String)attributes.get("userName");
099    
100                    if (userName != null) {
101                            setUserName(userName);
102                    }
103    
104                    Date createDate = (Date)attributes.get("createDate");
105    
106                    if (createDate != null) {
107                            setCreateDate(createDate);
108                    }
109    
110                    Long DDMStorageId = (Long)attributes.get("DDMStorageId");
111    
112                    if (DDMStorageId != null) {
113                            setDDMStorageId(DDMStorageId);
114                    }
115    
116                    Long recordSetId = (Long)attributes.get("recordSetId");
117    
118                    if (recordSetId != null) {
119                            setRecordSetId(recordSetId);
120                    }
121    
122                    Long recordId = (Long)attributes.get("recordId");
123    
124                    if (recordId != null) {
125                            setRecordId(recordId);
126                    }
127    
128                    String version = (String)attributes.get("version");
129    
130                    if (version != null) {
131                            setVersion(version);
132                    }
133    
134                    Integer displayIndex = (Integer)attributes.get("displayIndex");
135    
136                    if (displayIndex != null) {
137                            setDisplayIndex(displayIndex);
138                    }
139    
140                    Integer status = (Integer)attributes.get("status");
141    
142                    if (status != null) {
143                            setStatus(status);
144                    }
145    
146                    Long statusByUserId = (Long)attributes.get("statusByUserId");
147    
148                    if (statusByUserId != null) {
149                            setStatusByUserId(statusByUserId);
150                    }
151    
152                    String statusByUserName = (String)attributes.get("statusByUserName");
153    
154                    if (statusByUserName != null) {
155                            setStatusByUserName(statusByUserName);
156                    }
157    
158                    Date statusDate = (Date)attributes.get("statusDate");
159    
160                    if (statusDate != null) {
161                            setStatusDate(statusDate);
162                    }
163            }
164    
165            /**
166            * Returns the primary key of this d d l record version.
167            *
168            * @return the primary key of this d d l record version
169            */
170            @Override
171            public long getPrimaryKey() {
172                    return _ddlRecordVersion.getPrimaryKey();
173            }
174    
175            /**
176            * Sets the primary key of this d d l record version.
177            *
178            * @param primaryKey the primary key of this d d l record version
179            */
180            @Override
181            public void setPrimaryKey(long primaryKey) {
182                    _ddlRecordVersion.setPrimaryKey(primaryKey);
183            }
184    
185            /**
186            * Returns the record version ID of this d d l record version.
187            *
188            * @return the record version ID of this d d l record version
189            */
190            @Override
191            public long getRecordVersionId() {
192                    return _ddlRecordVersion.getRecordVersionId();
193            }
194    
195            /**
196            * Sets the record version ID of this d d l record version.
197            *
198            * @param recordVersionId the record version ID of this d d l record version
199            */
200            @Override
201            public void setRecordVersionId(long recordVersionId) {
202                    _ddlRecordVersion.setRecordVersionId(recordVersionId);
203            }
204    
205            /**
206            * Returns the group ID of this d d l record version.
207            *
208            * @return the group ID of this d d l record version
209            */
210            @Override
211            public long getGroupId() {
212                    return _ddlRecordVersion.getGroupId();
213            }
214    
215            /**
216            * Sets the group ID of this d d l record version.
217            *
218            * @param groupId the group ID of this d d l record version
219            */
220            @Override
221            public void setGroupId(long groupId) {
222                    _ddlRecordVersion.setGroupId(groupId);
223            }
224    
225            /**
226            * Returns the company ID of this d d l record version.
227            *
228            * @return the company ID of this d d l record version
229            */
230            @Override
231            public long getCompanyId() {
232                    return _ddlRecordVersion.getCompanyId();
233            }
234    
235            /**
236            * Sets the company ID of this d d l record version.
237            *
238            * @param companyId the company ID of this d d l record version
239            */
240            @Override
241            public void setCompanyId(long companyId) {
242                    _ddlRecordVersion.setCompanyId(companyId);
243            }
244    
245            /**
246            * Returns the user ID of this d d l record version.
247            *
248            * @return the user ID of this d d l record version
249            */
250            @Override
251            public long getUserId() {
252                    return _ddlRecordVersion.getUserId();
253            }
254    
255            /**
256            * Sets the user ID of this d d l record version.
257            *
258            * @param userId the user ID of this d d l record version
259            */
260            @Override
261            public void setUserId(long userId) {
262                    _ddlRecordVersion.setUserId(userId);
263            }
264    
265            /**
266            * Returns the user uuid of this d d l record version.
267            *
268            * @return the user uuid of this d d l record version
269            * @throws SystemException if a system exception occurred
270            */
271            @Override
272            public java.lang.String getUserUuid()
273                    throws com.liferay.portal.kernel.exception.SystemException {
274                    return _ddlRecordVersion.getUserUuid();
275            }
276    
277            /**
278            * Sets the user uuid of this d d l record version.
279            *
280            * @param userUuid the user uuid of this d d l record version
281            */
282            @Override
283            public void setUserUuid(java.lang.String userUuid) {
284                    _ddlRecordVersion.setUserUuid(userUuid);
285            }
286    
287            /**
288            * Returns the user name of this d d l record version.
289            *
290            * @return the user name of this d d l record version
291            */
292            @Override
293            public java.lang.String getUserName() {
294                    return _ddlRecordVersion.getUserName();
295            }
296    
297            /**
298            * Sets the user name of this d d l record version.
299            *
300            * @param userName the user name of this d d l record version
301            */
302            @Override
303            public void setUserName(java.lang.String userName) {
304                    _ddlRecordVersion.setUserName(userName);
305            }
306    
307            /**
308            * Returns the create date of this d d l record version.
309            *
310            * @return the create date of this d d l record version
311            */
312            @Override
313            public java.util.Date getCreateDate() {
314                    return _ddlRecordVersion.getCreateDate();
315            }
316    
317            /**
318            * Sets the create date of this d d l record version.
319            *
320            * @param createDate the create date of this d d l record version
321            */
322            @Override
323            public void setCreateDate(java.util.Date createDate) {
324                    _ddlRecordVersion.setCreateDate(createDate);
325            }
326    
327            /**
328            * Returns the d d m storage ID of this d d l record version.
329            *
330            * @return the d d m storage ID of this d d l record version
331            */
332            @Override
333            public long getDDMStorageId() {
334                    return _ddlRecordVersion.getDDMStorageId();
335            }
336    
337            /**
338            * Sets the d d m storage ID of this d d l record version.
339            *
340            * @param DDMStorageId the d d m storage ID of this d d l record version
341            */
342            @Override
343            public void setDDMStorageId(long DDMStorageId) {
344                    _ddlRecordVersion.setDDMStorageId(DDMStorageId);
345            }
346    
347            /**
348            * Returns the record set ID of this d d l record version.
349            *
350            * @return the record set ID of this d d l record version
351            */
352            @Override
353            public long getRecordSetId() {
354                    return _ddlRecordVersion.getRecordSetId();
355            }
356    
357            /**
358            * Sets the record set ID of this d d l record version.
359            *
360            * @param recordSetId the record set ID of this d d l record version
361            */
362            @Override
363            public void setRecordSetId(long recordSetId) {
364                    _ddlRecordVersion.setRecordSetId(recordSetId);
365            }
366    
367            /**
368            * Returns the record ID of this d d l record version.
369            *
370            * @return the record ID of this d d l record version
371            */
372            @Override
373            public long getRecordId() {
374                    return _ddlRecordVersion.getRecordId();
375            }
376    
377            /**
378            * Sets the record ID of this d d l record version.
379            *
380            * @param recordId the record ID of this d d l record version
381            */
382            @Override
383            public void setRecordId(long recordId) {
384                    _ddlRecordVersion.setRecordId(recordId);
385            }
386    
387            /**
388            * Returns the version of this d d l record version.
389            *
390            * @return the version of this d d l record version
391            */
392            @Override
393            public java.lang.String getVersion() {
394                    return _ddlRecordVersion.getVersion();
395            }
396    
397            /**
398            * Sets the version of this d d l record version.
399            *
400            * @param version the version of this d d l record version
401            */
402            @Override
403            public void setVersion(java.lang.String version) {
404                    _ddlRecordVersion.setVersion(version);
405            }
406    
407            /**
408            * Returns the display index of this d d l record version.
409            *
410            * @return the display index of this d d l record version
411            */
412            @Override
413            public int getDisplayIndex() {
414                    return _ddlRecordVersion.getDisplayIndex();
415            }
416    
417            /**
418            * Sets the display index of this d d l record version.
419            *
420            * @param displayIndex the display index of this d d l record version
421            */
422            @Override
423            public void setDisplayIndex(int displayIndex) {
424                    _ddlRecordVersion.setDisplayIndex(displayIndex);
425            }
426    
427            /**
428            * Returns the status of this d d l record version.
429            *
430            * @return the status of this d d l record version
431            */
432            @Override
433            public int getStatus() {
434                    return _ddlRecordVersion.getStatus();
435            }
436    
437            /**
438            * Sets the status of this d d l record version.
439            *
440            * @param status the status of this d d l record version
441            */
442            @Override
443            public void setStatus(int status) {
444                    _ddlRecordVersion.setStatus(status);
445            }
446    
447            /**
448            * Returns the status by user ID of this d d l record version.
449            *
450            * @return the status by user ID of this d d l record version
451            */
452            @Override
453            public long getStatusByUserId() {
454                    return _ddlRecordVersion.getStatusByUserId();
455            }
456    
457            /**
458            * Sets the status by user ID of this d d l record version.
459            *
460            * @param statusByUserId the status by user ID of this d d l record version
461            */
462            @Override
463            public void setStatusByUserId(long statusByUserId) {
464                    _ddlRecordVersion.setStatusByUserId(statusByUserId);
465            }
466    
467            /**
468            * Returns the status by user uuid of this d d l record version.
469            *
470            * @return the status by user uuid of this d d l record version
471            * @throws SystemException if a system exception occurred
472            */
473            @Override
474            public java.lang.String getStatusByUserUuid()
475                    throws com.liferay.portal.kernel.exception.SystemException {
476                    return _ddlRecordVersion.getStatusByUserUuid();
477            }
478    
479            /**
480            * Sets the status by user uuid of this d d l record version.
481            *
482            * @param statusByUserUuid the status by user uuid of this d d l record version
483            */
484            @Override
485            public void setStatusByUserUuid(java.lang.String statusByUserUuid) {
486                    _ddlRecordVersion.setStatusByUserUuid(statusByUserUuid);
487            }
488    
489            /**
490            * Returns the status by user name of this d d l record version.
491            *
492            * @return the status by user name of this d d l record version
493            */
494            @Override
495            public java.lang.String getStatusByUserName() {
496                    return _ddlRecordVersion.getStatusByUserName();
497            }
498    
499            /**
500            * Sets the status by user name of this d d l record version.
501            *
502            * @param statusByUserName the status by user name of this d d l record version
503            */
504            @Override
505            public void setStatusByUserName(java.lang.String statusByUserName) {
506                    _ddlRecordVersion.setStatusByUserName(statusByUserName);
507            }
508    
509            /**
510            * Returns the status date of this d d l record version.
511            *
512            * @return the status date of this d d l record version
513            */
514            @Override
515            public java.util.Date getStatusDate() {
516                    return _ddlRecordVersion.getStatusDate();
517            }
518    
519            /**
520            * Sets the status date of this d d l record version.
521            *
522            * @param statusDate the status date of this d d l record version
523            */
524            @Override
525            public void setStatusDate(java.util.Date statusDate) {
526                    _ddlRecordVersion.setStatusDate(statusDate);
527            }
528    
529            /**
530            * @deprecated As of 6.1.0, replaced by {@link #isApproved()}
531            */
532            @Override
533            public boolean getApproved() {
534                    return _ddlRecordVersion.getApproved();
535            }
536    
537            /**
538            * Returns <code>true</code> if this d d l record version is approved.
539            *
540            * @return <code>true</code> if this d d l record version is approved; <code>false</code> otherwise
541            */
542            @Override
543            public boolean isApproved() {
544                    return _ddlRecordVersion.isApproved();
545            }
546    
547            /**
548            * Returns <code>true</code> if this d d l record version is denied.
549            *
550            * @return <code>true</code> if this d d l record version is denied; <code>false</code> otherwise
551            */
552            @Override
553            public boolean isDenied() {
554                    return _ddlRecordVersion.isDenied();
555            }
556    
557            /**
558            * Returns <code>true</code> if this d d l record version is a draft.
559            *
560            * @return <code>true</code> if this d d l record version is a draft; <code>false</code> otherwise
561            */
562            @Override
563            public boolean isDraft() {
564                    return _ddlRecordVersion.isDraft();
565            }
566    
567            /**
568            * Returns <code>true</code> if this d d l record version is expired.
569            *
570            * @return <code>true</code> if this d d l record version is expired; <code>false</code> otherwise
571            */
572            @Override
573            public boolean isExpired() {
574                    return _ddlRecordVersion.isExpired();
575            }
576    
577            /**
578            * Returns <code>true</code> if this d d l record version is inactive.
579            *
580            * @return <code>true</code> if this d d l record version is inactive; <code>false</code> otherwise
581            */
582            @Override
583            public boolean isInactive() {
584                    return _ddlRecordVersion.isInactive();
585            }
586    
587            /**
588            * Returns <code>true</code> if this d d l record version is incomplete.
589            *
590            * @return <code>true</code> if this d d l record version is incomplete; <code>false</code> otherwise
591            */
592            @Override
593            public boolean isIncomplete() {
594                    return _ddlRecordVersion.isIncomplete();
595            }
596    
597            /**
598            * Returns <code>true</code> if this d d l record version is in the Recycle Bin.
599            *
600            * @return <code>true</code> if this d d l record version is in the Recycle Bin; <code>false</code> otherwise
601            */
602            @Override
603            public boolean isInTrash() {
604                    return _ddlRecordVersion.isInTrash();
605            }
606    
607            /**
608            * Returns <code>true</code> if this d d l record version is pending.
609            *
610            * @return <code>true</code> if this d d l record version is pending; <code>false</code> otherwise
611            */
612            @Override
613            public boolean isPending() {
614                    return _ddlRecordVersion.isPending();
615            }
616    
617            /**
618            * Returns <code>true</code> if this d d l record version is scheduled.
619            *
620            * @return <code>true</code> if this d d l record version is scheduled; <code>false</code> otherwise
621            */
622            @Override
623            public boolean isScheduled() {
624                    return _ddlRecordVersion.isScheduled();
625            }
626    
627            @Override
628            public boolean isNew() {
629                    return _ddlRecordVersion.isNew();
630            }
631    
632            @Override
633            public void setNew(boolean n) {
634                    _ddlRecordVersion.setNew(n);
635            }
636    
637            @Override
638            public boolean isCachedModel() {
639                    return _ddlRecordVersion.isCachedModel();
640            }
641    
642            @Override
643            public void setCachedModel(boolean cachedModel) {
644                    _ddlRecordVersion.setCachedModel(cachedModel);
645            }
646    
647            @Override
648            public boolean isEscapedModel() {
649                    return _ddlRecordVersion.isEscapedModel();
650            }
651    
652            @Override
653            public java.io.Serializable getPrimaryKeyObj() {
654                    return _ddlRecordVersion.getPrimaryKeyObj();
655            }
656    
657            @Override
658            public void setPrimaryKeyObj(java.io.Serializable primaryKeyObj) {
659                    _ddlRecordVersion.setPrimaryKeyObj(primaryKeyObj);
660            }
661    
662            @Override
663            public com.liferay.portlet.expando.model.ExpandoBridge getExpandoBridge() {
664                    return _ddlRecordVersion.getExpandoBridge();
665            }
666    
667            @Override
668            public void setExpandoBridgeAttributes(
669                    com.liferay.portal.model.BaseModel<?> baseModel) {
670                    _ddlRecordVersion.setExpandoBridgeAttributes(baseModel);
671            }
672    
673            @Override
674            public void setExpandoBridgeAttributes(
675                    com.liferay.portlet.expando.model.ExpandoBridge expandoBridge) {
676                    _ddlRecordVersion.setExpandoBridgeAttributes(expandoBridge);
677            }
678    
679            @Override
680            public void setExpandoBridgeAttributes(
681                    com.liferay.portal.service.ServiceContext serviceContext) {
682                    _ddlRecordVersion.setExpandoBridgeAttributes(serviceContext);
683            }
684    
685            @Override
686            public java.lang.Object clone() {
687                    return new DDLRecordVersionWrapper((DDLRecordVersion)_ddlRecordVersion.clone());
688            }
689    
690            @Override
691            public int compareTo(
692                    com.liferay.portlet.dynamicdatalists.model.DDLRecordVersion ddlRecordVersion) {
693                    return _ddlRecordVersion.compareTo(ddlRecordVersion);
694            }
695    
696            @Override
697            public int hashCode() {
698                    return _ddlRecordVersion.hashCode();
699            }
700    
701            @Override
702            public com.liferay.portal.model.CacheModel<com.liferay.portlet.dynamicdatalists.model.DDLRecordVersion> toCacheModel() {
703                    return _ddlRecordVersion.toCacheModel();
704            }
705    
706            @Override
707            public com.liferay.portlet.dynamicdatalists.model.DDLRecordVersion toEscapedModel() {
708                    return new DDLRecordVersionWrapper(_ddlRecordVersion.toEscapedModel());
709            }
710    
711            @Override
712            public com.liferay.portlet.dynamicdatalists.model.DDLRecordVersion toUnescapedModel() {
713                    return new DDLRecordVersionWrapper(_ddlRecordVersion.toUnescapedModel());
714            }
715    
716            @Override
717            public java.lang.String toString() {
718                    return _ddlRecordVersion.toString();
719            }
720    
721            @Override
722            public java.lang.String toXmlString() {
723                    return _ddlRecordVersion.toXmlString();
724            }
725    
726            @Override
727            public com.liferay.portlet.dynamicdatalists.model.DDLRecord getRecord()
728                    throws com.liferay.portal.kernel.exception.PortalException,
729                            com.liferay.portal.kernel.exception.SystemException {
730                    return _ddlRecordVersion.getRecord();
731            }
732    
733            @Override
734            public com.liferay.portlet.dynamicdatalists.model.DDLRecordSet getRecordSet()
735                    throws com.liferay.portal.kernel.exception.PortalException,
736                            com.liferay.portal.kernel.exception.SystemException {
737                    return _ddlRecordVersion.getRecordSet();
738            }
739    
740            @Override
741            public boolean equals(Object obj) {
742                    if (this == obj) {
743                            return true;
744                    }
745    
746                    if (!(obj instanceof DDLRecordVersionWrapper)) {
747                            return false;
748                    }
749    
750                    DDLRecordVersionWrapper ddlRecordVersionWrapper = (DDLRecordVersionWrapper)obj;
751    
752                    if (Validator.equals(_ddlRecordVersion,
753                                            ddlRecordVersionWrapper._ddlRecordVersion)) {
754                            return true;
755                    }
756    
757                    return false;
758            }
759    
760            /**
761             * @deprecated As of 6.1.0, replaced by {@link #getWrappedModel}
762             */
763            public DDLRecordVersion getWrappedDDLRecordVersion() {
764                    return _ddlRecordVersion;
765            }
766    
767            @Override
768            public DDLRecordVersion getWrappedModel() {
769                    return _ddlRecordVersion;
770            }
771    
772            @Override
773            public void resetOriginalValues() {
774                    _ddlRecordVersion.resetOriginalValues();
775            }
776    
777            private DDLRecordVersion _ddlRecordVersion;
778    }