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    
065                    return attributes;
066            }
067    
068            public void setModelAttributes(Map<String, Object> attributes) {
069                    String uuid = (String)attributes.get("uuid");
070    
071                    if (uuid != null) {
072                            setUuid(uuid);
073                    }
074    
075                    Long entryId = (Long)attributes.get("entryId");
076    
077                    if (entryId != null) {
078                            setEntryId(entryId);
079                    }
080    
081                    Long groupId = (Long)attributes.get("groupId");
082    
083                    if (groupId != null) {
084                            setGroupId(groupId);
085                    }
086    
087                    Long companyId = (Long)attributes.get("companyId");
088    
089                    if (companyId != null) {
090                            setCompanyId(companyId);
091                    }
092    
093                    Long userId = (Long)attributes.get("userId");
094    
095                    if (userId != null) {
096                            setUserId(userId);
097                    }
098    
099                    String userName = (String)attributes.get("userName");
100    
101                    if (userName != null) {
102                            setUserName(userName);
103                    }
104    
105                    Date createDate = (Date)attributes.get("createDate");
106    
107                    if (createDate != null) {
108                            setCreateDate(createDate);
109                    }
110    
111                    Date modifiedDate = (Date)attributes.get("modifiedDate");
112    
113                    if (modifiedDate != null) {
114                            setModifiedDate(modifiedDate);
115                    }
116    
117                    Long resourceBlockId = (Long)attributes.get("resourceBlockId");
118    
119                    if (resourceBlockId != null) {
120                            setResourceBlockId(resourceBlockId);
121                    }
122    
123                    Long folderId = (Long)attributes.get("folderId");
124    
125                    if (folderId != null) {
126                            setFolderId(folderId);
127                    }
128    
129                    String name = (String)attributes.get("name");
130    
131                    if (name != null) {
132                            setName(name);
133                    }
134    
135                    String url = (String)attributes.get("url");
136    
137                    if (url != null) {
138                            setUrl(url);
139                    }
140    
141                    String description = (String)attributes.get("description");
142    
143                    if (description != null) {
144                            setDescription(description);
145                    }
146    
147                    Integer visits = (Integer)attributes.get("visits");
148    
149                    if (visits != null) {
150                            setVisits(visits);
151                    }
152    
153                    Integer priority = (Integer)attributes.get("priority");
154    
155                    if (priority != null) {
156                            setPriority(priority);
157                    }
158            }
159    
160            /**
161            * Returns the primary key of this bookmarks entry.
162            *
163            * @return the primary key of this bookmarks entry
164            */
165            public long getPrimaryKey() {
166                    return _bookmarksEntry.getPrimaryKey();
167            }
168    
169            /**
170            * Sets the primary key of this bookmarks entry.
171            *
172            * @param primaryKey the primary key of this bookmarks entry
173            */
174            public void setPrimaryKey(long primaryKey) {
175                    _bookmarksEntry.setPrimaryKey(primaryKey);
176            }
177    
178            /**
179            * Returns the uuid of this bookmarks entry.
180            *
181            * @return the uuid of this bookmarks entry
182            */
183            public java.lang.String getUuid() {
184                    return _bookmarksEntry.getUuid();
185            }
186    
187            /**
188            * Sets the uuid of this bookmarks entry.
189            *
190            * @param uuid the uuid of this bookmarks entry
191            */
192            public void setUuid(java.lang.String uuid) {
193                    _bookmarksEntry.setUuid(uuid);
194            }
195    
196            /**
197            * Returns the entry ID of this bookmarks entry.
198            *
199            * @return the entry ID of this bookmarks entry
200            */
201            public long getEntryId() {
202                    return _bookmarksEntry.getEntryId();
203            }
204    
205            /**
206            * Sets the entry ID of this bookmarks entry.
207            *
208            * @param entryId the entry ID of this bookmarks entry
209            */
210            public void setEntryId(long entryId) {
211                    _bookmarksEntry.setEntryId(entryId);
212            }
213    
214            /**
215            * Returns the group ID of this bookmarks entry.
216            *
217            * @return the group ID of this bookmarks entry
218            */
219            public long getGroupId() {
220                    return _bookmarksEntry.getGroupId();
221            }
222    
223            /**
224            * Sets the group ID of this bookmarks entry.
225            *
226            * @param groupId the group ID of this bookmarks entry
227            */
228            public void setGroupId(long groupId) {
229                    _bookmarksEntry.setGroupId(groupId);
230            }
231    
232            /**
233            * Returns the company ID of this bookmarks entry.
234            *
235            * @return the company ID of this bookmarks entry
236            */
237            public long getCompanyId() {
238                    return _bookmarksEntry.getCompanyId();
239            }
240    
241            /**
242            * Sets the company ID of this bookmarks entry.
243            *
244            * @param companyId the company ID of this bookmarks entry
245            */
246            public void setCompanyId(long companyId) {
247                    _bookmarksEntry.setCompanyId(companyId);
248            }
249    
250            /**
251            * Returns the user ID of this bookmarks entry.
252            *
253            * @return the user ID of this bookmarks entry
254            */
255            public long getUserId() {
256                    return _bookmarksEntry.getUserId();
257            }
258    
259            /**
260            * Sets the user ID of this bookmarks entry.
261            *
262            * @param userId the user ID of this bookmarks entry
263            */
264            public void setUserId(long userId) {
265                    _bookmarksEntry.setUserId(userId);
266            }
267    
268            /**
269            * Returns the user uuid of this bookmarks entry.
270            *
271            * @return the user uuid of this bookmarks entry
272            * @throws SystemException if a system exception occurred
273            */
274            public java.lang.String getUserUuid()
275                    throws com.liferay.portal.kernel.exception.SystemException {
276                    return _bookmarksEntry.getUserUuid();
277            }
278    
279            /**
280            * Sets the user uuid of this bookmarks entry.
281            *
282            * @param userUuid the user uuid of this bookmarks entry
283            */
284            public void setUserUuid(java.lang.String userUuid) {
285                    _bookmarksEntry.setUserUuid(userUuid);
286            }
287    
288            /**
289            * Returns the user name of this bookmarks entry.
290            *
291            * @return the user name of this bookmarks entry
292            */
293            public java.lang.String getUserName() {
294                    return _bookmarksEntry.getUserName();
295            }
296    
297            /**
298            * Sets the user name of this bookmarks entry.
299            *
300            * @param userName the user name of this bookmarks entry
301            */
302            public void setUserName(java.lang.String userName) {
303                    _bookmarksEntry.setUserName(userName);
304            }
305    
306            /**
307            * Returns the create date of this bookmarks entry.
308            *
309            * @return the create date of this bookmarks entry
310            */
311            public java.util.Date getCreateDate() {
312                    return _bookmarksEntry.getCreateDate();
313            }
314    
315            /**
316            * Sets the create date of this bookmarks entry.
317            *
318            * @param createDate the create date of this bookmarks entry
319            */
320            public void setCreateDate(java.util.Date createDate) {
321                    _bookmarksEntry.setCreateDate(createDate);
322            }
323    
324            /**
325            * Returns the modified date of this bookmarks entry.
326            *
327            * @return the modified date of this bookmarks entry
328            */
329            public java.util.Date getModifiedDate() {
330                    return _bookmarksEntry.getModifiedDate();
331            }
332    
333            /**
334            * Sets the modified date of this bookmarks entry.
335            *
336            * @param modifiedDate the modified date of this bookmarks entry
337            */
338            public void setModifiedDate(java.util.Date modifiedDate) {
339                    _bookmarksEntry.setModifiedDate(modifiedDate);
340            }
341    
342            /**
343            * Returns the resource block ID of this bookmarks entry.
344            *
345            * @return the resource block ID of this bookmarks entry
346            */
347            public long getResourceBlockId() {
348                    return _bookmarksEntry.getResourceBlockId();
349            }
350    
351            /**
352            * Sets the resource block ID of this bookmarks entry.
353            *
354            * @param resourceBlockId the resource block ID of this bookmarks entry
355            */
356            public void setResourceBlockId(long resourceBlockId) {
357                    _bookmarksEntry.setResourceBlockId(resourceBlockId);
358            }
359    
360            /**
361            * Returns the folder ID of this bookmarks entry.
362            *
363            * @return the folder ID of this bookmarks entry
364            */
365            public long getFolderId() {
366                    return _bookmarksEntry.getFolderId();
367            }
368    
369            /**
370            * Sets the folder ID of this bookmarks entry.
371            *
372            * @param folderId the folder ID of this bookmarks entry
373            */
374            public void setFolderId(long folderId) {
375                    _bookmarksEntry.setFolderId(folderId);
376            }
377    
378            /**
379            * Returns the name of this bookmarks entry.
380            *
381            * @return the name of this bookmarks entry
382            */
383            public java.lang.String getName() {
384                    return _bookmarksEntry.getName();
385            }
386    
387            /**
388            * Sets the name of this bookmarks entry.
389            *
390            * @param name the name of this bookmarks entry
391            */
392            public void setName(java.lang.String name) {
393                    _bookmarksEntry.setName(name);
394            }
395    
396            /**
397            * Returns the url of this bookmarks entry.
398            *
399            * @return the url of this bookmarks entry
400            */
401            public java.lang.String getUrl() {
402                    return _bookmarksEntry.getUrl();
403            }
404    
405            /**
406            * Sets the url of this bookmarks entry.
407            *
408            * @param url the url of this bookmarks entry
409            */
410            public void setUrl(java.lang.String url) {
411                    _bookmarksEntry.setUrl(url);
412            }
413    
414            /**
415            * Returns the description of this bookmarks entry.
416            *
417            * @return the description of this bookmarks entry
418            */
419            public java.lang.String getDescription() {
420                    return _bookmarksEntry.getDescription();
421            }
422    
423            /**
424            * Sets the description of this bookmarks entry.
425            *
426            * @param description the description of this bookmarks entry
427            */
428            public void setDescription(java.lang.String description) {
429                    _bookmarksEntry.setDescription(description);
430            }
431    
432            /**
433            * Returns the visits of this bookmarks entry.
434            *
435            * @return the visits of this bookmarks entry
436            */
437            public int getVisits() {
438                    return _bookmarksEntry.getVisits();
439            }
440    
441            /**
442            * Sets the visits of this bookmarks entry.
443            *
444            * @param visits the visits of this bookmarks entry
445            */
446            public void setVisits(int visits) {
447                    _bookmarksEntry.setVisits(visits);
448            }
449    
450            /**
451            * Returns the priority of this bookmarks entry.
452            *
453            * @return the priority of this bookmarks entry
454            */
455            public int getPriority() {
456                    return _bookmarksEntry.getPriority();
457            }
458    
459            /**
460            * Sets the priority of this bookmarks entry.
461            *
462            * @param priority the priority of this bookmarks entry
463            */
464            public void setPriority(int priority) {
465                    _bookmarksEntry.setPriority(priority);
466            }
467    
468            public boolean isNew() {
469                    return _bookmarksEntry.isNew();
470            }
471    
472            public void setNew(boolean n) {
473                    _bookmarksEntry.setNew(n);
474            }
475    
476            public boolean isCachedModel() {
477                    return _bookmarksEntry.isCachedModel();
478            }
479    
480            public void setCachedModel(boolean cachedModel) {
481                    _bookmarksEntry.setCachedModel(cachedModel);
482            }
483    
484            public boolean isEscapedModel() {
485                    return _bookmarksEntry.isEscapedModel();
486            }
487    
488            public java.io.Serializable getPrimaryKeyObj() {
489                    return _bookmarksEntry.getPrimaryKeyObj();
490            }
491    
492            public void setPrimaryKeyObj(java.io.Serializable primaryKeyObj) {
493                    _bookmarksEntry.setPrimaryKeyObj(primaryKeyObj);
494            }
495    
496            public com.liferay.portlet.expando.model.ExpandoBridge getExpandoBridge() {
497                    return _bookmarksEntry.getExpandoBridge();
498            }
499    
500            public void setExpandoBridgeAttributes(
501                    com.liferay.portal.service.ServiceContext serviceContext) {
502                    _bookmarksEntry.setExpandoBridgeAttributes(serviceContext);
503            }
504    
505            @Override
506            public java.lang.Object clone() {
507                    return new BookmarksEntryWrapper((BookmarksEntry)_bookmarksEntry.clone());
508            }
509    
510            public int compareTo(
511                    com.liferay.portlet.bookmarks.model.BookmarksEntry bookmarksEntry) {
512                    return _bookmarksEntry.compareTo(bookmarksEntry);
513            }
514    
515            @Override
516            public int hashCode() {
517                    return _bookmarksEntry.hashCode();
518            }
519    
520            public com.liferay.portal.model.CacheModel<com.liferay.portlet.bookmarks.model.BookmarksEntry> toCacheModel() {
521                    return _bookmarksEntry.toCacheModel();
522            }
523    
524            public com.liferay.portlet.bookmarks.model.BookmarksEntry toEscapedModel() {
525                    return new BookmarksEntryWrapper(_bookmarksEntry.toEscapedModel());
526            }
527    
528            public com.liferay.portlet.bookmarks.model.BookmarksEntry toUnescapedModel() {
529                    return new BookmarksEntryWrapper(_bookmarksEntry.toUnescapedModel());
530            }
531    
532            @Override
533            public java.lang.String toString() {
534                    return _bookmarksEntry.toString();
535            }
536    
537            public java.lang.String toXmlString() {
538                    return _bookmarksEntry.toXmlString();
539            }
540    
541            public void persist()
542                    throws com.liferay.portal.kernel.exception.SystemException {
543                    _bookmarksEntry.persist();
544            }
545    
546            public com.liferay.portlet.bookmarks.model.BookmarksFolder getFolder() {
547                    return _bookmarksEntry.getFolder();
548            }
549    
550            /**
551             * @deprecated Renamed to {@link #getWrappedModel}
552             */
553            public BookmarksEntry getWrappedBookmarksEntry() {
554                    return _bookmarksEntry;
555            }
556    
557            public BookmarksEntry getWrappedModel() {
558                    return _bookmarksEntry;
559            }
560    
561            public void resetOriginalValues() {
562                    _bookmarksEntry.resetOriginalValues();
563            }
564    
565            private BookmarksEntry _bookmarksEntry;
566    }