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