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