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