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