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