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    /**
018     * <p>
019     * This class is a wrapper for {@link Role}.
020     * </p>
021     *
022     * @author    Brian Wing Shun Chan
023     * @see       Role
024     * @generated
025     */
026    public class RoleWrapper implements Role {
027            public RoleWrapper(Role role) {
028                    _role = role;
029            }
030    
031            public Class<?> getModelClass() {
032                    return Role.class;
033            }
034    
035            public String getModelClassName() {
036                    return Role.class.getName();
037            }
038    
039            /**
040            * Gets the primary key of this role.
041            *
042            * @return the primary key of this role
043            */
044            public long getPrimaryKey() {
045                    return _role.getPrimaryKey();
046            }
047    
048            /**
049            * Sets the primary key of this role
050            *
051            * @param primaryKey the primary key of this role
052            */
053            public void setPrimaryKey(long primaryKey) {
054                    _role.setPrimaryKey(primaryKey);
055            }
056    
057            /**
058            * Gets the role ID of this role.
059            *
060            * @return the role ID of this role
061            */
062            public long getRoleId() {
063                    return _role.getRoleId();
064            }
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                    _role.setRoleId(roleId);
073            }
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                    return _role.getCompanyId();
082            }
083    
084            /**
085            * Sets the company ID of this role.
086            *
087            * @param companyId the company ID of this role
088            */
089            public void setCompanyId(long companyId) {
090                    _role.setCompanyId(companyId);
091            }
092    
093            /**
094            * Gets the class name of the model instance this role is polymorphically associated with.
095            *
096            * @return the class name of the model instance this role is polymorphically associated with
097            */
098            public java.lang.String getClassName() {
099                    return _role.getClassName();
100            }
101    
102            /**
103            * Gets the class name ID of this role.
104            *
105            * @return the class name ID of this role
106            */
107            public long getClassNameId() {
108                    return _role.getClassNameId();
109            }
110    
111            /**
112            * Sets the class name ID of this role.
113            *
114            * @param classNameId the class name ID of this role
115            */
116            public void setClassNameId(long classNameId) {
117                    _role.setClassNameId(classNameId);
118            }
119    
120            /**
121            * Gets the class p k of this role.
122            *
123            * @return the class p k of this role
124            */
125            public long getClassPK() {
126                    return _role.getClassPK();
127            }
128    
129            /**
130            * Sets the class p k of this role.
131            *
132            * @param classPK the class p k of this role
133            */
134            public void setClassPK(long classPK) {
135                    _role.setClassPK(classPK);
136            }
137    
138            /**
139            * Gets the name of this role.
140            *
141            * @return the name of this role
142            */
143            public java.lang.String getName() {
144                    return _role.getName();
145            }
146    
147            /**
148            * Sets the name of this role.
149            *
150            * @param name the name of this role
151            */
152            public void setName(java.lang.String name) {
153                    _role.setName(name);
154            }
155    
156            /**
157            * Gets the title of this role.
158            *
159            * @return the title of this role
160            */
161            public java.lang.String getTitle() {
162                    return _role.getTitle();
163            }
164    
165            /**
166            * Gets the localized title of this role. Uses the default language if no localization exists for the requested language.
167            *
168            * @param locale the locale to get the localized title for
169            * @return the localized title of this role
170            */
171            public java.lang.String getTitle(java.util.Locale locale) {
172                    return _role.getTitle(locale);
173            }
174    
175            /**
176            * Gets the localized title of this role, optionally using the default language if no localization exists for the requested language.
177            *
178            * @param locale the local to get the localized title for
179            * @param useDefault whether to use the default language if no localization exists for the requested language
180            * @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.
181            */
182            public java.lang.String getTitle(java.util.Locale locale, boolean useDefault) {
183                    return _role.getTitle(locale, useDefault);
184            }
185    
186            /**
187            * Gets the localized title of this role. Uses the default language if no localization exists for the requested language.
188            *
189            * @param languageId the id of the language to get the localized title for
190            * @return the localized title of this role
191            */
192            public java.lang.String getTitle(java.lang.String languageId) {
193                    return _role.getTitle(languageId);
194            }
195    
196            /**
197            * Gets the localized title of this role, optionally using the default language if no localization exists for the requested language.
198            *
199            * @param languageId the id of the language to get the localized title for
200            * @param useDefault whether to use the default language if no localization exists for the requested language
201            * @return the localized title of this role
202            */
203            public java.lang.String getTitle(java.lang.String languageId,
204                    boolean useDefault) {
205                    return _role.getTitle(languageId, useDefault);
206            }
207    
208            /**
209            * Gets a map of the locales and localized title of this role.
210            *
211            * @return the locales and localized title
212            */
213            public java.util.Map<java.util.Locale, java.lang.String> getTitleMap() {
214                    return _role.getTitleMap();
215            }
216    
217            /**
218            * Sets the title of this role.
219            *
220            * @param title the title of this role
221            */
222            public void setTitle(java.lang.String title) {
223                    _role.setTitle(title);
224            }
225    
226            /**
227            * Sets the localized title of this role.
228            *
229            * @param locale the locale to set the localized title for
230            * @param title the localized title of this role
231            */
232            public void setTitle(java.util.Locale locale, java.lang.String title) {
233                    _role.setTitle(locale, title);
234            }
235    
236            /**
237            * Sets the localized titles of this role from the map of locales and localized titles.
238            *
239            * @param titleMap the locales and localized titles of this role
240            */
241            public void setTitleMap(
242                    java.util.Map<java.util.Locale, java.lang.String> titleMap) {
243                    _role.setTitleMap(titleMap);
244            }
245    
246            /**
247            * Gets the description of this role.
248            *
249            * @return the description of this role
250            */
251            public java.lang.String getDescription() {
252                    return _role.getDescription();
253            }
254    
255            /**
256            * Sets the description of this role.
257            *
258            * @param description the description of this role
259            */
260            public void setDescription(java.lang.String description) {
261                    _role.setDescription(description);
262            }
263    
264            /**
265            * Gets the type of this role.
266            *
267            * @return the type of this role
268            */
269            public int getType() {
270                    return _role.getType();
271            }
272    
273            /**
274            * Sets the type of this role.
275            *
276            * @param type the type of this role
277            */
278            public void setType(int type) {
279                    _role.setType(type);
280            }
281    
282            /**
283            * Gets the subtype of this role.
284            *
285            * @return the subtype of this role
286            */
287            public java.lang.String getSubtype() {
288                    return _role.getSubtype();
289            }
290    
291            /**
292            * Sets the subtype of this role.
293            *
294            * @param subtype the subtype of this role
295            */
296            public void setSubtype(java.lang.String subtype) {
297                    _role.setSubtype(subtype);
298            }
299    
300            public boolean isNew() {
301                    return _role.isNew();
302            }
303    
304            public void setNew(boolean n) {
305                    _role.setNew(n);
306            }
307    
308            public boolean isCachedModel() {
309                    return _role.isCachedModel();
310            }
311    
312            public void setCachedModel(boolean cachedModel) {
313                    _role.setCachedModel(cachedModel);
314            }
315    
316            public boolean isEscapedModel() {
317                    return _role.isEscapedModel();
318            }
319    
320            public void setEscapedModel(boolean escapedModel) {
321                    _role.setEscapedModel(escapedModel);
322            }
323    
324            public java.io.Serializable getPrimaryKeyObj() {
325                    return _role.getPrimaryKeyObj();
326            }
327    
328            public void setPrimaryKeyObj(java.io.Serializable primaryKeyObj) {
329                    _role.setPrimaryKeyObj(primaryKeyObj);
330            }
331    
332            public com.liferay.portlet.expando.model.ExpandoBridge getExpandoBridge() {
333                    return _role.getExpandoBridge();
334            }
335    
336            public void setExpandoBridgeAttributes(
337                    com.liferay.portal.service.ServiceContext serviceContext) {
338                    _role.setExpandoBridgeAttributes(serviceContext);
339            }
340    
341            @Override
342            public java.lang.Object clone() {
343                    return new RoleWrapper((Role)_role.clone());
344            }
345    
346            public int compareTo(com.liferay.portal.model.Role role) {
347                    return _role.compareTo(role);
348            }
349    
350            @Override
351            public int hashCode() {
352                    return _role.hashCode();
353            }
354    
355            public com.liferay.portal.model.CacheModel<com.liferay.portal.model.Role> toCacheModel() {
356                    return _role.toCacheModel();
357            }
358    
359            public com.liferay.portal.model.Role toEscapedModel() {
360                    return new RoleWrapper(_role.toEscapedModel());
361            }
362    
363            @Override
364            public java.lang.String toString() {
365                    return _role.toString();
366            }
367    
368            public java.lang.String toXmlString() {
369                    return _role.toXmlString();
370            }
371    
372            public void persist()
373                    throws com.liferay.portal.kernel.exception.SystemException {
374                    _role.persist();
375            }
376    
377            public java.lang.String getDescriptiveName()
378                    throws com.liferay.portal.kernel.exception.PortalException,
379                            com.liferay.portal.kernel.exception.SystemException {
380                    return _role.getDescriptiveName();
381            }
382    
383            public java.lang.String getTypeLabel() {
384                    return _role.getTypeLabel();
385            }
386    
387            public boolean isTeam() {
388                    return _role.isTeam();
389            }
390    
391            public Role getWrappedRole() {
392                    return _role;
393            }
394    
395            public void resetOriginalValues() {
396                    _role.resetOriginalValues();
397            }
398    
399            private Role _role;
400    }