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.documentlibrary.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 DLSync}.
027     * </p>
028     *
029     * @author    Brian Wing Shun Chan
030     * @see       DLSync
031     * @generated
032     */
033    public class DLSyncWrapper implements DLSync, ModelWrapper<DLSync> {
034            public DLSyncWrapper(DLSync dlSync) {
035                    _dlSync = dlSync;
036            }
037    
038            public Class<?> getModelClass() {
039                    return DLSync.class;
040            }
041    
042            public String getModelClassName() {
043                    return DLSync.class.getName();
044            }
045    
046            public Map<String, Object> getModelAttributes() {
047                    Map<String, Object> attributes = new HashMap<String, Object>();
048    
049                    attributes.put("syncId", getSyncId());
050                    attributes.put("companyId", getCompanyId());
051                    attributes.put("createDate", getCreateDate());
052                    attributes.put("modifiedDate", getModifiedDate());
053                    attributes.put("fileId", getFileId());
054                    attributes.put("fileUuid", getFileUuid());
055                    attributes.put("repositoryId", getRepositoryId());
056                    attributes.put("parentFolderId", getParentFolderId());
057                    attributes.put("name", getName());
058                    attributes.put("description", getDescription());
059                    attributes.put("event", getEvent());
060                    attributes.put("type", getType());
061                    attributes.put("version", getVersion());
062    
063                    return attributes;
064            }
065    
066            public void setModelAttributes(Map<String, Object> attributes) {
067                    Long syncId = (Long)attributes.get("syncId");
068    
069                    if (syncId != null) {
070                            setSyncId(syncId);
071                    }
072    
073                    Long companyId = (Long)attributes.get("companyId");
074    
075                    if (companyId != null) {
076                            setCompanyId(companyId);
077                    }
078    
079                    Date createDate = (Date)attributes.get("createDate");
080    
081                    if (createDate != null) {
082                            setCreateDate(createDate);
083                    }
084    
085                    Date modifiedDate = (Date)attributes.get("modifiedDate");
086    
087                    if (modifiedDate != null) {
088                            setModifiedDate(modifiedDate);
089                    }
090    
091                    Long fileId = (Long)attributes.get("fileId");
092    
093                    if (fileId != null) {
094                            setFileId(fileId);
095                    }
096    
097                    String fileUuid = (String)attributes.get("fileUuid");
098    
099                    if (fileUuid != null) {
100                            setFileUuid(fileUuid);
101                    }
102    
103                    Long repositoryId = (Long)attributes.get("repositoryId");
104    
105                    if (repositoryId != null) {
106                            setRepositoryId(repositoryId);
107                    }
108    
109                    Long parentFolderId = (Long)attributes.get("parentFolderId");
110    
111                    if (parentFolderId != null) {
112                            setParentFolderId(parentFolderId);
113                    }
114    
115                    String name = (String)attributes.get("name");
116    
117                    if (name != null) {
118                            setName(name);
119                    }
120    
121                    String description = (String)attributes.get("description");
122    
123                    if (description != null) {
124                            setDescription(description);
125                    }
126    
127                    String event = (String)attributes.get("event");
128    
129                    if (event != null) {
130                            setEvent(event);
131                    }
132    
133                    String type = (String)attributes.get("type");
134    
135                    if (type != null) {
136                            setType(type);
137                    }
138    
139                    String version = (String)attributes.get("version");
140    
141                    if (version != null) {
142                            setVersion(version);
143                    }
144            }
145    
146            /**
147            * Returns the primary key of this d l sync.
148            *
149            * @return the primary key of this d l sync
150            */
151            public long getPrimaryKey() {
152                    return _dlSync.getPrimaryKey();
153            }
154    
155            /**
156            * Sets the primary key of this d l sync.
157            *
158            * @param primaryKey the primary key of this d l sync
159            */
160            public void setPrimaryKey(long primaryKey) {
161                    _dlSync.setPrimaryKey(primaryKey);
162            }
163    
164            /**
165            * Returns the sync ID of this d l sync.
166            *
167            * @return the sync ID of this d l sync
168            */
169            public long getSyncId() {
170                    return _dlSync.getSyncId();
171            }
172    
173            /**
174            * Sets the sync ID of this d l sync.
175            *
176            * @param syncId the sync ID of this d l sync
177            */
178            public void setSyncId(long syncId) {
179                    _dlSync.setSyncId(syncId);
180            }
181    
182            /**
183            * Returns the company ID of this d l sync.
184            *
185            * @return the company ID of this d l sync
186            */
187            public long getCompanyId() {
188                    return _dlSync.getCompanyId();
189            }
190    
191            /**
192            * Sets the company ID of this d l sync.
193            *
194            * @param companyId the company ID of this d l sync
195            */
196            public void setCompanyId(long companyId) {
197                    _dlSync.setCompanyId(companyId);
198            }
199    
200            /**
201            * Returns the create date of this d l sync.
202            *
203            * @return the create date of this d l sync
204            */
205            public java.util.Date getCreateDate() {
206                    return _dlSync.getCreateDate();
207            }
208    
209            /**
210            * Sets the create date of this d l sync.
211            *
212            * @param createDate the create date of this d l sync
213            */
214            public void setCreateDate(java.util.Date createDate) {
215                    _dlSync.setCreateDate(createDate);
216            }
217    
218            /**
219            * Returns the modified date of this d l sync.
220            *
221            * @return the modified date of this d l sync
222            */
223            public java.util.Date getModifiedDate() {
224                    return _dlSync.getModifiedDate();
225            }
226    
227            /**
228            * Sets the modified date of this d l sync.
229            *
230            * @param modifiedDate the modified date of this d l sync
231            */
232            public void setModifiedDate(java.util.Date modifiedDate) {
233                    _dlSync.setModifiedDate(modifiedDate);
234            }
235    
236            /**
237            * Returns the file ID of this d l sync.
238            *
239            * @return the file ID of this d l sync
240            */
241            public long getFileId() {
242                    return _dlSync.getFileId();
243            }
244    
245            /**
246            * Sets the file ID of this d l sync.
247            *
248            * @param fileId the file ID of this d l sync
249            */
250            public void setFileId(long fileId) {
251                    _dlSync.setFileId(fileId);
252            }
253    
254            /**
255            * Returns the file uuid of this d l sync.
256            *
257            * @return the file uuid of this d l sync
258            */
259            public java.lang.String getFileUuid() {
260                    return _dlSync.getFileUuid();
261            }
262    
263            /**
264            * Sets the file uuid of this d l sync.
265            *
266            * @param fileUuid the file uuid of this d l sync
267            */
268            public void setFileUuid(java.lang.String fileUuid) {
269                    _dlSync.setFileUuid(fileUuid);
270            }
271    
272            /**
273            * Returns the repository ID of this d l sync.
274            *
275            * @return the repository ID of this d l sync
276            */
277            public long getRepositoryId() {
278                    return _dlSync.getRepositoryId();
279            }
280    
281            /**
282            * Sets the repository ID of this d l sync.
283            *
284            * @param repositoryId the repository ID of this d l sync
285            */
286            public void setRepositoryId(long repositoryId) {
287                    _dlSync.setRepositoryId(repositoryId);
288            }
289    
290            /**
291            * Returns the parent folder ID of this d l sync.
292            *
293            * @return the parent folder ID of this d l sync
294            */
295            public long getParentFolderId() {
296                    return _dlSync.getParentFolderId();
297            }
298    
299            /**
300            * Sets the parent folder ID of this d l sync.
301            *
302            * @param parentFolderId the parent folder ID of this d l sync
303            */
304            public void setParentFolderId(long parentFolderId) {
305                    _dlSync.setParentFolderId(parentFolderId);
306            }
307    
308            /**
309            * Returns the name of this d l sync.
310            *
311            * @return the name of this d l sync
312            */
313            public java.lang.String getName() {
314                    return _dlSync.getName();
315            }
316    
317            /**
318            * Sets the name of this d l sync.
319            *
320            * @param name the name of this d l sync
321            */
322            public void setName(java.lang.String name) {
323                    _dlSync.setName(name);
324            }
325    
326            /**
327            * Returns the description of this d l sync.
328            *
329            * @return the description of this d l sync
330            */
331            public java.lang.String getDescription() {
332                    return _dlSync.getDescription();
333            }
334    
335            /**
336            * Sets the description of this d l sync.
337            *
338            * @param description the description of this d l sync
339            */
340            public void setDescription(java.lang.String description) {
341                    _dlSync.setDescription(description);
342            }
343    
344            /**
345            * Returns the event of this d l sync.
346            *
347            * @return the event of this d l sync
348            */
349            public java.lang.String getEvent() {
350                    return _dlSync.getEvent();
351            }
352    
353            /**
354            * Sets the event of this d l sync.
355            *
356            * @param event the event of this d l sync
357            */
358            public void setEvent(java.lang.String event) {
359                    _dlSync.setEvent(event);
360            }
361    
362            /**
363            * Returns the type of this d l sync.
364            *
365            * @return the type of this d l sync
366            */
367            public java.lang.String getType() {
368                    return _dlSync.getType();
369            }
370    
371            /**
372            * Sets the type of this d l sync.
373            *
374            * @param type the type of this d l sync
375            */
376            public void setType(java.lang.String type) {
377                    _dlSync.setType(type);
378            }
379    
380            /**
381            * Returns the version of this d l sync.
382            *
383            * @return the version of this d l sync
384            */
385            public java.lang.String getVersion() {
386                    return _dlSync.getVersion();
387            }
388    
389            /**
390            * Sets the version of this d l sync.
391            *
392            * @param version the version of this d l sync
393            */
394            public void setVersion(java.lang.String version) {
395                    _dlSync.setVersion(version);
396            }
397    
398            public boolean isNew() {
399                    return _dlSync.isNew();
400            }
401    
402            public void setNew(boolean n) {
403                    _dlSync.setNew(n);
404            }
405    
406            public boolean isCachedModel() {
407                    return _dlSync.isCachedModel();
408            }
409    
410            public void setCachedModel(boolean cachedModel) {
411                    _dlSync.setCachedModel(cachedModel);
412            }
413    
414            public boolean isEscapedModel() {
415                    return _dlSync.isEscapedModel();
416            }
417    
418            public java.io.Serializable getPrimaryKeyObj() {
419                    return _dlSync.getPrimaryKeyObj();
420            }
421    
422            public void setPrimaryKeyObj(java.io.Serializable primaryKeyObj) {
423                    _dlSync.setPrimaryKeyObj(primaryKeyObj);
424            }
425    
426            public com.liferay.portlet.expando.model.ExpandoBridge getExpandoBridge() {
427                    return _dlSync.getExpandoBridge();
428            }
429    
430            public void setExpandoBridgeAttributes(
431                    com.liferay.portal.service.ServiceContext serviceContext) {
432                    _dlSync.setExpandoBridgeAttributes(serviceContext);
433            }
434    
435            @Override
436            public java.lang.Object clone() {
437                    return new DLSyncWrapper((DLSync)_dlSync.clone());
438            }
439    
440            public int compareTo(
441                    com.liferay.portlet.documentlibrary.model.DLSync dlSync) {
442                    return _dlSync.compareTo(dlSync);
443            }
444    
445            @Override
446            public int hashCode() {
447                    return _dlSync.hashCode();
448            }
449    
450            public com.liferay.portal.model.CacheModel<com.liferay.portlet.documentlibrary.model.DLSync> toCacheModel() {
451                    return _dlSync.toCacheModel();
452            }
453    
454            public com.liferay.portlet.documentlibrary.model.DLSync toEscapedModel() {
455                    return new DLSyncWrapper(_dlSync.toEscapedModel());
456            }
457    
458            public com.liferay.portlet.documentlibrary.model.DLSync toUnescapedModel() {
459                    return new DLSyncWrapper(_dlSync.toUnescapedModel());
460            }
461    
462            @Override
463            public java.lang.String toString() {
464                    return _dlSync.toString();
465            }
466    
467            public java.lang.String toXmlString() {
468                    return _dlSync.toXmlString();
469            }
470    
471            public void persist()
472                    throws com.liferay.portal.kernel.exception.SystemException {
473                    _dlSync.persist();
474            }
475    
476            @Override
477            public boolean equals(Object obj) {
478                    if (this == obj) {
479                            return true;
480                    }
481    
482                    if (!(obj instanceof DLSyncWrapper)) {
483                            return false;
484                    }
485    
486                    DLSyncWrapper dlSyncWrapper = (DLSyncWrapper)obj;
487    
488                    if (Validator.equals(_dlSync, dlSyncWrapper._dlSync)) {
489                            return true;
490                    }
491    
492                    return false;
493            }
494    
495            /**
496             * @deprecated Renamed to {@link #getWrappedModel}
497             */
498            public DLSync getWrappedDLSync() {
499                    return _dlSync;
500            }
501    
502            public DLSync getWrappedModel() {
503                    return _dlSync;
504            }
505    
506            public void resetOriginalValues() {
507                    _dlSync.resetOriginalValues();
508            }
509    
510            private DLSync _dlSync;
511    }