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