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