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.kernel.bean.AutoEscape;
018    import com.liferay.portal.model.BaseModel;
019    import com.liferay.portal.model.CacheModel;
020    import com.liferay.portal.service.ServiceContext;
021    
022    import com.liferay.portlet.expando.model.ExpandoBridge;
023    
024    import java.io.Serializable;
025    
026    import java.util.Locale;
027    import java.util.Map;
028    
029    /**
030     * The base model interface for the PollsChoice service. Represents a row in the "PollsChoice" database table, with each column mapped to a property of this class.
031     *
032     * <p>
033     * This interface and its corresponding implementation {@link com.liferay.portlet.polls.model.impl.PollsChoiceModelImpl} exist only as a container for the default property accessors generated by ServiceBuilder. Helper methods and all application logic should be put in {@link com.liferay.portlet.polls.model.impl.PollsChoiceImpl}.
034     * </p>
035     *
036     * @author Brian Wing Shun Chan
037     * @see PollsChoice
038     * @see com.liferay.portlet.polls.model.impl.PollsChoiceImpl
039     * @see com.liferay.portlet.polls.model.impl.PollsChoiceModelImpl
040     * @generated
041     */
042    public interface PollsChoiceModel extends BaseModel<PollsChoice> {
043            /*
044             * NOTE FOR DEVELOPERS:
045             *
046             * Never modify or reference this interface directly. All methods that expect a polls choice model instance should use the {@link PollsChoice} interface instead.
047             */
048    
049            /**
050             * Returns the primary key of this polls choice.
051             *
052             * @return the primary key of this polls choice
053             */
054            public long getPrimaryKey();
055    
056            /**
057             * Sets the primary key of this polls choice.
058             *
059             * @param primaryKey the primary key of this polls choice
060             */
061            public void setPrimaryKey(long primaryKey);
062    
063            /**
064             * Returns the uuid of this polls choice.
065             *
066             * @return the uuid of this polls choice
067             */
068            @AutoEscape
069            public String getUuid();
070    
071            /**
072             * Sets the uuid of this polls choice.
073             *
074             * @param uuid the uuid of this polls choice
075             */
076            public void setUuid(String uuid);
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    
085            /**
086             * Sets the choice ID of this polls choice.
087             *
088             * @param choiceId the choice ID of this polls choice
089             */
090            public void setChoiceId(long choiceId);
091    
092            /**
093             * Returns the question ID of this polls choice.
094             *
095             * @return the question ID of this polls choice
096             */
097            public long getQuestionId();
098    
099            /**
100             * Sets the question ID of this polls choice.
101             *
102             * @param questionId the question ID of this polls choice
103             */
104            public void setQuestionId(long questionId);
105    
106            /**
107             * Returns the name of this polls choice.
108             *
109             * @return the name of this polls choice
110             */
111            @AutoEscape
112            public String getName();
113    
114            /**
115             * Sets the name of this polls choice.
116             *
117             * @param name the name of this polls choice
118             */
119            public void setName(String name);
120    
121            /**
122             * Returns the description of this polls choice.
123             *
124             * @return the description of this polls choice
125             */
126            public String getDescription();
127    
128            /**
129             * Returns the localized description of this polls choice in the language. Uses the default language if no localization exists for the requested language.
130             *
131             * @param locale the locale of the language
132             * @return the localized description of this polls choice
133             */
134            @AutoEscape
135            public String getDescription(Locale locale);
136    
137            /**
138             * Returns the localized description of this polls choice in the language, optionally using the default language if no localization exists for the requested language.
139             *
140             * @param locale the local of the language
141             * @param useDefault whether to use the default language if no localization exists for the requested language
142             * @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.
143             */
144            @AutoEscape
145            public String getDescription(Locale locale, boolean useDefault);
146    
147            /**
148             * Returns the localized description of this polls choice in the language. Uses the default language if no localization exists for the requested language.
149             *
150             * @param languageId the ID of the language
151             * @return the localized description of this polls choice
152             */
153            @AutoEscape
154            public String getDescription(String languageId);
155    
156            /**
157             * Returns the localized description of this polls choice in the language, optionally using the default language if no localization exists for the requested language.
158             *
159             * @param languageId the ID of the language
160             * @param useDefault whether to use the default language if no localization exists for the requested language
161             * @return the localized description of this polls choice
162             */
163            @AutoEscape
164            public String getDescription(String languageId, boolean useDefault);
165    
166            @AutoEscape
167            public String getDescriptionCurrentLanguageId();
168    
169            @AutoEscape
170            public String getDescriptionCurrentValue();
171    
172            /**
173             * Returns a map of the locales and localized descriptions of this polls choice.
174             *
175             * @return the locales and localized descriptions of this polls choice
176             */
177            public Map<Locale, String> getDescriptionMap();
178    
179            /**
180             * Sets the description of this polls choice.
181             *
182             * @param description the description of this polls choice
183             */
184            public void setDescription(String description);
185    
186            /**
187             * Sets the localized description of this polls choice in the language.
188             *
189             * @param description the localized description of this polls choice
190             * @param locale the locale of the language
191             */
192            public void setDescription(String description, Locale locale);
193    
194            /**
195             * Sets the localized description of this polls choice in the language, and sets the default locale.
196             *
197             * @param description the localized description of this polls choice
198             * @param locale the locale of the language
199             * @param defaultLocale the default locale
200             */
201            public void setDescription(String description, Locale locale,
202                    Locale defaultLocale);
203    
204            public void setDescriptionCurrentLanguageId(String languageId);
205    
206            /**
207             * Sets the localized descriptions of this polls choice from the map of locales and localized descriptions.
208             *
209             * @param descriptionMap the locales and localized descriptions of this polls choice
210             */
211            public void setDescriptionMap(Map<Locale, String> descriptionMap);
212    
213            /**
214             * Sets the localized descriptions of this polls choice from the map of locales and localized descriptions, and sets the default locale.
215             *
216             * @param descriptionMap the locales and localized descriptions of this polls choice
217             * @param defaultLocale the default locale
218             */
219            public void setDescriptionMap(Map<Locale, String> descriptionMap,
220                    Locale defaultLocale);
221    
222            public boolean isNew();
223    
224            public void setNew(boolean n);
225    
226            public boolean isCachedModel();
227    
228            public void setCachedModel(boolean cachedModel);
229    
230            public boolean isEscapedModel();
231    
232            public Serializable getPrimaryKeyObj();
233    
234            public void setPrimaryKeyObj(Serializable primaryKeyObj);
235    
236            public ExpandoBridge getExpandoBridge();
237    
238            public void setExpandoBridgeAttributes(ServiceContext serviceContext);
239    
240            public Object clone();
241    
242            public int compareTo(PollsChoice pollsChoice);
243    
244            public int hashCode();
245    
246            public CacheModel<PollsChoice> toCacheModel();
247    
248            public PollsChoice toEscapedModel();
249    
250            public String toString();
251    
252            public String toXmlString();
253    }