001    /**
002     * Copyright (c) 2000-2010 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.annotation.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     * <p>
035     * Never modify or reference this interface directly. All methods that expect a role model instance should use the {@link Role} interface instead.
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    public interface RoleModel extends BaseModel<Role> {
045            /**
046             * Gets the primary key of this role.
047             *
048             * @return the primary key of this role
049             */
050            public long getPrimaryKey();
051    
052            /**
053             * Sets the primary key of this role
054             *
055             * @param pk the primary key of this role
056             */
057            public void setPrimaryKey(long pk);
058    
059            /**
060             * Gets the role id of this role.
061             *
062             * @return the role id of this role
063             */
064            public long getRoleId();
065    
066            /**
067             * Sets the role id of this role.
068             *
069             * @param roleId the role id of this role
070             */
071            public void setRoleId(long roleId);
072    
073            /**
074             * Gets the company id of this role.
075             *
076             * @return the company id of this role
077             */
078            public long getCompanyId();
079    
080            /**
081             * Sets the company id of this role.
082             *
083             * @param companyId the company id of this role
084             */
085            public void setCompanyId(long companyId);
086    
087            /**
088             * Gets the class name of the model instance this role is polymorphically associated with.
089             *
090             * @return the class name of the model instance this role is polymorphically associated with
091             */
092            public String getClassName();
093    
094            /**
095             * Gets the class name id of this role.
096             *
097             * @return the class name id of this role
098             */
099            public long getClassNameId();
100    
101            /**
102             * Sets the class name id of this role.
103             *
104             * @param classNameId the class name id of this role
105             */
106            public void setClassNameId(long classNameId);
107    
108            /**
109             * Gets the class p k of this role.
110             *
111             * @return the class p k of this role
112             */
113            public long getClassPK();
114    
115            /**
116             * Sets the class p k of this role.
117             *
118             * @param classPK the class p k of this role
119             */
120            public void setClassPK(long classPK);
121    
122            /**
123             * Gets the name of this role.
124             *
125             * @return the name of this role
126             */
127            @AutoEscape
128            public String getName();
129    
130            /**
131             * Sets the name of this role.
132             *
133             * @param name the name of this role
134             */
135            public void setName(String name);
136    
137            /**
138             * Gets the title of this role.
139             *
140             * @return the title of this role
141             */
142            public String getTitle();
143    
144            /**
145             * Gets the localized title of this role. Uses the default language if no localization exists for the requested language.
146             *
147             * @param locale the locale to get the localized title for
148             * @return the localized title of this role
149             */
150            public String getTitle(Locale locale);
151    
152            /**
153             * Gets the localized title of this role, optionally using the default language if no localization exists for the requested language.
154             *
155             * @param locale the local to get the localized title for
156             * @param useDefault whether to use the default language if no localization exists for the requested language
157             * @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.
158             */
159            public String getTitle(Locale locale, boolean useDefault);
160    
161            /**
162             * Gets the localized title of this role. Uses the default language if no localization exists for the requested language.
163             *
164             * @param languageId the id of the language to get the localized title for
165             * @return the localized title of this role
166             */
167            public String getTitle(String languageId);
168    
169            /**
170             * Gets the localized title of this role, optionally using the default language if no localization exists for the requested language.
171             *
172             * @param languageId the id of the language to get the localized title for
173             * @param useDefault whether to use the default language if no localization exists for the requested language
174             * @return the localized title of this role
175             */
176            public String getTitle(String languageId, boolean useDefault);
177    
178            /**
179             * Gets a map of the locales and localized title of this role.
180             *
181             * @return the locales and localized title
182             */
183            public Map<Locale, String> getTitleMap();
184    
185            /**
186             * Sets the title of this role.
187             *
188             * @param title the title of this role
189             */
190            public void setTitle(String title);
191    
192            /**
193             * Sets the localized title of this role.
194             *
195             * @param locale the locale to set the localized title for
196             * @param title the localized title of this role
197             */
198            public void setTitle(Locale locale, String title);
199    
200            /**
201             * Sets the localized titles of this role from the map of locales and localized titles.
202             *
203             * @param titleMap the locales and localized titles of this role
204             */
205            public void setTitleMap(Map<Locale, String> titleMap);
206    
207            /**
208             * Gets the description of this role.
209             *
210             * @return the description of this role
211             */
212            @AutoEscape
213            public String getDescription();
214    
215            /**
216             * Sets the description of this role.
217             *
218             * @param description the description of this role
219             */
220            public void setDescription(String description);
221    
222            /**
223             * Gets the type of this role.
224             *
225             * @return the type of this role
226             */
227            public int getType();
228    
229            /**
230             * Sets the type of this role.
231             *
232             * @param type the type of this role
233             */
234            public void setType(int type);
235    
236            /**
237             * Gets the subtype of this role.
238             *
239             * @return the subtype of this role
240             */
241            @AutoEscape
242            public String getSubtype();
243    
244            /**
245             * Sets the subtype of this role.
246             *
247             * @param subtype the subtype of this role
248             */
249            public void setSubtype(String subtype);
250    
251            public boolean isNew();
252    
253            public void setNew(boolean n);
254    
255            public boolean isCachedModel();
256    
257            public void setCachedModel(boolean cachedModel);
258    
259            public boolean isEscapedModel();
260    
261            public void setEscapedModel(boolean escapedModel);
262    
263            public Serializable getPrimaryKeyObj();
264    
265            public ExpandoBridge getExpandoBridge();
266    
267            public void setExpandoBridgeAttributes(ServiceContext serviceContext);
268    
269            public Object clone();
270    
271            public int compareTo(Role role);
272    
273            public int hashCode();
274    
275            public Role toEscapedModel();
276    
277            public String toString();
278    
279            public String toXmlString();
280    }