001 /** 002 * Copyright (c) 2000-2011 Liferay, Inc. All rights reserved. 003 * 004 * The contents of this file are subject to the terms of the Liferay Enterprise 005 * Subscription License ("License"). You may not use this file except in 006 * compliance with the License. You can obtain a copy of the License by 007 * contacting Liferay, Inc. See the License for the specific language governing 008 * permissions and limitations under the License, including but not limited to 009 * distribution rights of the Software. 010 * 011 * 012 * 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 * Gets 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 * Gets 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 * Gets 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 * Gets the class name of the model instance this role is polymorphically associated with. 091 * 092 * @return the class name of the model instance this role is polymorphically associated with 093 */ 094 public String getClassName(); 095 096 /** 097 * Gets 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 * Gets 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 * Gets 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 * Gets the title of this role. 141 * 142 * @return the title of this role 143 */ 144 public String getTitle(); 145 146 /** 147 * Gets the localized title of this role. Uses the default language if no localization exists for the requested language. 148 * 149 * @param locale the locale to get the localized title for 150 * @return the localized title of this role 151 */ 152 public String getTitle(Locale locale); 153 154 /** 155 * Gets the localized title of this role, optionally using the default language if no localization exists for the requested language. 156 * 157 * @param locale the local to get the localized title for 158 * @param useDefault whether to use the default language if no localization exists for the requested language 159 * @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. 160 */ 161 public String getTitle(Locale locale, boolean useDefault); 162 163 /** 164 * Gets the localized title of this role. Uses the default language if no localization exists for the requested language. 165 * 166 * @param languageId the id of the language to get the localized title for 167 * @return the localized title of this role 168 */ 169 public String getTitle(String languageId); 170 171 /** 172 * Gets the localized title of this role, optionally using the default language if no localization exists for the requested language. 173 * 174 * @param languageId the id of the language to get the localized title for 175 * @param useDefault whether to use the default language if no localization exists for the requested language 176 * @return the localized title of this role 177 */ 178 public String getTitle(String languageId, boolean useDefault); 179 180 /** 181 * Gets a map of the locales and localized title of this role. 182 * 183 * @return the locales and localized title 184 */ 185 public Map<Locale, String> getTitleMap(); 186 187 /** 188 * Sets the title of this role. 189 * 190 * @param title the title of this role 191 */ 192 public void setTitle(String title); 193 194 /** 195 * Sets the localized title of this role. 196 * 197 * @param locale the locale to set the localized title for 198 * @param title the localized title of this role 199 */ 200 public void setTitle(Locale locale, String title); 201 202 /** 203 * Sets the localized titles of this role from the map of locales and localized titles. 204 * 205 * @param titleMap the locales and localized titles of this role 206 */ 207 public void setTitleMap(Map<Locale, String> titleMap); 208 209 /** 210 * Gets the description of this role. 211 * 212 * @return the description of this role 213 */ 214 @AutoEscape 215 public String getDescription(); 216 217 /** 218 * Sets the description of this role. 219 * 220 * @param description the description of this role 221 */ 222 public void setDescription(String description); 223 224 /** 225 * Gets the type of this role. 226 * 227 * @return the type of this role 228 */ 229 public int getType(); 230 231 /** 232 * Sets the type of this role. 233 * 234 * @param type the type of this role 235 */ 236 public void setType(int type); 237 238 /** 239 * Gets the subtype of this role. 240 * 241 * @return the subtype of this role 242 */ 243 @AutoEscape 244 public String getSubtype(); 245 246 /** 247 * Sets the subtype of this role. 248 * 249 * @param subtype the subtype of this role 250 */ 251 public void setSubtype(String subtype); 252 253 public boolean isNew(); 254 255 public void setNew(boolean n); 256 257 public boolean isCachedModel(); 258 259 public void setCachedModel(boolean cachedModel); 260 261 public boolean isEscapedModel(); 262 263 public void setEscapedModel(boolean escapedModel); 264 265 public Serializable getPrimaryKeyObj(); 266 267 public void setPrimaryKeyObj(Serializable primaryKeyObj); 268 269 public ExpandoBridge getExpandoBridge(); 270 271 public void setExpandoBridgeAttributes(ServiceContext serviceContext); 272 273 public Object clone(); 274 275 public int compareTo(Role role); 276 277 public int hashCode(); 278 279 public CacheModel<Role> toCacheModel(); 280 281 public Role toEscapedModel(); 282 283 public String toString(); 284 285 public String toXmlString(); 286 }