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.util.Validator;
020    import com.liferay.portal.model.ModelWrapper;
021    
022    import java.util.HashMap;
023    import java.util.Map;
024    
025    /**
026     * <p>
027     * This class is a wrapper for {@link JournalContentSearch}.
028     * </p>
029     *
030     * @author Brian Wing Shun Chan
031     * @see JournalContentSearch
032     * @generated
033     */
034    @ProviderType
035    public class JournalContentSearchWrapper implements JournalContentSearch,
036            ModelWrapper<JournalContentSearch> {
037            public JournalContentSearchWrapper(
038                    JournalContentSearch journalContentSearch) {
039                    _journalContentSearch = journalContentSearch;
040            }
041    
042            @Override
043            public Class<?> getModelClass() {
044                    return JournalContentSearch.class;
045            }
046    
047            @Override
048            public String getModelClassName() {
049                    return JournalContentSearch.class.getName();
050            }
051    
052            @Override
053            public Map<String, Object> getModelAttributes() {
054                    Map<String, Object> attributes = new HashMap<String, Object>();
055    
056                    attributes.put("contentSearchId", getContentSearchId());
057                    attributes.put("groupId", getGroupId());
058                    attributes.put("companyId", getCompanyId());
059                    attributes.put("privateLayout", getPrivateLayout());
060                    attributes.put("layoutId", getLayoutId());
061                    attributes.put("portletId", getPortletId());
062                    attributes.put("articleId", getArticleId());
063    
064                    return attributes;
065            }
066    
067            @Override
068            public void setModelAttributes(Map<String, Object> attributes) {
069                    Long contentSearchId = (Long)attributes.get("contentSearchId");
070    
071                    if (contentSearchId != null) {
072                            setContentSearchId(contentSearchId);
073                    }
074    
075                    Long groupId = (Long)attributes.get("groupId");
076    
077                    if (groupId != null) {
078                            setGroupId(groupId);
079                    }
080    
081                    Long companyId = (Long)attributes.get("companyId");
082    
083                    if (companyId != null) {
084                            setCompanyId(companyId);
085                    }
086    
087                    Boolean privateLayout = (Boolean)attributes.get("privateLayout");
088    
089                    if (privateLayout != null) {
090                            setPrivateLayout(privateLayout);
091                    }
092    
093                    Long layoutId = (Long)attributes.get("layoutId");
094    
095                    if (layoutId != null) {
096                            setLayoutId(layoutId);
097                    }
098    
099                    String portletId = (String)attributes.get("portletId");
100    
101                    if (portletId != null) {
102                            setPortletId(portletId);
103                    }
104    
105                    String articleId = (String)attributes.get("articleId");
106    
107                    if (articleId != null) {
108                            setArticleId(articleId);
109                    }
110            }
111    
112            @Override
113            public java.lang.Object clone() {
114                    return new JournalContentSearchWrapper((JournalContentSearch)_journalContentSearch.clone());
115            }
116    
117            @Override
118            public int compareTo(
119                    com.liferay.portlet.journal.model.JournalContentSearch journalContentSearch) {
120                    return _journalContentSearch.compareTo(journalContentSearch);
121            }
122    
123            /**
124            * Returns the article ID of this journal content search.
125            *
126            * @return the article ID of this journal content search
127            */
128            @Override
129            public java.lang.String getArticleId() {
130                    return _journalContentSearch.getArticleId();
131            }
132    
133            /**
134            * Returns the company ID of this journal content search.
135            *
136            * @return the company ID of this journal content search
137            */
138            @Override
139            public long getCompanyId() {
140                    return _journalContentSearch.getCompanyId();
141            }
142    
143            /**
144            * Returns the content search ID of this journal content search.
145            *
146            * @return the content search ID of this journal content search
147            */
148            @Override
149            public long getContentSearchId() {
150                    return _journalContentSearch.getContentSearchId();
151            }
152    
153            @Override
154            public com.liferay.portlet.expando.model.ExpandoBridge getExpandoBridge() {
155                    return _journalContentSearch.getExpandoBridge();
156            }
157    
158            /**
159            * Returns the group ID of this journal content search.
160            *
161            * @return the group ID of this journal content search
162            */
163            @Override
164            public long getGroupId() {
165                    return _journalContentSearch.getGroupId();
166            }
167    
168            /**
169            * Returns the layout ID of this journal content search.
170            *
171            * @return the layout ID of this journal content search
172            */
173            @Override
174            public long getLayoutId() {
175                    return _journalContentSearch.getLayoutId();
176            }
177    
178            /**
179            * Returns the portlet ID of this journal content search.
180            *
181            * @return the portlet ID of this journal content search
182            */
183            @Override
184            public java.lang.String getPortletId() {
185                    return _journalContentSearch.getPortletId();
186            }
187    
188            /**
189            * Returns the primary key of this journal content search.
190            *
191            * @return the primary key of this journal content search
192            */
193            @Override
194            public long getPrimaryKey() {
195                    return _journalContentSearch.getPrimaryKey();
196            }
197    
198            @Override
199            public java.io.Serializable getPrimaryKeyObj() {
200                    return _journalContentSearch.getPrimaryKeyObj();
201            }
202    
203            /**
204            * Returns the private layout of this journal content search.
205            *
206            * @return the private layout of this journal content search
207            */
208            @Override
209            public boolean getPrivateLayout() {
210                    return _journalContentSearch.getPrivateLayout();
211            }
212    
213            @Override
214            public int hashCode() {
215                    return _journalContentSearch.hashCode();
216            }
217    
218            @Override
219            public boolean isCachedModel() {
220                    return _journalContentSearch.isCachedModel();
221            }
222    
223            @Override
224            public boolean isEscapedModel() {
225                    return _journalContentSearch.isEscapedModel();
226            }
227    
228            @Override
229            public boolean isNew() {
230                    return _journalContentSearch.isNew();
231            }
232    
233            /**
234            * Returns <code>true</code> if this journal content search is private layout.
235            *
236            * @return <code>true</code> if this journal content search is private layout; <code>false</code> otherwise
237            */
238            @Override
239            public boolean isPrivateLayout() {
240                    return _journalContentSearch.isPrivateLayout();
241            }
242    
243            @Override
244            public void persist() {
245                    _journalContentSearch.persist();
246            }
247    
248            /**
249            * Sets the article ID of this journal content search.
250            *
251            * @param articleId the article ID of this journal content search
252            */
253            @Override
254            public void setArticleId(java.lang.String articleId) {
255                    _journalContentSearch.setArticleId(articleId);
256            }
257    
258            @Override
259            public void setCachedModel(boolean cachedModel) {
260                    _journalContentSearch.setCachedModel(cachedModel);
261            }
262    
263            /**
264            * Sets the company ID of this journal content search.
265            *
266            * @param companyId the company ID of this journal content search
267            */
268            @Override
269            public void setCompanyId(long companyId) {
270                    _journalContentSearch.setCompanyId(companyId);
271            }
272    
273            /**
274            * Sets the content search ID of this journal content search.
275            *
276            * @param contentSearchId the content search ID of this journal content search
277            */
278            @Override
279            public void setContentSearchId(long contentSearchId) {
280                    _journalContentSearch.setContentSearchId(contentSearchId);
281            }
282    
283            @Override
284            public void setExpandoBridgeAttributes(
285                    com.liferay.portal.model.BaseModel<?> baseModel) {
286                    _journalContentSearch.setExpandoBridgeAttributes(baseModel);
287            }
288    
289            @Override
290            public void setExpandoBridgeAttributes(
291                    com.liferay.portlet.expando.model.ExpandoBridge expandoBridge) {
292                    _journalContentSearch.setExpandoBridgeAttributes(expandoBridge);
293            }
294    
295            @Override
296            public void setExpandoBridgeAttributes(
297                    com.liferay.portal.service.ServiceContext serviceContext) {
298                    _journalContentSearch.setExpandoBridgeAttributes(serviceContext);
299            }
300    
301            /**
302            * Sets the group ID of this journal content search.
303            *
304            * @param groupId the group ID of this journal content search
305            */
306            @Override
307            public void setGroupId(long groupId) {
308                    _journalContentSearch.setGroupId(groupId);
309            }
310    
311            /**
312            * Sets the layout ID of this journal content search.
313            *
314            * @param layoutId the layout ID of this journal content search
315            */
316            @Override
317            public void setLayoutId(long layoutId) {
318                    _journalContentSearch.setLayoutId(layoutId);
319            }
320    
321            @Override
322            public void setNew(boolean n) {
323                    _journalContentSearch.setNew(n);
324            }
325    
326            /**
327            * Sets the portlet ID of this journal content search.
328            *
329            * @param portletId the portlet ID of this journal content search
330            */
331            @Override
332            public void setPortletId(java.lang.String portletId) {
333                    _journalContentSearch.setPortletId(portletId);
334            }
335    
336            /**
337            * Sets the primary key of this journal content search.
338            *
339            * @param primaryKey the primary key of this journal content search
340            */
341            @Override
342            public void setPrimaryKey(long primaryKey) {
343                    _journalContentSearch.setPrimaryKey(primaryKey);
344            }
345    
346            @Override
347            public void setPrimaryKeyObj(java.io.Serializable primaryKeyObj) {
348                    _journalContentSearch.setPrimaryKeyObj(primaryKeyObj);
349            }
350    
351            /**
352            * Sets whether this journal content search is private layout.
353            *
354            * @param privateLayout the private layout of this journal content search
355            */
356            @Override
357            public void setPrivateLayout(boolean privateLayout) {
358                    _journalContentSearch.setPrivateLayout(privateLayout);
359            }
360    
361            @Override
362            public com.liferay.portal.model.CacheModel<com.liferay.portlet.journal.model.JournalContentSearch> toCacheModel() {
363                    return _journalContentSearch.toCacheModel();
364            }
365    
366            @Override
367            public com.liferay.portlet.journal.model.JournalContentSearch toEscapedModel() {
368                    return new JournalContentSearchWrapper(_journalContentSearch.toEscapedModel());
369            }
370    
371            @Override
372            public java.lang.String toString() {
373                    return _journalContentSearch.toString();
374            }
375    
376            @Override
377            public com.liferay.portlet.journal.model.JournalContentSearch toUnescapedModel() {
378                    return new JournalContentSearchWrapper(_journalContentSearch.toUnescapedModel());
379            }
380    
381            @Override
382            public java.lang.String toXmlString() {
383                    return _journalContentSearch.toXmlString();
384            }
385    
386            @Override
387            public boolean equals(Object obj) {
388                    if (this == obj) {
389                            return true;
390                    }
391    
392                    if (!(obj instanceof JournalContentSearchWrapper)) {
393                            return false;
394                    }
395    
396                    JournalContentSearchWrapper journalContentSearchWrapper = (JournalContentSearchWrapper)obj;
397    
398                    if (Validator.equals(_journalContentSearch,
399                                            journalContentSearchWrapper._journalContentSearch)) {
400                            return true;
401                    }
402    
403                    return false;
404            }
405    
406            /**
407             * @deprecated As of 6.1.0, replaced by {@link #getWrappedModel}
408             */
409            @Deprecated
410            public JournalContentSearch getWrappedJournalContentSearch() {
411                    return _journalContentSearch;
412            }
413    
414            @Override
415            public JournalContentSearch getWrappedModel() {
416                    return _journalContentSearch;
417            }
418    
419            @Override
420            public boolean isEntityCacheEnabled() {
421                    return _journalContentSearch.isEntityCacheEnabled();
422            }
423    
424            @Override
425            public boolean isFinderCacheEnabled() {
426                    return _journalContentSearch.isFinderCacheEnabled();
427            }
428    
429            @Override
430            public void resetOriginalValues() {
431                    _journalContentSearch.resetOriginalValues();
432            }
433    
434            private final JournalContentSearch _journalContentSearch;
435    }