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