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