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.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            /**
113            * Returns the primary key of this journal content search.
114            *
115            * @return the primary key of this journal content search
116            */
117            @Override
118            public long getPrimaryKey() {
119                    return _journalContentSearch.getPrimaryKey();
120            }
121    
122            /**
123            * Sets the primary key of this journal content search.
124            *
125            * @param primaryKey the primary key of this journal content search
126            */
127            @Override
128            public void setPrimaryKey(long primaryKey) {
129                    _journalContentSearch.setPrimaryKey(primaryKey);
130            }
131    
132            /**
133            * Returns the content search ID of this journal content search.
134            *
135            * @return the content search ID of this journal content search
136            */
137            @Override
138            public long getContentSearchId() {
139                    return _journalContentSearch.getContentSearchId();
140            }
141    
142            /**
143            * Sets the content search ID of this journal content search.
144            *
145            * @param contentSearchId the content search ID of this journal content search
146            */
147            @Override
148            public void setContentSearchId(long contentSearchId) {
149                    _journalContentSearch.setContentSearchId(contentSearchId);
150            }
151    
152            /**
153            * Returns the group ID of this journal content search.
154            *
155            * @return the group ID of this journal content search
156            */
157            @Override
158            public long getGroupId() {
159                    return _journalContentSearch.getGroupId();
160            }
161    
162            /**
163            * Sets the group ID of this journal content search.
164            *
165            * @param groupId the group ID of this journal content search
166            */
167            @Override
168            public void setGroupId(long groupId) {
169                    _journalContentSearch.setGroupId(groupId);
170            }
171    
172            /**
173            * Returns the company ID of this journal content search.
174            *
175            * @return the company ID of this journal content search
176            */
177            @Override
178            public long getCompanyId() {
179                    return _journalContentSearch.getCompanyId();
180            }
181    
182            /**
183            * Sets the company ID of this journal content search.
184            *
185            * @param companyId the company ID of this journal content search
186            */
187            @Override
188            public void setCompanyId(long companyId) {
189                    _journalContentSearch.setCompanyId(companyId);
190            }
191    
192            /**
193            * Returns the private layout of this journal content search.
194            *
195            * @return the private layout of this journal content search
196            */
197            @Override
198            public boolean getPrivateLayout() {
199                    return _journalContentSearch.getPrivateLayout();
200            }
201    
202            /**
203            * Returns <code>true</code> if this journal content search is private layout.
204            *
205            * @return <code>true</code> if this journal content search is private layout; <code>false</code> otherwise
206            */
207            @Override
208            public boolean isPrivateLayout() {
209                    return _journalContentSearch.isPrivateLayout();
210            }
211    
212            /**
213            * Sets whether this journal content search is private layout.
214            *
215            * @param privateLayout the private layout of this journal content search
216            */
217            @Override
218            public void setPrivateLayout(boolean privateLayout) {
219                    _journalContentSearch.setPrivateLayout(privateLayout);
220            }
221    
222            /**
223            * Returns the layout ID of this journal content search.
224            *
225            * @return the layout ID of this journal content search
226            */
227            @Override
228            public long getLayoutId() {
229                    return _journalContentSearch.getLayoutId();
230            }
231    
232            /**
233            * Sets the layout ID of this journal content search.
234            *
235            * @param layoutId the layout ID of this journal content search
236            */
237            @Override
238            public void setLayoutId(long layoutId) {
239                    _journalContentSearch.setLayoutId(layoutId);
240            }
241    
242            /**
243            * Returns the portlet ID of this journal content search.
244            *
245            * @return the portlet ID of this journal content search
246            */
247            @Override
248            public java.lang.String getPortletId() {
249                    return _journalContentSearch.getPortletId();
250            }
251    
252            /**
253            * Sets the portlet ID of this journal content search.
254            *
255            * @param portletId the portlet ID of this journal content search
256            */
257            @Override
258            public void setPortletId(java.lang.String portletId) {
259                    _journalContentSearch.setPortletId(portletId);
260            }
261    
262            /**
263            * Returns the article ID of this journal content search.
264            *
265            * @return the article ID of this journal content search
266            */
267            @Override
268            public java.lang.String getArticleId() {
269                    return _journalContentSearch.getArticleId();
270            }
271    
272            /**
273            * Sets the article ID of this journal content search.
274            *
275            * @param articleId the article ID of this journal content search
276            */
277            @Override
278            public void setArticleId(java.lang.String articleId) {
279                    _journalContentSearch.setArticleId(articleId);
280            }
281    
282            @Override
283            public boolean isNew() {
284                    return _journalContentSearch.isNew();
285            }
286    
287            @Override
288            public void setNew(boolean n) {
289                    _journalContentSearch.setNew(n);
290            }
291    
292            @Override
293            public boolean isCachedModel() {
294                    return _journalContentSearch.isCachedModel();
295            }
296    
297            @Override
298            public void setCachedModel(boolean cachedModel) {
299                    _journalContentSearch.setCachedModel(cachedModel);
300            }
301    
302            @Override
303            public boolean isEscapedModel() {
304                    return _journalContentSearch.isEscapedModel();
305            }
306    
307            @Override
308            public java.io.Serializable getPrimaryKeyObj() {
309                    return _journalContentSearch.getPrimaryKeyObj();
310            }
311    
312            @Override
313            public void setPrimaryKeyObj(java.io.Serializable primaryKeyObj) {
314                    _journalContentSearch.setPrimaryKeyObj(primaryKeyObj);
315            }
316    
317            @Override
318            public com.liferay.portlet.expando.model.ExpandoBridge getExpandoBridge() {
319                    return _journalContentSearch.getExpandoBridge();
320            }
321    
322            @Override
323            public void setExpandoBridgeAttributes(
324                    com.liferay.portal.model.BaseModel<?> baseModel) {
325                    _journalContentSearch.setExpandoBridgeAttributes(baseModel);
326            }
327    
328            @Override
329            public void setExpandoBridgeAttributes(
330                    com.liferay.portlet.expando.model.ExpandoBridge expandoBridge) {
331                    _journalContentSearch.setExpandoBridgeAttributes(expandoBridge);
332            }
333    
334            @Override
335            public void setExpandoBridgeAttributes(
336                    com.liferay.portal.service.ServiceContext serviceContext) {
337                    _journalContentSearch.setExpandoBridgeAttributes(serviceContext);
338            }
339    
340            @Override
341            public java.lang.Object clone() {
342                    return new JournalContentSearchWrapper((JournalContentSearch)_journalContentSearch.clone());
343            }
344    
345            @Override
346            public int compareTo(
347                    com.liferay.portlet.journal.model.JournalContentSearch journalContentSearch) {
348                    return _journalContentSearch.compareTo(journalContentSearch);
349            }
350    
351            @Override
352            public int hashCode() {
353                    return _journalContentSearch.hashCode();
354            }
355    
356            @Override
357            public com.liferay.portal.model.CacheModel<com.liferay.portlet.journal.model.JournalContentSearch> toCacheModel() {
358                    return _journalContentSearch.toCacheModel();
359            }
360    
361            @Override
362            public com.liferay.portlet.journal.model.JournalContentSearch toEscapedModel() {
363                    return new JournalContentSearchWrapper(_journalContentSearch.toEscapedModel());
364            }
365    
366            @Override
367            public com.liferay.portlet.journal.model.JournalContentSearch toUnescapedModel() {
368                    return new JournalContentSearchWrapper(_journalContentSearch.toUnescapedModel());
369            }
370    
371            @Override
372            public java.lang.String toString() {
373                    return _journalContentSearch.toString();
374            }
375    
376            @Override
377            public java.lang.String toXmlString() {
378                    return _journalContentSearch.toXmlString();
379            }
380    
381            @Override
382            public void persist()
383                    throws com.liferay.portal.kernel.exception.SystemException {
384                    _journalContentSearch.persist();
385            }
386    
387            @Override
388            public boolean equals(Object obj) {
389                    if (this == obj) {
390                            return true;
391                    }
392    
393                    if (!(obj instanceof JournalContentSearchWrapper)) {
394                            return false;
395                    }
396    
397                    JournalContentSearchWrapper journalContentSearchWrapper = (JournalContentSearchWrapper)obj;
398    
399                    if (Validator.equals(_journalContentSearch,
400                                            journalContentSearchWrapper._journalContentSearch)) {
401                            return true;
402                    }
403    
404                    return false;
405            }
406    
407            /**
408             * @deprecated As of 6.1.0, replaced by {@link #getWrappedModel}
409             */
410            public JournalContentSearch getWrappedJournalContentSearch() {
411                    return _journalContentSearch;
412            }
413    
414            @Override
415            public JournalContentSearch getWrappedModel() {
416                    return _journalContentSearch;
417            }
418    
419            @Override
420            public void resetOriginalValues() {
421                    _journalContentSearch.resetOriginalValues();
422            }
423    
424            private JournalContentSearch _journalContentSearch;
425    }