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