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 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            /**
227            * Returns the primary key of this journal feed.
228            *
229            * @return the primary key of this journal feed
230            */
231            @Override
232            public long getPrimaryKey() {
233                    return _journalFeed.getPrimaryKey();
234            }
235    
236            /**
237            * Sets the primary key of this journal feed.
238            *
239            * @param primaryKey the primary key of this journal feed
240            */
241            @Override
242            public void setPrimaryKey(long primaryKey) {
243                    _journalFeed.setPrimaryKey(primaryKey);
244            }
245    
246            /**
247            * Returns the uuid of this journal feed.
248            *
249            * @return the uuid of this journal feed
250            */
251            @Override
252            public java.lang.String getUuid() {
253                    return _journalFeed.getUuid();
254            }
255    
256            /**
257            * Sets the uuid of this journal feed.
258            *
259            * @param uuid the uuid of this journal feed
260            */
261            @Override
262            public void setUuid(java.lang.String uuid) {
263                    _journalFeed.setUuid(uuid);
264            }
265    
266            /**
267            * Returns the ID of this journal feed.
268            *
269            * @return the ID of this journal feed
270            */
271            @Override
272            public long getId() {
273                    return _journalFeed.getId();
274            }
275    
276            /**
277            * Sets the ID of this journal feed.
278            *
279            * @param id the ID of this journal feed
280            */
281            @Override
282            public void setId(long id) {
283                    _journalFeed.setId(id);
284            }
285    
286            /**
287            * Returns the group ID of this journal feed.
288            *
289            * @return the group ID of this journal feed
290            */
291            @Override
292            public long getGroupId() {
293                    return _journalFeed.getGroupId();
294            }
295    
296            /**
297            * Sets the group ID of this journal feed.
298            *
299            * @param groupId the group ID of this journal feed
300            */
301            @Override
302            public void setGroupId(long groupId) {
303                    _journalFeed.setGroupId(groupId);
304            }
305    
306            /**
307            * Returns the company ID of this journal feed.
308            *
309            * @return the company ID of this journal feed
310            */
311            @Override
312            public long getCompanyId() {
313                    return _journalFeed.getCompanyId();
314            }
315    
316            /**
317            * Sets the company ID of this journal feed.
318            *
319            * @param companyId the company ID of this journal feed
320            */
321            @Override
322            public void setCompanyId(long companyId) {
323                    _journalFeed.setCompanyId(companyId);
324            }
325    
326            /**
327            * Returns the user ID of this journal feed.
328            *
329            * @return the user ID of this journal feed
330            */
331            @Override
332            public long getUserId() {
333                    return _journalFeed.getUserId();
334            }
335    
336            /**
337            * Sets the user ID of this journal feed.
338            *
339            * @param userId the user ID of this journal feed
340            */
341            @Override
342            public void setUserId(long userId) {
343                    _journalFeed.setUserId(userId);
344            }
345    
346            /**
347            * Returns the user uuid of this journal feed.
348            *
349            * @return the user uuid of this journal feed
350            * @throws SystemException if a system exception occurred
351            */
352            @Override
353            public java.lang.String getUserUuid()
354                    throws com.liferay.portal.kernel.exception.SystemException {
355                    return _journalFeed.getUserUuid();
356            }
357    
358            /**
359            * Sets the user uuid of this journal feed.
360            *
361            * @param userUuid the user uuid of this journal feed
362            */
363            @Override
364            public void setUserUuid(java.lang.String userUuid) {
365                    _journalFeed.setUserUuid(userUuid);
366            }
367    
368            /**
369            * Returns the user name of this journal feed.
370            *
371            * @return the user name of this journal feed
372            */
373            @Override
374            public java.lang.String getUserName() {
375                    return _journalFeed.getUserName();
376            }
377    
378            /**
379            * Sets the user name of this journal feed.
380            *
381            * @param userName the user name of this journal feed
382            */
383            @Override
384            public void setUserName(java.lang.String userName) {
385                    _journalFeed.setUserName(userName);
386            }
387    
388            /**
389            * Returns the create date of this journal feed.
390            *
391            * @return the create date of this journal feed
392            */
393            @Override
394            public java.util.Date getCreateDate() {
395                    return _journalFeed.getCreateDate();
396            }
397    
398            /**
399            * Sets the create date of this journal feed.
400            *
401            * @param createDate the create date of this journal feed
402            */
403            @Override
404            public void setCreateDate(java.util.Date createDate) {
405                    _journalFeed.setCreateDate(createDate);
406            }
407    
408            /**
409            * Returns the modified date of this journal feed.
410            *
411            * @return the modified date of this journal feed
412            */
413            @Override
414            public java.util.Date getModifiedDate() {
415                    return _journalFeed.getModifiedDate();
416            }
417    
418            /**
419            * Sets the modified date of this journal feed.
420            *
421            * @param modifiedDate the modified date of this journal feed
422            */
423            @Override
424            public void setModifiedDate(java.util.Date modifiedDate) {
425                    _journalFeed.setModifiedDate(modifiedDate);
426            }
427    
428            /**
429            * Returns the feed ID of this journal feed.
430            *
431            * @return the feed ID of this journal feed
432            */
433            @Override
434            public java.lang.String getFeedId() {
435                    return _journalFeed.getFeedId();
436            }
437    
438            /**
439            * Sets the feed ID of this journal feed.
440            *
441            * @param feedId the feed ID of this journal feed
442            */
443            @Override
444            public void setFeedId(java.lang.String feedId) {
445                    _journalFeed.setFeedId(feedId);
446            }
447    
448            /**
449            * Returns the name of this journal feed.
450            *
451            * @return the name of this journal feed
452            */
453            @Override
454            public java.lang.String getName() {
455                    return _journalFeed.getName();
456            }
457    
458            /**
459            * Sets the name of this journal feed.
460            *
461            * @param name the name of this journal feed
462            */
463            @Override
464            public void setName(java.lang.String name) {
465                    _journalFeed.setName(name);
466            }
467    
468            /**
469            * Returns the description of this journal feed.
470            *
471            * @return the description of this journal feed
472            */
473            @Override
474            public java.lang.String getDescription() {
475                    return _journalFeed.getDescription();
476            }
477    
478            /**
479            * Sets the description of this journal feed.
480            *
481            * @param description the description of this journal feed
482            */
483            @Override
484            public void setDescription(java.lang.String description) {
485                    _journalFeed.setDescription(description);
486            }
487    
488            /**
489            * Returns the type of this journal feed.
490            *
491            * @return the type of this journal feed
492            */
493            @Override
494            public java.lang.String getType() {
495                    return _journalFeed.getType();
496            }
497    
498            /**
499            * Sets the type of this journal feed.
500            *
501            * @param type the type of this journal feed
502            */
503            @Override
504            public void setType(java.lang.String type) {
505                    _journalFeed.setType(type);
506            }
507    
508            /**
509            * Returns the structure ID of this journal feed.
510            *
511            * @return the structure ID of this journal feed
512            */
513            @Override
514            public java.lang.String getStructureId() {
515                    return _journalFeed.getStructureId();
516            }
517    
518            /**
519            * Sets the structure ID of this journal feed.
520            *
521            * @param structureId the structure ID of this journal feed
522            */
523            @Override
524            public void setStructureId(java.lang.String structureId) {
525                    _journalFeed.setStructureId(structureId);
526            }
527    
528            /**
529            * Returns the template ID of this journal feed.
530            *
531            * @return the template ID of this journal feed
532            */
533            @Override
534            public java.lang.String getTemplateId() {
535                    return _journalFeed.getTemplateId();
536            }
537    
538            /**
539            * Sets the template ID of this journal feed.
540            *
541            * @param templateId the template ID of this journal feed
542            */
543            @Override
544            public void setTemplateId(java.lang.String templateId) {
545                    _journalFeed.setTemplateId(templateId);
546            }
547    
548            /**
549            * Returns the renderer template ID of this journal feed.
550            *
551            * @return the renderer template ID of this journal feed
552            */
553            @Override
554            public java.lang.String getRendererTemplateId() {
555                    return _journalFeed.getRendererTemplateId();
556            }
557    
558            /**
559            * Sets the renderer template ID of this journal feed.
560            *
561            * @param rendererTemplateId the renderer template ID of this journal feed
562            */
563            @Override
564            public void setRendererTemplateId(java.lang.String rendererTemplateId) {
565                    _journalFeed.setRendererTemplateId(rendererTemplateId);
566            }
567    
568            /**
569            * Returns the delta of this journal feed.
570            *
571            * @return the delta of this journal feed
572            */
573            @Override
574            public int getDelta() {
575                    return _journalFeed.getDelta();
576            }
577    
578            /**
579            * Sets the delta of this journal feed.
580            *
581            * @param delta the delta of this journal feed
582            */
583            @Override
584            public void setDelta(int delta) {
585                    _journalFeed.setDelta(delta);
586            }
587    
588            /**
589            * Returns the order by col of this journal feed.
590            *
591            * @return the order by col of this journal feed
592            */
593            @Override
594            public java.lang.String getOrderByCol() {
595                    return _journalFeed.getOrderByCol();
596            }
597    
598            /**
599            * Sets the order by col of this journal feed.
600            *
601            * @param orderByCol the order by col of this journal feed
602            */
603            @Override
604            public void setOrderByCol(java.lang.String orderByCol) {
605                    _journalFeed.setOrderByCol(orderByCol);
606            }
607    
608            /**
609            * Returns the order by type of this journal feed.
610            *
611            * @return the order by type of this journal feed
612            */
613            @Override
614            public java.lang.String getOrderByType() {
615                    return _journalFeed.getOrderByType();
616            }
617    
618            /**
619            * Sets the order by type of this journal feed.
620            *
621            * @param orderByType the order by type of this journal feed
622            */
623            @Override
624            public void setOrderByType(java.lang.String orderByType) {
625                    _journalFeed.setOrderByType(orderByType);
626            }
627    
628            /**
629            * Returns the target layout friendly url of this journal feed.
630            *
631            * @return the target layout friendly url of this journal feed
632            */
633            @Override
634            public java.lang.String getTargetLayoutFriendlyUrl() {
635                    return _journalFeed.getTargetLayoutFriendlyUrl();
636            }
637    
638            /**
639            * Sets the target layout friendly url of this journal feed.
640            *
641            * @param targetLayoutFriendlyUrl the target layout friendly url of this journal feed
642            */
643            @Override
644            public void setTargetLayoutFriendlyUrl(
645                    java.lang.String targetLayoutFriendlyUrl) {
646                    _journalFeed.setTargetLayoutFriendlyUrl(targetLayoutFriendlyUrl);
647            }
648    
649            /**
650            * Returns the target portlet ID of this journal feed.
651            *
652            * @return the target portlet ID of this journal feed
653            */
654            @Override
655            public java.lang.String getTargetPortletId() {
656                    return _journalFeed.getTargetPortletId();
657            }
658    
659            /**
660            * Sets the target portlet ID of this journal feed.
661            *
662            * @param targetPortletId the target portlet ID of this journal feed
663            */
664            @Override
665            public void setTargetPortletId(java.lang.String targetPortletId) {
666                    _journalFeed.setTargetPortletId(targetPortletId);
667            }
668    
669            /**
670            * Returns the content field of this journal feed.
671            *
672            * @return the content field of this journal feed
673            */
674            @Override
675            public java.lang.String getContentField() {
676                    return _journalFeed.getContentField();
677            }
678    
679            /**
680            * Sets the content field of this journal feed.
681            *
682            * @param contentField the content field of this journal feed
683            */
684            @Override
685            public void setContentField(java.lang.String contentField) {
686                    _journalFeed.setContentField(contentField);
687            }
688    
689            /**
690            * Returns the feed format of this journal feed.
691            *
692            * @return the feed format of this journal feed
693            */
694            @Override
695            public java.lang.String getFeedFormat() {
696                    return _journalFeed.getFeedFormat();
697            }
698    
699            /**
700            * Sets the feed format of this journal feed.
701            *
702            * @param feedFormat the feed format of this journal feed
703            */
704            @Override
705            public void setFeedFormat(java.lang.String feedFormat) {
706                    _journalFeed.setFeedFormat(feedFormat);
707            }
708    
709            /**
710            * Returns the feed version of this journal feed.
711            *
712            * @return the feed version of this journal feed
713            */
714            @Override
715            public double getFeedVersion() {
716                    return _journalFeed.getFeedVersion();
717            }
718    
719            /**
720            * Sets the feed version of this journal feed.
721            *
722            * @param feedVersion the feed version of this journal feed
723            */
724            @Override
725            public void setFeedVersion(double feedVersion) {
726                    _journalFeed.setFeedVersion(feedVersion);
727            }
728    
729            @Override
730            public boolean isNew() {
731                    return _journalFeed.isNew();
732            }
733    
734            @Override
735            public void setNew(boolean n) {
736                    _journalFeed.setNew(n);
737            }
738    
739            @Override
740            public boolean isCachedModel() {
741                    return _journalFeed.isCachedModel();
742            }
743    
744            @Override
745            public void setCachedModel(boolean cachedModel) {
746                    _journalFeed.setCachedModel(cachedModel);
747            }
748    
749            @Override
750            public boolean isEscapedModel() {
751                    return _journalFeed.isEscapedModel();
752            }
753    
754            @Override
755            public java.io.Serializable getPrimaryKeyObj() {
756                    return _journalFeed.getPrimaryKeyObj();
757            }
758    
759            @Override
760            public void setPrimaryKeyObj(java.io.Serializable primaryKeyObj) {
761                    _journalFeed.setPrimaryKeyObj(primaryKeyObj);
762            }
763    
764            @Override
765            public com.liferay.portlet.expando.model.ExpandoBridge getExpandoBridge() {
766                    return _journalFeed.getExpandoBridge();
767            }
768    
769            @Override
770            public void setExpandoBridgeAttributes(
771                    com.liferay.portal.model.BaseModel<?> baseModel) {
772                    _journalFeed.setExpandoBridgeAttributes(baseModel);
773            }
774    
775            @Override
776            public void setExpandoBridgeAttributes(
777                    com.liferay.portlet.expando.model.ExpandoBridge expandoBridge) {
778                    _journalFeed.setExpandoBridgeAttributes(expandoBridge);
779            }
780    
781            @Override
782            public void setExpandoBridgeAttributes(
783                    com.liferay.portal.service.ServiceContext serviceContext) {
784                    _journalFeed.setExpandoBridgeAttributes(serviceContext);
785            }
786    
787            @Override
788            public java.lang.Object clone() {
789                    return new JournalFeedWrapper((JournalFeed)_journalFeed.clone());
790            }
791    
792            @Override
793            public int compareTo(
794                    com.liferay.portlet.journal.model.JournalFeed journalFeed) {
795                    return _journalFeed.compareTo(journalFeed);
796            }
797    
798            @Override
799            public int hashCode() {
800                    return _journalFeed.hashCode();
801            }
802    
803            @Override
804            public com.liferay.portal.model.CacheModel<com.liferay.portlet.journal.model.JournalFeed> toCacheModel() {
805                    return _journalFeed.toCacheModel();
806            }
807    
808            @Override
809            public com.liferay.portlet.journal.model.JournalFeed toEscapedModel() {
810                    return new JournalFeedWrapper(_journalFeed.toEscapedModel());
811            }
812    
813            @Override
814            public com.liferay.portlet.journal.model.JournalFeed toUnescapedModel() {
815                    return new JournalFeedWrapper(_journalFeed.toUnescapedModel());
816            }
817    
818            @Override
819            public java.lang.String toString() {
820                    return _journalFeed.toString();
821            }
822    
823            @Override
824            public java.lang.String toXmlString() {
825                    return _journalFeed.toXmlString();
826            }
827    
828            @Override
829            public void persist()
830                    throws com.liferay.portal.kernel.exception.SystemException {
831                    _journalFeed.persist();
832            }
833    
834            @Override
835            public boolean equals(Object obj) {
836                    if (this == obj) {
837                            return true;
838                    }
839    
840                    if (!(obj instanceof JournalFeedWrapper)) {
841                            return false;
842                    }
843    
844                    JournalFeedWrapper journalFeedWrapper = (JournalFeedWrapper)obj;
845    
846                    if (Validator.equals(_journalFeed, journalFeedWrapper._journalFeed)) {
847                            return true;
848                    }
849    
850                    return false;
851            }
852    
853            @Override
854            public StagedModelType getStagedModelType() {
855                    return _journalFeed.getStagedModelType();
856            }
857    
858            /**
859             * @deprecated As of 6.1.0, replaced by {@link #getWrappedModel}
860             */
861            public JournalFeed getWrappedJournalFeed() {
862                    return _journalFeed;
863            }
864    
865            @Override
866            public JournalFeed getWrappedModel() {
867                    return _journalFeed;
868            }
869    
870            @Override
871            public void resetOriginalValues() {
872                    _journalFeed.resetOriginalValues();
873            }
874    
875            private JournalFeed _journalFeed;
876    }