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