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