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