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