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