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