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.kernel.exception.SystemException; 020 import com.liferay.portal.model.BaseModel; 021 import com.liferay.portal.model.CacheModel; 022 import com.liferay.portal.model.StagedGroupedModel; 023 import com.liferay.portal.service.ServiceContext; 024 025 import com.liferay.portlet.expando.model.ExpandoBridge; 026 027 import java.io.Serializable; 028 029 import java.util.Date; 030 import java.util.Locale; 031 import java.util.Map; 032 033 /** 034 * 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. 035 * 036 * <p> 037 * 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}. 038 * </p> 039 * 040 * @author Brian Wing Shun Chan 041 * @see PollsChoice 042 * @see com.liferay.portlet.polls.model.impl.PollsChoiceImpl 043 * @see com.liferay.portlet.polls.model.impl.PollsChoiceModelImpl 044 * @generated 045 */ 046 public interface PollsChoiceModel extends BaseModel<PollsChoice>, 047 StagedGroupedModel { 048 /* 049 * NOTE FOR DEVELOPERS: 050 * 051 * Never modify or reference this interface directly. All methods that expect a polls choice model instance should use the {@link PollsChoice} interface instead. 052 */ 053 054 /** 055 * Returns the primary key of this polls choice. 056 * 057 * @return the primary key of this polls choice 058 */ 059 public long getPrimaryKey(); 060 061 /** 062 * Sets the primary key of this polls choice. 063 * 064 * @param primaryKey the primary key of this polls choice 065 */ 066 public void setPrimaryKey(long primaryKey); 067 068 /** 069 * Returns the uuid of this polls choice. 070 * 071 * @return the uuid of this polls choice 072 */ 073 @AutoEscape 074 @Override 075 public String getUuid(); 076 077 /** 078 * Sets the uuid of this polls choice. 079 * 080 * @param uuid the uuid of this polls choice 081 */ 082 @Override 083 public void setUuid(String uuid); 084 085 /** 086 * Returns the choice ID of this polls choice. 087 * 088 * @return the choice ID of this polls choice 089 */ 090 public long getChoiceId(); 091 092 /** 093 * Sets the choice ID of this polls choice. 094 * 095 * @param choiceId the choice ID of this polls choice 096 */ 097 public void setChoiceId(long choiceId); 098 099 /** 100 * Returns the group ID of this polls choice. 101 * 102 * @return the group ID of this polls choice 103 */ 104 @Override 105 public long getGroupId(); 106 107 /** 108 * Sets the group ID of this polls choice. 109 * 110 * @param groupId the group ID of this polls choice 111 */ 112 @Override 113 public void setGroupId(long groupId); 114 115 /** 116 * Returns the company ID of this polls choice. 117 * 118 * @return the company ID of this polls choice 119 */ 120 @Override 121 public long getCompanyId(); 122 123 /** 124 * Sets the company ID of this polls choice. 125 * 126 * @param companyId the company ID of this polls choice 127 */ 128 @Override 129 public void setCompanyId(long companyId); 130 131 /** 132 * Returns the user ID of this polls choice. 133 * 134 * @return the user ID of this polls choice 135 */ 136 @Override 137 public long getUserId(); 138 139 /** 140 * Sets the user ID of this polls choice. 141 * 142 * @param userId the user ID of this polls choice 143 */ 144 @Override 145 public void setUserId(long userId); 146 147 /** 148 * Returns the user uuid of this polls choice. 149 * 150 * @return the user uuid of this polls choice 151 * @throws SystemException if a system exception occurred 152 */ 153 @Override 154 public String getUserUuid() throws SystemException; 155 156 /** 157 * Sets the user uuid of this polls choice. 158 * 159 * @param userUuid the user uuid of this polls choice 160 */ 161 @Override 162 public void setUserUuid(String userUuid); 163 164 /** 165 * Returns the user name of this polls choice. 166 * 167 * @return the user name of this polls choice 168 */ 169 @AutoEscape 170 @Override 171 public String getUserName(); 172 173 /** 174 * Sets the user name of this polls choice. 175 * 176 * @param userName the user name of this polls choice 177 */ 178 @Override 179 public void setUserName(String userName); 180 181 /** 182 * Returns the create date of this polls choice. 183 * 184 * @return the create date of this polls choice 185 */ 186 @Override 187 public Date getCreateDate(); 188 189 /** 190 * Sets the create date of this polls choice. 191 * 192 * @param createDate the create date of this polls choice 193 */ 194 @Override 195 public void setCreateDate(Date createDate); 196 197 /** 198 * Returns the modified date of this polls choice. 199 * 200 * @return the modified date of this polls choice 201 */ 202 @Override 203 public Date getModifiedDate(); 204 205 /** 206 * Sets the modified date of this polls choice. 207 * 208 * @param modifiedDate the modified date of this polls choice 209 */ 210 @Override 211 public void setModifiedDate(Date modifiedDate); 212 213 /** 214 * Returns the question ID of this polls choice. 215 * 216 * @return the question ID of this polls choice 217 */ 218 public long getQuestionId(); 219 220 /** 221 * Sets the question ID of this polls choice. 222 * 223 * @param questionId the question ID of this polls choice 224 */ 225 public void setQuestionId(long questionId); 226 227 /** 228 * Returns the name of this polls choice. 229 * 230 * @return the name of this polls choice 231 */ 232 @AutoEscape 233 public String getName(); 234 235 /** 236 * Sets the name of this polls choice. 237 * 238 * @param name the name of this polls choice 239 */ 240 public void setName(String name); 241 242 /** 243 * Returns the description of this polls choice. 244 * 245 * @return the description of this polls choice 246 */ 247 public String getDescription(); 248 249 /** 250 * Returns the localized description of this polls choice in the language. Uses the default language if no localization exists for the requested language. 251 * 252 * @param locale the locale of the language 253 * @return the localized description of this polls choice 254 */ 255 @AutoEscape 256 public String getDescription(Locale locale); 257 258 /** 259 * Returns the localized description of this polls choice in the language, optionally using the default language if no localization exists for the requested language. 260 * 261 * @param locale the local of the language 262 * @param useDefault whether to use the default language if no localization exists for the requested language 263 * @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. 264 */ 265 @AutoEscape 266 public String getDescription(Locale locale, boolean useDefault); 267 268 /** 269 * Returns the localized description of this polls choice in the language. Uses the default language if no localization exists for the requested language. 270 * 271 * @param languageId the ID of the language 272 * @return the localized description of this polls choice 273 */ 274 @AutoEscape 275 public String getDescription(String languageId); 276 277 /** 278 * Returns the localized description of this polls choice in the language, optionally using the default language if no localization exists for the requested language. 279 * 280 * @param languageId the ID of the language 281 * @param useDefault whether to use the default language if no localization exists for the requested language 282 * @return the localized description of this polls choice 283 */ 284 @AutoEscape 285 public String getDescription(String languageId, boolean useDefault); 286 287 @AutoEscape 288 public String getDescriptionCurrentLanguageId(); 289 290 @AutoEscape 291 public String getDescriptionCurrentValue(); 292 293 /** 294 * Returns a map of the locales and localized descriptions of this polls choice. 295 * 296 * @return the locales and localized descriptions of this polls choice 297 */ 298 public Map<Locale, String> getDescriptionMap(); 299 300 /** 301 * Sets the description of this polls choice. 302 * 303 * @param description the description of this polls choice 304 */ 305 public void setDescription(String description); 306 307 /** 308 * Sets the localized description of this polls choice in the language. 309 * 310 * @param description the localized description of this polls choice 311 * @param locale the locale of the language 312 */ 313 public void setDescription(String description, Locale locale); 314 315 /** 316 * Sets the localized description of this polls choice in the language, and sets the default locale. 317 * 318 * @param description the localized description of this polls choice 319 * @param locale the locale of the language 320 * @param defaultLocale the default locale 321 */ 322 public void setDescription(String description, Locale locale, 323 Locale defaultLocale); 324 325 public void setDescriptionCurrentLanguageId(String languageId); 326 327 /** 328 * Sets the localized descriptions of this polls choice from the map of locales and localized descriptions. 329 * 330 * @param descriptionMap the locales and localized descriptions of this polls choice 331 */ 332 public void setDescriptionMap(Map<Locale, String> descriptionMap); 333 334 /** 335 * Sets the localized descriptions of this polls choice from the map of locales and localized descriptions, and sets the default locale. 336 * 337 * @param descriptionMap the locales and localized descriptions of this polls choice 338 * @param defaultLocale the default locale 339 */ 340 public void setDescriptionMap(Map<Locale, String> descriptionMap, 341 Locale defaultLocale); 342 343 @Override 344 public boolean isNew(); 345 346 @Override 347 public void setNew(boolean n); 348 349 @Override 350 public boolean isCachedModel(); 351 352 @Override 353 public void setCachedModel(boolean cachedModel); 354 355 @Override 356 public boolean isEscapedModel(); 357 358 @Override 359 public Serializable getPrimaryKeyObj(); 360 361 @Override 362 public void setPrimaryKeyObj(Serializable primaryKeyObj); 363 364 @Override 365 public ExpandoBridge getExpandoBridge(); 366 367 @Override 368 public void setExpandoBridgeAttributes(BaseModel<?> baseModel); 369 370 @Override 371 public void setExpandoBridgeAttributes(ExpandoBridge expandoBridge); 372 373 @Override 374 public void setExpandoBridgeAttributes(ServiceContext serviceContext); 375 376 public String[] getAvailableLanguageIds(); 377 378 public String getDefaultLanguageId(); 379 380 public void prepareLocalizedFieldsForImport() throws LocaleException; 381 382 public void prepareLocalizedFieldsForImport(Locale defaultImportLocale) 383 throws LocaleException; 384 385 @Override 386 public Object clone(); 387 388 @Override 389 public int compareTo(PollsChoice pollsChoice); 390 391 @Override 392 public int hashCode(); 393 394 @Override 395 public CacheModel<PollsChoice> toCacheModel(); 396 397 @Override 398 public PollsChoice toEscapedModel(); 399 400 @Override 401 public PollsChoice toUnescapedModel(); 402 403 @Override 404 public String toString(); 405 406 @Override 407 public String toXmlString(); 408 }