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.portal.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.service.ServiceContext; 021 022 import com.liferay.portlet.expando.model.ExpandoBridge; 023 024 import java.io.Serializable; 025 026 import java.util.Date; 027 import java.util.Locale; 028 import java.util.Map; 029 030 /** 031 * The base model interface for the Role service. Represents a row in the "Role_" 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.portal.model.impl.RoleModelImpl} 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.portal.model.impl.RoleImpl}. 035 * </p> 036 * 037 * @author Brian Wing Shun Chan 038 * @see Role 039 * @see com.liferay.portal.model.impl.RoleImpl 040 * @see com.liferay.portal.model.impl.RoleModelImpl 041 * @generated 042 */ 043 public interface RoleModel extends AttachedModel, BaseModel<Role>, 044 StagedAuditedModel { 045 /* 046 * NOTE FOR DEVELOPERS: 047 * 048 * Never modify or reference this interface directly. All methods that expect a role model instance should use the {@link Role} interface instead. 049 */ 050 051 /** 052 * Returns the primary key of this role. 053 * 054 * @return the primary key of this role 055 */ 056 public long getPrimaryKey(); 057 058 /** 059 * Sets the primary key of this role. 060 * 061 * @param primaryKey the primary key of this role 062 */ 063 public void setPrimaryKey(long primaryKey); 064 065 /** 066 * Returns the uuid of this role. 067 * 068 * @return the uuid of this role 069 */ 070 @AutoEscape 071 @Override 072 public String getUuid(); 073 074 /** 075 * Sets the uuid of this role. 076 * 077 * @param uuid the uuid of this role 078 */ 079 @Override 080 public void setUuid(String uuid); 081 082 /** 083 * Returns the role ID of this role. 084 * 085 * @return the role ID of this role 086 */ 087 public long getRoleId(); 088 089 /** 090 * Sets the role ID of this role. 091 * 092 * @param roleId the role ID of this role 093 */ 094 public void setRoleId(long roleId); 095 096 /** 097 * Returns the company ID of this role. 098 * 099 * @return the company ID of this role 100 */ 101 @Override 102 public long getCompanyId(); 103 104 /** 105 * Sets the company ID of this role. 106 * 107 * @param companyId the company ID of this role 108 */ 109 @Override 110 public void setCompanyId(long companyId); 111 112 /** 113 * Returns the user ID of this role. 114 * 115 * @return the user ID of this role 116 */ 117 @Override 118 public long getUserId(); 119 120 /** 121 * Sets the user ID of this role. 122 * 123 * @param userId the user ID of this role 124 */ 125 @Override 126 public void setUserId(long userId); 127 128 /** 129 * Returns the user uuid of this role. 130 * 131 * @return the user uuid of this role 132 * @throws SystemException if a system exception occurred 133 */ 134 @Override 135 public String getUserUuid() throws SystemException; 136 137 /** 138 * Sets the user uuid of this role. 139 * 140 * @param userUuid the user uuid of this role 141 */ 142 @Override 143 public void setUserUuid(String userUuid); 144 145 /** 146 * Returns the user name of this role. 147 * 148 * @return the user name of this role 149 */ 150 @AutoEscape 151 @Override 152 public String getUserName(); 153 154 /** 155 * Sets the user name of this role. 156 * 157 * @param userName the user name of this role 158 */ 159 @Override 160 public void setUserName(String userName); 161 162 /** 163 * Returns the create date of this role. 164 * 165 * @return the create date of this role 166 */ 167 @Override 168 public Date getCreateDate(); 169 170 /** 171 * Sets the create date of this role. 172 * 173 * @param createDate the create date of this role 174 */ 175 @Override 176 public void setCreateDate(Date createDate); 177 178 /** 179 * Returns the modified date of this role. 180 * 181 * @return the modified date of this role 182 */ 183 @Override 184 public Date getModifiedDate(); 185 186 /** 187 * Sets the modified date of this role. 188 * 189 * @param modifiedDate the modified date of this role 190 */ 191 @Override 192 public void setModifiedDate(Date modifiedDate); 193 194 /** 195 * Returns the fully qualified class name of this role. 196 * 197 * @return the fully qualified class name of this role 198 */ 199 @Override 200 public String getClassName(); 201 202 public void setClassName(String className); 203 204 /** 205 * Returns the class name ID of this role. 206 * 207 * @return the class name ID of this role 208 */ 209 @Override 210 public long getClassNameId(); 211 212 /** 213 * Sets the class name ID of this role. 214 * 215 * @param classNameId the class name ID of this role 216 */ 217 @Override 218 public void setClassNameId(long classNameId); 219 220 /** 221 * Returns the class p k of this role. 222 * 223 * @return the class p k of this role 224 */ 225 @Override 226 public long getClassPK(); 227 228 /** 229 * Sets the class p k of this role. 230 * 231 * @param classPK the class p k of this role 232 */ 233 @Override 234 public void setClassPK(long classPK); 235 236 /** 237 * Returns the name of this role. 238 * 239 * @return the name of this role 240 */ 241 @AutoEscape 242 public String getName(); 243 244 /** 245 * Sets the name of this role. 246 * 247 * @param name the name of this role 248 */ 249 public void setName(String name); 250 251 /** 252 * Returns the title of this role. 253 * 254 * @return the title of this role 255 */ 256 public String getTitle(); 257 258 /** 259 * Returns the localized title of this role in the language. Uses the default language if no localization exists for the requested language. 260 * 261 * @param locale the locale of the language 262 * @return the localized title of this role 263 */ 264 @AutoEscape 265 public String getTitle(Locale locale); 266 267 /** 268 * Returns the localized title of this role in the language, optionally using the default language if no localization exists for the requested language. 269 * 270 * @param locale the local of the language 271 * @param useDefault whether to use the default language if no localization exists for the requested language 272 * @return the localized title of this role. If <code>useDefault</code> is <code>false</code> and no localization exists for the requested language, an empty string will be returned. 273 */ 274 @AutoEscape 275 public String getTitle(Locale locale, boolean useDefault); 276 277 /** 278 * Returns the localized title of this role in the language. Uses the default language if no localization exists for the requested language. 279 * 280 * @param languageId the ID of the language 281 * @return the localized title of this role 282 */ 283 @AutoEscape 284 public String getTitle(String languageId); 285 286 /** 287 * Returns the localized title of this role in the language, optionally using the default language if no localization exists for the requested language. 288 * 289 * @param languageId the ID of the language 290 * @param useDefault whether to use the default language if no localization exists for the requested language 291 * @return the localized title of this role 292 */ 293 @AutoEscape 294 public String getTitle(String languageId, boolean useDefault); 295 296 @AutoEscape 297 public String getTitleCurrentLanguageId(); 298 299 @AutoEscape 300 public String getTitleCurrentValue(); 301 302 /** 303 * Returns a map of the locales and localized titles of this role. 304 * 305 * @return the locales and localized titles of this role 306 */ 307 public Map<Locale, String> getTitleMap(); 308 309 /** 310 * Sets the title of this role. 311 * 312 * @param title the title of this role 313 */ 314 public void setTitle(String title); 315 316 /** 317 * Sets the localized title of this role in the language. 318 * 319 * @param title the localized title of this role 320 * @param locale the locale of the language 321 */ 322 public void setTitle(String title, Locale locale); 323 324 /** 325 * Sets the localized title of this role in the language, and sets the default locale. 326 * 327 * @param title the localized title of this role 328 * @param locale the locale of the language 329 * @param defaultLocale the default locale 330 */ 331 public void setTitle(String title, Locale locale, Locale defaultLocale); 332 333 public void setTitleCurrentLanguageId(String languageId); 334 335 /** 336 * Sets the localized titles of this role from the map of locales and localized titles. 337 * 338 * @param titleMap the locales and localized titles of this role 339 */ 340 public void setTitleMap(Map<Locale, String> titleMap); 341 342 /** 343 * Sets the localized titles of this role from the map of locales and localized titles, and sets the default locale. 344 * 345 * @param titleMap the locales and localized titles of this role 346 * @param defaultLocale the default locale 347 */ 348 public void setTitleMap(Map<Locale, String> titleMap, Locale defaultLocale); 349 350 /** 351 * Returns the description of this role. 352 * 353 * @return the description of this role 354 */ 355 public String getDescription(); 356 357 /** 358 * Returns the localized description of this role in the language. Uses the default language if no localization exists for the requested language. 359 * 360 * @param locale the locale of the language 361 * @return the localized description of this role 362 */ 363 @AutoEscape 364 public String getDescription(Locale locale); 365 366 /** 367 * Returns the localized description of this role in the language, optionally using the default language if no localization exists for the requested language. 368 * 369 * @param locale the local of the language 370 * @param useDefault whether to use the default language if no localization exists for the requested language 371 * @return the localized description of this role. If <code>useDefault</code> is <code>false</code> and no localization exists for the requested language, an empty string will be returned. 372 */ 373 @AutoEscape 374 public String getDescription(Locale locale, boolean useDefault); 375 376 /** 377 * Returns the localized description of this role in the language. Uses the default language if no localization exists for the requested language. 378 * 379 * @param languageId the ID of the language 380 * @return the localized description of this role 381 */ 382 @AutoEscape 383 public String getDescription(String languageId); 384 385 /** 386 * Returns the localized description of this role in the language, optionally using the default language if no localization exists for the requested language. 387 * 388 * @param languageId the ID of the language 389 * @param useDefault whether to use the default language if no localization exists for the requested language 390 * @return the localized description of this role 391 */ 392 @AutoEscape 393 public String getDescription(String languageId, boolean useDefault); 394 395 @AutoEscape 396 public String getDescriptionCurrentLanguageId(); 397 398 @AutoEscape 399 public String getDescriptionCurrentValue(); 400 401 /** 402 * Returns a map of the locales and localized descriptions of this role. 403 * 404 * @return the locales and localized descriptions of this role 405 */ 406 public Map<Locale, String> getDescriptionMap(); 407 408 /** 409 * Sets the description of this role. 410 * 411 * @param description the description of this role 412 */ 413 public void setDescription(String description); 414 415 /** 416 * Sets the localized description of this role in the language. 417 * 418 * @param description the localized description of this role 419 * @param locale the locale of the language 420 */ 421 public void setDescription(String description, Locale locale); 422 423 /** 424 * Sets the localized description of this role in the language, and sets the default locale. 425 * 426 * @param description the localized description of this role 427 * @param locale the locale of the language 428 * @param defaultLocale the default locale 429 */ 430 public void setDescription(String description, Locale locale, 431 Locale defaultLocale); 432 433 public void setDescriptionCurrentLanguageId(String languageId); 434 435 /** 436 * Sets the localized descriptions of this role from the map of locales and localized descriptions. 437 * 438 * @param descriptionMap the locales and localized descriptions of this role 439 */ 440 public void setDescriptionMap(Map<Locale, String> descriptionMap); 441 442 /** 443 * Sets the localized descriptions of this role from the map of locales and localized descriptions, and sets the default locale. 444 * 445 * @param descriptionMap the locales and localized descriptions of this role 446 * @param defaultLocale the default locale 447 */ 448 public void setDescriptionMap(Map<Locale, String> descriptionMap, 449 Locale defaultLocale); 450 451 /** 452 * Returns the type of this role. 453 * 454 * @return the type of this role 455 */ 456 public int getType(); 457 458 /** 459 * Sets the type of this role. 460 * 461 * @param type the type of this role 462 */ 463 public void setType(int type); 464 465 /** 466 * Returns the subtype of this role. 467 * 468 * @return the subtype of this role 469 */ 470 @AutoEscape 471 public String getSubtype(); 472 473 /** 474 * Sets the subtype of this role. 475 * 476 * @param subtype the subtype of this role 477 */ 478 public void setSubtype(String subtype); 479 480 @Override 481 public boolean isNew(); 482 483 @Override 484 public void setNew(boolean n); 485 486 @Override 487 public boolean isCachedModel(); 488 489 @Override 490 public void setCachedModel(boolean cachedModel); 491 492 @Override 493 public boolean isEscapedModel(); 494 495 @Override 496 public Serializable getPrimaryKeyObj(); 497 498 @Override 499 public void setPrimaryKeyObj(Serializable primaryKeyObj); 500 501 @Override 502 public ExpandoBridge getExpandoBridge(); 503 504 @Override 505 public void setExpandoBridgeAttributes(BaseModel<?> baseModel); 506 507 @Override 508 public void setExpandoBridgeAttributes(ExpandoBridge expandoBridge); 509 510 @Override 511 public void setExpandoBridgeAttributes(ServiceContext serviceContext); 512 513 public String[] getAvailableLanguageIds(); 514 515 public String getDefaultLanguageId(); 516 517 public void prepareLocalizedFieldsForImport() throws LocaleException; 518 519 public void prepareLocalizedFieldsForImport(Locale defaultImportLocale) 520 throws LocaleException; 521 522 @Override 523 public Object clone(); 524 525 @Override 526 public int compareTo(Role role); 527 528 @Override 529 public int hashCode(); 530 531 @Override 532 public CacheModel<Role> toCacheModel(); 533 534 @Override 535 public Role toEscapedModel(); 536 537 @Override 538 public Role toUnescapedModel(); 539 540 @Override 541 public String toString(); 542 543 @Override 544 public String toXmlString(); 545 }