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