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