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