001    /**
002     * Copyright (c) 2000-2012 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.polls.model;
016    
017    import com.liferay.portal.model.ModelWrapper;
018    
019    /**
020     * <p>
021     * This class is a wrapper for {@link PollsChoice}.
022     * </p>
023     *
024     * @author    Brian Wing Shun Chan
025     * @see       PollsChoice
026     * @generated
027     */
028    public class PollsChoiceWrapper implements PollsChoice,
029            ModelWrapper<PollsChoice> {
030            public PollsChoiceWrapper(PollsChoice pollsChoice) {
031                    _pollsChoice = pollsChoice;
032            }
033    
034            public Class<?> getModelClass() {
035                    return PollsChoice.class;
036            }
037    
038            public String getModelClassName() {
039                    return PollsChoice.class.getName();
040            }
041    
042            /**
043            * Returns the primary key of this polls choice.
044            *
045            * @return the primary key of this polls choice
046            */
047            public long getPrimaryKey() {
048                    return _pollsChoice.getPrimaryKey();
049            }
050    
051            /**
052            * Sets the primary key of this polls choice.
053            *
054            * @param primaryKey the primary key of this polls choice
055            */
056            public void setPrimaryKey(long primaryKey) {
057                    _pollsChoice.setPrimaryKey(primaryKey);
058            }
059    
060            /**
061            * Returns the uuid of this polls choice.
062            *
063            * @return the uuid of this polls choice
064            */
065            public java.lang.String getUuid() {
066                    return _pollsChoice.getUuid();
067            }
068    
069            /**
070            * Sets the uuid of this polls choice.
071            *
072            * @param uuid the uuid of this polls choice
073            */
074            public void setUuid(java.lang.String uuid) {
075                    _pollsChoice.setUuid(uuid);
076            }
077    
078            /**
079            * Returns the choice ID of this polls choice.
080            *
081            * @return the choice ID of this polls choice
082            */
083            public long getChoiceId() {
084                    return _pollsChoice.getChoiceId();
085            }
086    
087            /**
088            * Sets the choice ID of this polls choice.
089            *
090            * @param choiceId the choice ID of this polls choice
091            */
092            public void setChoiceId(long choiceId) {
093                    _pollsChoice.setChoiceId(choiceId);
094            }
095    
096            /**
097            * Returns the question ID of this polls choice.
098            *
099            * @return the question ID of this polls choice
100            */
101            public long getQuestionId() {
102                    return _pollsChoice.getQuestionId();
103            }
104    
105            /**
106            * Sets the question ID of this polls choice.
107            *
108            * @param questionId the question ID of this polls choice
109            */
110            public void setQuestionId(long questionId) {
111                    _pollsChoice.setQuestionId(questionId);
112            }
113    
114            /**
115            * Returns the name of this polls choice.
116            *
117            * @return the name of this polls choice
118            */
119            public java.lang.String getName() {
120                    return _pollsChoice.getName();
121            }
122    
123            /**
124            * Sets the name of this polls choice.
125            *
126            * @param name the name of this polls choice
127            */
128            public void setName(java.lang.String name) {
129                    _pollsChoice.setName(name);
130            }
131    
132            /**
133            * Returns the description of this polls choice.
134            *
135            * @return the description of this polls choice
136            */
137            public java.lang.String getDescription() {
138                    return _pollsChoice.getDescription();
139            }
140    
141            /**
142            * Returns the localized description of this polls choice in the language. Uses the default language if no localization exists for the requested language.
143            *
144            * @param locale the locale of the language
145            * @return the localized description of this polls choice
146            */
147            public java.lang.String getDescription(java.util.Locale locale) {
148                    return _pollsChoice.getDescription(locale);
149            }
150    
151            /**
152            * Returns the localized description of this polls choice in the language, optionally using the default language if no localization exists for the requested language.
153            *
154            * @param locale the local of the language
155            * @param useDefault whether to use the default language if no localization exists for the requested language
156            * @return the localized description of this polls choice. If <code>useDefault</code> is <code>false</code> and no localization exists for the requested language, an empty string will be returned.
157            */
158            public java.lang.String getDescription(java.util.Locale locale,
159                    boolean useDefault) {
160                    return _pollsChoice.getDescription(locale, useDefault);
161            }
162    
163            /**
164            * Returns the localized description of this polls choice in the language. Uses the default language if no localization exists for the requested language.
165            *
166            * @param languageId the ID of the language
167            * @return the localized description of this polls choice
168            */
169            public java.lang.String getDescription(java.lang.String languageId) {
170                    return _pollsChoice.getDescription(languageId);
171            }
172    
173            /**
174            * Returns the localized description of this polls choice in the language, optionally using the default language if no localization exists for the requested language.
175            *
176            * @param languageId the ID of the language
177            * @param useDefault whether to use the default language if no localization exists for the requested language
178            * @return the localized description of this polls choice
179            */
180            public java.lang.String getDescription(java.lang.String languageId,
181                    boolean useDefault) {
182                    return _pollsChoice.getDescription(languageId, useDefault);
183            }
184    
185            public java.lang.String getDescriptionCurrentLanguageId() {
186                    return _pollsChoice.getDescriptionCurrentLanguageId();
187            }
188    
189            public java.lang.String getDescriptionCurrentValue() {
190                    return _pollsChoice.getDescriptionCurrentValue();
191            }
192    
193            /**
194            * Returns a map of the locales and localized descriptions of this polls choice.
195            *
196            * @return the locales and localized descriptions of this polls choice
197            */
198            public java.util.Map<java.util.Locale, java.lang.String> getDescriptionMap() {
199                    return _pollsChoice.getDescriptionMap();
200            }
201    
202            /**
203            * Sets the description of this polls choice.
204            *
205            * @param description the description of this polls choice
206            */
207            public void setDescription(java.lang.String description) {
208                    _pollsChoice.setDescription(description);
209            }
210    
211            /**
212            * Sets the localized description of this polls choice in the language.
213            *
214            * @param description the localized description of this polls choice
215            * @param locale the locale of the language
216            */
217            public void setDescription(java.lang.String description,
218                    java.util.Locale locale) {
219                    _pollsChoice.setDescription(description, locale);
220            }
221    
222            /**
223            * Sets the localized description of this polls choice in the language, and sets the default locale.
224            *
225            * @param description the localized description of this polls choice
226            * @param locale the locale of the language
227            * @param defaultLocale the default locale
228            */
229            public void setDescription(java.lang.String description,
230                    java.util.Locale locale, java.util.Locale defaultLocale) {
231                    _pollsChoice.setDescription(description, locale, defaultLocale);
232            }
233    
234            public void setDescriptionCurrentLanguageId(java.lang.String languageId) {
235                    _pollsChoice.setDescriptionCurrentLanguageId(languageId);
236            }
237    
238            /**
239            * Sets the localized descriptions of this polls choice from the map of locales and localized descriptions.
240            *
241            * @param descriptionMap the locales and localized descriptions of this polls choice
242            */
243            public void setDescriptionMap(
244                    java.util.Map<java.util.Locale, java.lang.String> descriptionMap) {
245                    _pollsChoice.setDescriptionMap(descriptionMap);
246            }
247    
248            /**
249            * Sets the localized descriptions of this polls choice from the map of locales and localized descriptions, and sets the default locale.
250            *
251            * @param descriptionMap the locales and localized descriptions of this polls choice
252            * @param defaultLocale the default locale
253            */
254            public void setDescriptionMap(
255                    java.util.Map<java.util.Locale, java.lang.String> descriptionMap,
256                    java.util.Locale defaultLocale) {
257                    _pollsChoice.setDescriptionMap(descriptionMap, defaultLocale);
258            }
259    
260            public boolean isNew() {
261                    return _pollsChoice.isNew();
262            }
263    
264            public void setNew(boolean n) {
265                    _pollsChoice.setNew(n);
266            }
267    
268            public boolean isCachedModel() {
269                    return _pollsChoice.isCachedModel();
270            }
271    
272            public void setCachedModel(boolean cachedModel) {
273                    _pollsChoice.setCachedModel(cachedModel);
274            }
275    
276            public boolean isEscapedModel() {
277                    return _pollsChoice.isEscapedModel();
278            }
279    
280            public java.io.Serializable getPrimaryKeyObj() {
281                    return _pollsChoice.getPrimaryKeyObj();
282            }
283    
284            public void setPrimaryKeyObj(java.io.Serializable primaryKeyObj) {
285                    _pollsChoice.setPrimaryKeyObj(primaryKeyObj);
286            }
287    
288            public com.liferay.portlet.expando.model.ExpandoBridge getExpandoBridge() {
289                    return _pollsChoice.getExpandoBridge();
290            }
291    
292            public void setExpandoBridgeAttributes(
293                    com.liferay.portal.service.ServiceContext serviceContext) {
294                    _pollsChoice.setExpandoBridgeAttributes(serviceContext);
295            }
296    
297            @Override
298            public java.lang.Object clone() {
299                    return new PollsChoiceWrapper((PollsChoice)_pollsChoice.clone());
300            }
301    
302            public int compareTo(
303                    com.liferay.portlet.polls.model.PollsChoice pollsChoice) {
304                    return _pollsChoice.compareTo(pollsChoice);
305            }
306    
307            @Override
308            public int hashCode() {
309                    return _pollsChoice.hashCode();
310            }
311    
312            public com.liferay.portal.model.CacheModel<com.liferay.portlet.polls.model.PollsChoice> toCacheModel() {
313                    return _pollsChoice.toCacheModel();
314            }
315    
316            public com.liferay.portlet.polls.model.PollsChoice toEscapedModel() {
317                    return new PollsChoiceWrapper(_pollsChoice.toEscapedModel());
318            }
319    
320            @Override
321            public java.lang.String toString() {
322                    return _pollsChoice.toString();
323            }
324    
325            public java.lang.String toXmlString() {
326                    return _pollsChoice.toXmlString();
327            }
328    
329            public void persist()
330                    throws com.liferay.portal.kernel.exception.SystemException {
331                    _pollsChoice.persist();
332            }
333    
334            public int getVotesCount()
335                    throws com.liferay.portal.kernel.exception.SystemException {
336                    return _pollsChoice.getVotesCount();
337            }
338    
339            /**
340             * @deprecated Renamed to {@link #getWrappedModel}
341             */
342            public PollsChoice getWrappedPollsChoice() {
343                    return _pollsChoice;
344            }
345    
346            public PollsChoice getWrappedModel() {
347                    return _pollsChoice;
348            }
349    
350            public void resetOriginalValues() {
351                    _pollsChoice.resetOriginalValues();
352            }
353    
354            private PollsChoice _pollsChoice;
355    }