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 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            /**
169            * Returns the primary key of this d d l record version.
170            *
171            * @return the primary key of this d d l record version
172            */
173            @Override
174            public long getPrimaryKey() {
175                    return _ddlRecordVersion.getPrimaryKey();
176            }
177    
178            /**
179            * Sets the primary key of this d d l record version.
180            *
181            * @param primaryKey the primary key of this d d l record version
182            */
183            @Override
184            public void setPrimaryKey(long primaryKey) {
185                    _ddlRecordVersion.setPrimaryKey(primaryKey);
186            }
187    
188            /**
189            * Returns the record version ID of this d d l record version.
190            *
191            * @return the record version ID of this d d l record version
192            */
193            @Override
194            public long getRecordVersionId() {
195                    return _ddlRecordVersion.getRecordVersionId();
196            }
197    
198            /**
199            * Sets the record version ID of this d d l record version.
200            *
201            * @param recordVersionId the record version ID of this d d l record version
202            */
203            @Override
204            public void setRecordVersionId(long recordVersionId) {
205                    _ddlRecordVersion.setRecordVersionId(recordVersionId);
206            }
207    
208            /**
209            * Returns the group ID of this d d l record version.
210            *
211            * @return the group ID of this d d l record version
212            */
213            @Override
214            public long getGroupId() {
215                    return _ddlRecordVersion.getGroupId();
216            }
217    
218            /**
219            * Sets the group ID of this d d l record version.
220            *
221            * @param groupId the group ID of this d d l record version
222            */
223            @Override
224            public void setGroupId(long groupId) {
225                    _ddlRecordVersion.setGroupId(groupId);
226            }
227    
228            /**
229            * Returns the company ID of this d d l record version.
230            *
231            * @return the company ID of this d d l record version
232            */
233            @Override
234            public long getCompanyId() {
235                    return _ddlRecordVersion.getCompanyId();
236            }
237    
238            /**
239            * Sets the company ID of this d d l record version.
240            *
241            * @param companyId the company ID of this d d l record version
242            */
243            @Override
244            public void setCompanyId(long companyId) {
245                    _ddlRecordVersion.setCompanyId(companyId);
246            }
247    
248            /**
249            * Returns the user ID of this d d l record version.
250            *
251            * @return the user ID of this d d l record version
252            */
253            @Override
254            public long getUserId() {
255                    return _ddlRecordVersion.getUserId();
256            }
257    
258            /**
259            * Sets the user ID of this d d l record version.
260            *
261            * @param userId the user ID of this d d l record version
262            */
263            @Override
264            public void setUserId(long userId) {
265                    _ddlRecordVersion.setUserId(userId);
266            }
267    
268            /**
269            * Returns the user uuid of this d d l record version.
270            *
271            * @return the user uuid of this d d l record version
272            * @throws SystemException if a system exception occurred
273            */
274            @Override
275            public java.lang.String getUserUuid()
276                    throws com.liferay.portal.kernel.exception.SystemException {
277                    return _ddlRecordVersion.getUserUuid();
278            }
279    
280            /**
281            * Sets the user uuid of this d d l record version.
282            *
283            * @param userUuid the user uuid of this d d l record version
284            */
285            @Override
286            public void setUserUuid(java.lang.String userUuid) {
287                    _ddlRecordVersion.setUserUuid(userUuid);
288            }
289    
290            /**
291            * Returns the user name of this d d l record version.
292            *
293            * @return the user name of this d d l record version
294            */
295            @Override
296            public java.lang.String getUserName() {
297                    return _ddlRecordVersion.getUserName();
298            }
299    
300            /**
301            * Sets the user name of this d d l record version.
302            *
303            * @param userName the user name of this d d l record version
304            */
305            @Override
306            public void setUserName(java.lang.String userName) {
307                    _ddlRecordVersion.setUserName(userName);
308            }
309    
310            /**
311            * Returns the create date of this d d l record version.
312            *
313            * @return the create date of this d d l record version
314            */
315            @Override
316            public java.util.Date getCreateDate() {
317                    return _ddlRecordVersion.getCreateDate();
318            }
319    
320            /**
321            * Sets the create date of this d d l record version.
322            *
323            * @param createDate the create date of this d d l record version
324            */
325            @Override
326            public void setCreateDate(java.util.Date createDate) {
327                    _ddlRecordVersion.setCreateDate(createDate);
328            }
329    
330            /**
331            * Returns the d d m storage ID of this d d l record version.
332            *
333            * @return the d d m storage ID of this d d l record version
334            */
335            @Override
336            public long getDDMStorageId() {
337                    return _ddlRecordVersion.getDDMStorageId();
338            }
339    
340            /**
341            * Sets the d d m storage ID of this d d l record version.
342            *
343            * @param DDMStorageId the d d m storage ID of this d d l record version
344            */
345            @Override
346            public void setDDMStorageId(long DDMStorageId) {
347                    _ddlRecordVersion.setDDMStorageId(DDMStorageId);
348            }
349    
350            /**
351            * Returns the record set ID of this d d l record version.
352            *
353            * @return the record set ID of this d d l record version
354            */
355            @Override
356            public long getRecordSetId() {
357                    return _ddlRecordVersion.getRecordSetId();
358            }
359    
360            /**
361            * Sets the record set ID of this d d l record version.
362            *
363            * @param recordSetId the record set ID of this d d l record version
364            */
365            @Override
366            public void setRecordSetId(long recordSetId) {
367                    _ddlRecordVersion.setRecordSetId(recordSetId);
368            }
369    
370            /**
371            * Returns the record ID of this d d l record version.
372            *
373            * @return the record ID of this d d l record version
374            */
375            @Override
376            public long getRecordId() {
377                    return _ddlRecordVersion.getRecordId();
378            }
379    
380            /**
381            * Sets the record ID of this d d l record version.
382            *
383            * @param recordId the record ID of this d d l record version
384            */
385            @Override
386            public void setRecordId(long recordId) {
387                    _ddlRecordVersion.setRecordId(recordId);
388            }
389    
390            /**
391            * Returns the version of this d d l record version.
392            *
393            * @return the version of this d d l record version
394            */
395            @Override
396            public java.lang.String getVersion() {
397                    return _ddlRecordVersion.getVersion();
398            }
399    
400            /**
401            * Sets the version of this d d l record version.
402            *
403            * @param version the version of this d d l record version
404            */
405            @Override
406            public void setVersion(java.lang.String version) {
407                    _ddlRecordVersion.setVersion(version);
408            }
409    
410            /**
411            * Returns the display index of this d d l record version.
412            *
413            * @return the display index of this d d l record version
414            */
415            @Override
416            public int getDisplayIndex() {
417                    return _ddlRecordVersion.getDisplayIndex();
418            }
419    
420            /**
421            * Sets the display index of this d d l record version.
422            *
423            * @param displayIndex the display index of this d d l record version
424            */
425            @Override
426            public void setDisplayIndex(int displayIndex) {
427                    _ddlRecordVersion.setDisplayIndex(displayIndex);
428            }
429    
430            /**
431            * Returns the status of this d d l record version.
432            *
433            * @return the status of this d d l record version
434            */
435            @Override
436            public int getStatus() {
437                    return _ddlRecordVersion.getStatus();
438            }
439    
440            /**
441            * Sets the status of this d d l record version.
442            *
443            * @param status the status of this d d l record version
444            */
445            @Override
446            public void setStatus(int status) {
447                    _ddlRecordVersion.setStatus(status);
448            }
449    
450            /**
451            * Returns the status by user ID of this d d l record version.
452            *
453            * @return the status by user ID of this d d l record version
454            */
455            @Override
456            public long getStatusByUserId() {
457                    return _ddlRecordVersion.getStatusByUserId();
458            }
459    
460            /**
461            * Sets the status by user ID of this d d l record version.
462            *
463            * @param statusByUserId the status by user ID of this d d l record version
464            */
465            @Override
466            public void setStatusByUserId(long statusByUserId) {
467                    _ddlRecordVersion.setStatusByUserId(statusByUserId);
468            }
469    
470            /**
471            * Returns the status by user uuid of this d d l record version.
472            *
473            * @return the status by user uuid of this d d l record version
474            * @throws SystemException if a system exception occurred
475            */
476            @Override
477            public java.lang.String getStatusByUserUuid()
478                    throws com.liferay.portal.kernel.exception.SystemException {
479                    return _ddlRecordVersion.getStatusByUserUuid();
480            }
481    
482            /**
483            * Sets the status by user uuid of this d d l record version.
484            *
485            * @param statusByUserUuid the status by user uuid of this d d l record version
486            */
487            @Override
488            public void setStatusByUserUuid(java.lang.String statusByUserUuid) {
489                    _ddlRecordVersion.setStatusByUserUuid(statusByUserUuid);
490            }
491    
492            /**
493            * Returns the status by user name of this d d l record version.
494            *
495            * @return the status by user name of this d d l record version
496            */
497            @Override
498            public java.lang.String getStatusByUserName() {
499                    return _ddlRecordVersion.getStatusByUserName();
500            }
501    
502            /**
503            * Sets the status by user name of this d d l record version.
504            *
505            * @param statusByUserName the status by user name of this d d l record version
506            */
507            @Override
508            public void setStatusByUserName(java.lang.String statusByUserName) {
509                    _ddlRecordVersion.setStatusByUserName(statusByUserName);
510            }
511    
512            /**
513            * Returns the status date of this d d l record version.
514            *
515            * @return the status date of this d d l record version
516            */
517            @Override
518            public java.util.Date getStatusDate() {
519                    return _ddlRecordVersion.getStatusDate();
520            }
521    
522            /**
523            * Sets the status date of this d d l record version.
524            *
525            * @param statusDate the status date of this d d l record version
526            */
527            @Override
528            public void setStatusDate(java.util.Date statusDate) {
529                    _ddlRecordVersion.setStatusDate(statusDate);
530            }
531    
532            /**
533            * @deprecated As of 6.1.0, replaced by {@link #isApproved()}
534            */
535            @Override
536            public boolean getApproved() {
537                    return _ddlRecordVersion.getApproved();
538            }
539    
540            /**
541            * Returns <code>true</code> if this d d l record version is approved.
542            *
543            * @return <code>true</code> if this d d l record version is approved; <code>false</code> otherwise
544            */
545            @Override
546            public boolean isApproved() {
547                    return _ddlRecordVersion.isApproved();
548            }
549    
550            /**
551            * Returns <code>true</code> if this d d l record version is denied.
552            *
553            * @return <code>true</code> if this d d l record version is denied; <code>false</code> otherwise
554            */
555            @Override
556            public boolean isDenied() {
557                    return _ddlRecordVersion.isDenied();
558            }
559    
560            /**
561            * Returns <code>true</code> if this d d l record version is a draft.
562            *
563            * @return <code>true</code> if this d d l record version is a draft; <code>false</code> otherwise
564            */
565            @Override
566            public boolean isDraft() {
567                    return _ddlRecordVersion.isDraft();
568            }
569    
570            /**
571            * Returns <code>true</code> if this d d l record version is expired.
572            *
573            * @return <code>true</code> if this d d l record version is expired; <code>false</code> otherwise
574            */
575            @Override
576            public boolean isExpired() {
577                    return _ddlRecordVersion.isExpired();
578            }
579    
580            /**
581            * Returns <code>true</code> if this d d l record version is inactive.
582            *
583            * @return <code>true</code> if this d d l record version is inactive; <code>false</code> otherwise
584            */
585            @Override
586            public boolean isInactive() {
587                    return _ddlRecordVersion.isInactive();
588            }
589    
590            /**
591            * Returns <code>true</code> if this d d l record version is incomplete.
592            *
593            * @return <code>true</code> if this d d l record version is incomplete; <code>false</code> otherwise
594            */
595            @Override
596            public boolean isIncomplete() {
597                    return _ddlRecordVersion.isIncomplete();
598            }
599    
600            /**
601            * Returns <code>true</code> if this d d l record version is pending.
602            *
603            * @return <code>true</code> if this d d l record version is pending; <code>false</code> otherwise
604            */
605            @Override
606            public boolean isPending() {
607                    return _ddlRecordVersion.isPending();
608            }
609    
610            /**
611            * Returns <code>true</code> if this d d l record version is scheduled.
612            *
613            * @return <code>true</code> if this d d l record version is scheduled; <code>false</code> otherwise
614            */
615            @Override
616            public boolean isScheduled() {
617                    return _ddlRecordVersion.isScheduled();
618            }
619    
620            @Override
621            public boolean isNew() {
622                    return _ddlRecordVersion.isNew();
623            }
624    
625            @Override
626            public void setNew(boolean n) {
627                    _ddlRecordVersion.setNew(n);
628            }
629    
630            @Override
631            public boolean isCachedModel() {
632                    return _ddlRecordVersion.isCachedModel();
633            }
634    
635            @Override
636            public void setCachedModel(boolean cachedModel) {
637                    _ddlRecordVersion.setCachedModel(cachedModel);
638            }
639    
640            @Override
641            public boolean isEscapedModel() {
642                    return _ddlRecordVersion.isEscapedModel();
643            }
644    
645            @Override
646            public java.io.Serializable getPrimaryKeyObj() {
647                    return _ddlRecordVersion.getPrimaryKeyObj();
648            }
649    
650            @Override
651            public void setPrimaryKeyObj(java.io.Serializable primaryKeyObj) {
652                    _ddlRecordVersion.setPrimaryKeyObj(primaryKeyObj);
653            }
654    
655            @Override
656            public com.liferay.portlet.expando.model.ExpandoBridge getExpandoBridge() {
657                    return _ddlRecordVersion.getExpandoBridge();
658            }
659    
660            @Override
661            public void setExpandoBridgeAttributes(
662                    com.liferay.portal.model.BaseModel<?> baseModel) {
663                    _ddlRecordVersion.setExpandoBridgeAttributes(baseModel);
664            }
665    
666            @Override
667            public void setExpandoBridgeAttributes(
668                    com.liferay.portlet.expando.model.ExpandoBridge expandoBridge) {
669                    _ddlRecordVersion.setExpandoBridgeAttributes(expandoBridge);
670            }
671    
672            @Override
673            public void setExpandoBridgeAttributes(
674                    com.liferay.portal.service.ServiceContext serviceContext) {
675                    _ddlRecordVersion.setExpandoBridgeAttributes(serviceContext);
676            }
677    
678            @Override
679            public java.lang.Object clone() {
680                    return new DDLRecordVersionWrapper((DDLRecordVersion)_ddlRecordVersion.clone());
681            }
682    
683            @Override
684            public int compareTo(
685                    com.liferay.portlet.dynamicdatalists.model.DDLRecordVersion ddlRecordVersion) {
686                    return _ddlRecordVersion.compareTo(ddlRecordVersion);
687            }
688    
689            @Override
690            public int hashCode() {
691                    return _ddlRecordVersion.hashCode();
692            }
693    
694            @Override
695            public com.liferay.portal.model.CacheModel<com.liferay.portlet.dynamicdatalists.model.DDLRecordVersion> toCacheModel() {
696                    return _ddlRecordVersion.toCacheModel();
697            }
698    
699            @Override
700            public com.liferay.portlet.dynamicdatalists.model.DDLRecordVersion toEscapedModel() {
701                    return new DDLRecordVersionWrapper(_ddlRecordVersion.toEscapedModel());
702            }
703    
704            @Override
705            public com.liferay.portlet.dynamicdatalists.model.DDLRecordVersion toUnescapedModel() {
706                    return new DDLRecordVersionWrapper(_ddlRecordVersion.toUnescapedModel());
707            }
708    
709            @Override
710            public java.lang.String toString() {
711                    return _ddlRecordVersion.toString();
712            }
713    
714            @Override
715            public java.lang.String toXmlString() {
716                    return _ddlRecordVersion.toXmlString();
717            }
718    
719            @Override
720            public com.liferay.portlet.dynamicdatalists.model.DDLRecord getRecord()
721                    throws com.liferay.portal.kernel.exception.PortalException,
722                            com.liferay.portal.kernel.exception.SystemException {
723                    return _ddlRecordVersion.getRecord();
724            }
725    
726            @Override
727            public com.liferay.portlet.dynamicdatalists.model.DDLRecordSet getRecordSet()
728                    throws com.liferay.portal.kernel.exception.PortalException,
729                            com.liferay.portal.kernel.exception.SystemException {
730                    return _ddlRecordVersion.getRecordSet();
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            public DDLRecordVersion getWrappedDDLRecordVersion() {
757                    return _ddlRecordVersion;
758            }
759    
760            @Override
761            public DDLRecordVersion getWrappedModel() {
762                    return _ddlRecordVersion;
763            }
764    
765            @Override
766            public void resetOriginalValues() {
767                    _ddlRecordVersion.resetOriginalValues();
768            }
769    
770            private DDLRecordVersion _ddlRecordVersion;
771    }