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