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