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