001    /**
002     * Copyright (c) 2000-2012 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.portlet.mobiledevicerules.model;
016    
017    import com.liferay.portal.model.ModelWrapper;
018    
019    import java.util.Date;
020    import java.util.HashMap;
021    import java.util.Map;
022    
023    /**
024     * <p>
025     * This class is a wrapper for {@link MDRRuleGroup}.
026     * </p>
027     *
028     * @author    Edward C. Han
029     * @see       MDRRuleGroup
030     * @generated
031     */
032    public class MDRRuleGroupWrapper implements MDRRuleGroup,
033            ModelWrapper<MDRRuleGroup> {
034            public MDRRuleGroupWrapper(MDRRuleGroup mdrRuleGroup) {
035                    _mdrRuleGroup = mdrRuleGroup;
036            }
037    
038            public Class<?> getModelClass() {
039                    return MDRRuleGroup.class;
040            }
041    
042            public String getModelClassName() {
043                    return MDRRuleGroup.class.getName();
044            }
045    
046            public Map<String, Object> getModelAttributes() {
047                    Map<String, Object> attributes = new HashMap<String, Object>();
048    
049                    attributes.put("uuid", getUuid());
050                    attributes.put("ruleGroupId", getRuleGroupId());
051                    attributes.put("groupId", getGroupId());
052                    attributes.put("companyId", getCompanyId());
053                    attributes.put("userId", getUserId());
054                    attributes.put("userName", getUserName());
055                    attributes.put("createDate", getCreateDate());
056                    attributes.put("modifiedDate", getModifiedDate());
057                    attributes.put("name", getName());
058                    attributes.put("description", getDescription());
059    
060                    return attributes;
061            }
062    
063            public void setModelAttributes(Map<String, Object> attributes) {
064                    String uuid = (String)attributes.get("uuid");
065    
066                    if (uuid != null) {
067                            setUuid(uuid);
068                    }
069    
070                    Long ruleGroupId = (Long)attributes.get("ruleGroupId");
071    
072                    if (ruleGroupId != null) {
073                            setRuleGroupId(ruleGroupId);
074                    }
075    
076                    Long groupId = (Long)attributes.get("groupId");
077    
078                    if (groupId != null) {
079                            setGroupId(groupId);
080                    }
081    
082                    Long companyId = (Long)attributes.get("companyId");
083    
084                    if (companyId != null) {
085                            setCompanyId(companyId);
086                    }
087    
088                    Long userId = (Long)attributes.get("userId");
089    
090                    if (userId != null) {
091                            setUserId(userId);
092                    }
093    
094                    String userName = (String)attributes.get("userName");
095    
096                    if (userName != null) {
097                            setUserName(userName);
098                    }
099    
100                    Date createDate = (Date)attributes.get("createDate");
101    
102                    if (createDate != null) {
103                            setCreateDate(createDate);
104                    }
105    
106                    Date modifiedDate = (Date)attributes.get("modifiedDate");
107    
108                    if (modifiedDate != null) {
109                            setModifiedDate(modifiedDate);
110                    }
111    
112                    String name = (String)attributes.get("name");
113    
114                    if (name != null) {
115                            setName(name);
116                    }
117    
118                    String description = (String)attributes.get("description");
119    
120                    if (description != null) {
121                            setDescription(description);
122                    }
123            }
124    
125            /**
126            * Returns the primary key of this m d r rule group.
127            *
128            * @return the primary key of this m d r rule group
129            */
130            public long getPrimaryKey() {
131                    return _mdrRuleGroup.getPrimaryKey();
132            }
133    
134            /**
135            * Sets the primary key of this m d r rule group.
136            *
137            * @param primaryKey the primary key of this m d r rule group
138            */
139            public void setPrimaryKey(long primaryKey) {
140                    _mdrRuleGroup.setPrimaryKey(primaryKey);
141            }
142    
143            /**
144            * Returns the uuid of this m d r rule group.
145            *
146            * @return the uuid of this m d r rule group
147            */
148            public java.lang.String getUuid() {
149                    return _mdrRuleGroup.getUuid();
150            }
151    
152            /**
153            * Sets the uuid of this m d r rule group.
154            *
155            * @param uuid the uuid of this m d r rule group
156            */
157            public void setUuid(java.lang.String uuid) {
158                    _mdrRuleGroup.setUuid(uuid);
159            }
160    
161            /**
162            * Returns the rule group ID of this m d r rule group.
163            *
164            * @return the rule group ID of this m d r rule group
165            */
166            public long getRuleGroupId() {
167                    return _mdrRuleGroup.getRuleGroupId();
168            }
169    
170            /**
171            * Sets the rule group ID of this m d r rule group.
172            *
173            * @param ruleGroupId the rule group ID of this m d r rule group
174            */
175            public void setRuleGroupId(long ruleGroupId) {
176                    _mdrRuleGroup.setRuleGroupId(ruleGroupId);
177            }
178    
179            /**
180            * Returns the group ID of this m d r rule group.
181            *
182            * @return the group ID of this m d r rule group
183            */
184            public long getGroupId() {
185                    return _mdrRuleGroup.getGroupId();
186            }
187    
188            /**
189            * Sets the group ID of this m d r rule group.
190            *
191            * @param groupId the group ID of this m d r rule group
192            */
193            public void setGroupId(long groupId) {
194                    _mdrRuleGroup.setGroupId(groupId);
195            }
196    
197            /**
198            * Returns the company ID of this m d r rule group.
199            *
200            * @return the company ID of this m d r rule group
201            */
202            public long getCompanyId() {
203                    return _mdrRuleGroup.getCompanyId();
204            }
205    
206            /**
207            * Sets the company ID of this m d r rule group.
208            *
209            * @param companyId the company ID of this m d r rule group
210            */
211            public void setCompanyId(long companyId) {
212                    _mdrRuleGroup.setCompanyId(companyId);
213            }
214    
215            /**
216            * Returns the user ID of this m d r rule group.
217            *
218            * @return the user ID of this m d r rule group
219            */
220            public long getUserId() {
221                    return _mdrRuleGroup.getUserId();
222            }
223    
224            /**
225            * Sets the user ID of this m d r rule group.
226            *
227            * @param userId the user ID of this m d r rule group
228            */
229            public void setUserId(long userId) {
230                    _mdrRuleGroup.setUserId(userId);
231            }
232    
233            /**
234            * Returns the user uuid of this m d r rule group.
235            *
236            * @return the user uuid of this m d r rule group
237            * @throws SystemException if a system exception occurred
238            */
239            public java.lang.String getUserUuid()
240                    throws com.liferay.portal.kernel.exception.SystemException {
241                    return _mdrRuleGroup.getUserUuid();
242            }
243    
244            /**
245            * Sets the user uuid of this m d r rule group.
246            *
247            * @param userUuid the user uuid of this m d r rule group
248            */
249            public void setUserUuid(java.lang.String userUuid) {
250                    _mdrRuleGroup.setUserUuid(userUuid);
251            }
252    
253            /**
254            * Returns the user name of this m d r rule group.
255            *
256            * @return the user name of this m d r rule group
257            */
258            public java.lang.String getUserName() {
259                    return _mdrRuleGroup.getUserName();
260            }
261    
262            /**
263            * Sets the user name of this m d r rule group.
264            *
265            * @param userName the user name of this m d r rule group
266            */
267            public void setUserName(java.lang.String userName) {
268                    _mdrRuleGroup.setUserName(userName);
269            }
270    
271            /**
272            * Returns the create date of this m d r rule group.
273            *
274            * @return the create date of this m d r rule group
275            */
276            public java.util.Date getCreateDate() {
277                    return _mdrRuleGroup.getCreateDate();
278            }
279    
280            /**
281            * Sets the create date of this m d r rule group.
282            *
283            * @param createDate the create date of this m d r rule group
284            */
285            public void setCreateDate(java.util.Date createDate) {
286                    _mdrRuleGroup.setCreateDate(createDate);
287            }
288    
289            /**
290            * Returns the modified date of this m d r rule group.
291            *
292            * @return the modified date of this m d r rule group
293            */
294            public java.util.Date getModifiedDate() {
295                    return _mdrRuleGroup.getModifiedDate();
296            }
297    
298            /**
299            * Sets the modified date of this m d r rule group.
300            *
301            * @param modifiedDate the modified date of this m d r rule group
302            */
303            public void setModifiedDate(java.util.Date modifiedDate) {
304                    _mdrRuleGroup.setModifiedDate(modifiedDate);
305            }
306    
307            /**
308            * Returns the name of this m d r rule group.
309            *
310            * @return the name of this m d r rule group
311            */
312            public java.lang.String getName() {
313                    return _mdrRuleGroup.getName();
314            }
315    
316            /**
317            * Returns the localized name of this m d r rule group in the language. Uses the default language if no localization exists for the requested language.
318            *
319            * @param locale the locale of the language
320            * @return the localized name of this m d r rule group
321            */
322            public java.lang.String getName(java.util.Locale locale) {
323                    return _mdrRuleGroup.getName(locale);
324            }
325    
326            /**
327            * Returns the localized name of this m d r rule group in the language, optionally using the default language if no localization exists for the requested language.
328            *
329            * @param locale the local of the language
330            * @param useDefault whether to use the default language if no localization exists for the requested language
331            * @return the localized name of this m d r rule group. If <code>useDefault</code> is <code>false</code> and no localization exists for the requested language, an empty string will be returned.
332            */
333            public java.lang.String getName(java.util.Locale locale, boolean useDefault) {
334                    return _mdrRuleGroup.getName(locale, useDefault);
335            }
336    
337            /**
338            * Returns the localized name of this m d r rule group in the language. Uses the default language if no localization exists for the requested language.
339            *
340            * @param languageId the ID of the language
341            * @return the localized name of this m d r rule group
342            */
343            public java.lang.String getName(java.lang.String languageId) {
344                    return _mdrRuleGroup.getName(languageId);
345            }
346    
347            /**
348            * Returns the localized name of this m d r rule group in the language, optionally using the default language if no localization exists for the requested language.
349            *
350            * @param languageId the ID of the language
351            * @param useDefault whether to use the default language if no localization exists for the requested language
352            * @return the localized name of this m d r rule group
353            */
354            public java.lang.String getName(java.lang.String languageId,
355                    boolean useDefault) {
356                    return _mdrRuleGroup.getName(languageId, useDefault);
357            }
358    
359            public java.lang.String getNameCurrentLanguageId() {
360                    return _mdrRuleGroup.getNameCurrentLanguageId();
361            }
362    
363            public java.lang.String getNameCurrentValue() {
364                    return _mdrRuleGroup.getNameCurrentValue();
365            }
366    
367            /**
368            * Returns a map of the locales and localized names of this m d r rule group.
369            *
370            * @return the locales and localized names of this m d r rule group
371            */
372            public java.util.Map<java.util.Locale, java.lang.String> getNameMap() {
373                    return _mdrRuleGroup.getNameMap();
374            }
375    
376            /**
377            * Sets the name of this m d r rule group.
378            *
379            * @param name the name of this m d r rule group
380            */
381            public void setName(java.lang.String name) {
382                    _mdrRuleGroup.setName(name);
383            }
384    
385            /**
386            * Sets the localized name of this m d r rule group in the language.
387            *
388            * @param name the localized name of this m d r rule group
389            * @param locale the locale of the language
390            */
391            public void setName(java.lang.String name, java.util.Locale locale) {
392                    _mdrRuleGroup.setName(name, locale);
393            }
394    
395            /**
396            * Sets the localized name of this m d r rule group in the language, and sets the default locale.
397            *
398            * @param name the localized name of this m d r rule group
399            * @param locale the locale of the language
400            * @param defaultLocale the default locale
401            */
402            public void setName(java.lang.String name, java.util.Locale locale,
403                    java.util.Locale defaultLocale) {
404                    _mdrRuleGroup.setName(name, locale, defaultLocale);
405            }
406    
407            public void setNameCurrentLanguageId(java.lang.String languageId) {
408                    _mdrRuleGroup.setNameCurrentLanguageId(languageId);
409            }
410    
411            /**
412            * Sets the localized names of this m d r rule group from the map of locales and localized names.
413            *
414            * @param nameMap the locales and localized names of this m d r rule group
415            */
416            public void setNameMap(
417                    java.util.Map<java.util.Locale, java.lang.String> nameMap) {
418                    _mdrRuleGroup.setNameMap(nameMap);
419            }
420    
421            /**
422            * Sets the localized names of this m d r rule group from the map of locales and localized names, and sets the default locale.
423            *
424            * @param nameMap the locales and localized names of this m d r rule group
425            * @param defaultLocale the default locale
426            */
427            public void setNameMap(
428                    java.util.Map<java.util.Locale, java.lang.String> nameMap,
429                    java.util.Locale defaultLocale) {
430                    _mdrRuleGroup.setNameMap(nameMap, defaultLocale);
431            }
432    
433            /**
434            * Returns the description of this m d r rule group.
435            *
436            * @return the description of this m d r rule group
437            */
438            public java.lang.String getDescription() {
439                    return _mdrRuleGroup.getDescription();
440            }
441    
442            /**
443            * Returns the localized description of this m d r rule group in the language. Uses the default language if no localization exists for the requested language.
444            *
445            * @param locale the locale of the language
446            * @return the localized description of this m d r rule group
447            */
448            public java.lang.String getDescription(java.util.Locale locale) {
449                    return _mdrRuleGroup.getDescription(locale);
450            }
451    
452            /**
453            * Returns the localized description of this m d r rule group in the language, optionally using the default language if no localization exists for the requested language.
454            *
455            * @param locale the local of the language
456            * @param useDefault whether to use the default language if no localization exists for the requested language
457            * @return the localized description of this m d r rule group. If <code>useDefault</code> is <code>false</code> and no localization exists for the requested language, an empty string will be returned.
458            */
459            public java.lang.String getDescription(java.util.Locale locale,
460                    boolean useDefault) {
461                    return _mdrRuleGroup.getDescription(locale, useDefault);
462            }
463    
464            /**
465            * Returns the localized description of this m d r rule group in the language. Uses the default language if no localization exists for the requested language.
466            *
467            * @param languageId the ID of the language
468            * @return the localized description of this m d r rule group
469            */
470            public java.lang.String getDescription(java.lang.String languageId) {
471                    return _mdrRuleGroup.getDescription(languageId);
472            }
473    
474            /**
475            * Returns the localized description of this m d r rule group in the language, optionally using the default language if no localization exists for the requested language.
476            *
477            * @param languageId the ID of the language
478            * @param useDefault whether to use the default language if no localization exists for the requested language
479            * @return the localized description of this m d r rule group
480            */
481            public java.lang.String getDescription(java.lang.String languageId,
482                    boolean useDefault) {
483                    return _mdrRuleGroup.getDescription(languageId, useDefault);
484            }
485    
486            public java.lang.String getDescriptionCurrentLanguageId() {
487                    return _mdrRuleGroup.getDescriptionCurrentLanguageId();
488            }
489    
490            public java.lang.String getDescriptionCurrentValue() {
491                    return _mdrRuleGroup.getDescriptionCurrentValue();
492            }
493    
494            /**
495            * Returns a map of the locales and localized descriptions of this m d r rule group.
496            *
497            * @return the locales and localized descriptions of this m d r rule group
498            */
499            public java.util.Map<java.util.Locale, java.lang.String> getDescriptionMap() {
500                    return _mdrRuleGroup.getDescriptionMap();
501            }
502    
503            /**
504            * Sets the description of this m d r rule group.
505            *
506            * @param description the description of this m d r rule group
507            */
508            public void setDescription(java.lang.String description) {
509                    _mdrRuleGroup.setDescription(description);
510            }
511    
512            /**
513            * Sets the localized description of this m d r rule group in the language.
514            *
515            * @param description the localized description of this m d r rule group
516            * @param locale the locale of the language
517            */
518            public void setDescription(java.lang.String description,
519                    java.util.Locale locale) {
520                    _mdrRuleGroup.setDescription(description, locale);
521            }
522    
523            /**
524            * Sets the localized description of this m d r rule group in the language, and sets the default locale.
525            *
526            * @param description the localized description of this m d r rule group
527            * @param locale the locale of the language
528            * @param defaultLocale the default locale
529            */
530            public void setDescription(java.lang.String description,
531                    java.util.Locale locale, java.util.Locale defaultLocale) {
532                    _mdrRuleGroup.setDescription(description, locale, defaultLocale);
533            }
534    
535            public void setDescriptionCurrentLanguageId(java.lang.String languageId) {
536                    _mdrRuleGroup.setDescriptionCurrentLanguageId(languageId);
537            }
538    
539            /**
540            * Sets the localized descriptions of this m d r rule group from the map of locales and localized descriptions.
541            *
542            * @param descriptionMap the locales and localized descriptions of this m d r rule group
543            */
544            public void setDescriptionMap(
545                    java.util.Map<java.util.Locale, java.lang.String> descriptionMap) {
546                    _mdrRuleGroup.setDescriptionMap(descriptionMap);
547            }
548    
549            /**
550            * Sets the localized descriptions of this m d r rule group from the map of locales and localized descriptions, and sets the default locale.
551            *
552            * @param descriptionMap the locales and localized descriptions of this m d r rule group
553            * @param defaultLocale the default locale
554            */
555            public void setDescriptionMap(
556                    java.util.Map<java.util.Locale, java.lang.String> descriptionMap,
557                    java.util.Locale defaultLocale) {
558                    _mdrRuleGroup.setDescriptionMap(descriptionMap, defaultLocale);
559            }
560    
561            public boolean isNew() {
562                    return _mdrRuleGroup.isNew();
563            }
564    
565            public void setNew(boolean n) {
566                    _mdrRuleGroup.setNew(n);
567            }
568    
569            public boolean isCachedModel() {
570                    return _mdrRuleGroup.isCachedModel();
571            }
572    
573            public void setCachedModel(boolean cachedModel) {
574                    _mdrRuleGroup.setCachedModel(cachedModel);
575            }
576    
577            public boolean isEscapedModel() {
578                    return _mdrRuleGroup.isEscapedModel();
579            }
580    
581            public java.io.Serializable getPrimaryKeyObj() {
582                    return _mdrRuleGroup.getPrimaryKeyObj();
583            }
584    
585            public void setPrimaryKeyObj(java.io.Serializable primaryKeyObj) {
586                    _mdrRuleGroup.setPrimaryKeyObj(primaryKeyObj);
587            }
588    
589            public com.liferay.portlet.expando.model.ExpandoBridge getExpandoBridge() {
590                    return _mdrRuleGroup.getExpandoBridge();
591            }
592    
593            public void setExpandoBridgeAttributes(
594                    com.liferay.portal.service.ServiceContext serviceContext) {
595                    _mdrRuleGroup.setExpandoBridgeAttributes(serviceContext);
596            }
597    
598            public void prepareLocalizedFieldsForImport(
599                    java.util.Locale defaultImportLocale)
600                    throws com.liferay.portal.LocaleException {
601                    _mdrRuleGroup.prepareLocalizedFieldsForImport(defaultImportLocale);
602            }
603    
604            @Override
605            public java.lang.Object clone() {
606                    return new MDRRuleGroupWrapper((MDRRuleGroup)_mdrRuleGroup.clone());
607            }
608    
609            public int compareTo(
610                    com.liferay.portlet.mobiledevicerules.model.MDRRuleGroup mdrRuleGroup) {
611                    return _mdrRuleGroup.compareTo(mdrRuleGroup);
612            }
613    
614            @Override
615            public int hashCode() {
616                    return _mdrRuleGroup.hashCode();
617            }
618    
619            public com.liferay.portal.model.CacheModel<com.liferay.portlet.mobiledevicerules.model.MDRRuleGroup> toCacheModel() {
620                    return _mdrRuleGroup.toCacheModel();
621            }
622    
623            public com.liferay.portlet.mobiledevicerules.model.MDRRuleGroup toEscapedModel() {
624                    return new MDRRuleGroupWrapper(_mdrRuleGroup.toEscapedModel());
625            }
626    
627            public com.liferay.portlet.mobiledevicerules.model.MDRRuleGroup toUnescapedModel() {
628                    return new MDRRuleGroupWrapper(_mdrRuleGroup.toUnescapedModel());
629            }
630    
631            @Override
632            public java.lang.String toString() {
633                    return _mdrRuleGroup.toString();
634            }
635    
636            public java.lang.String toXmlString() {
637                    return _mdrRuleGroup.toXmlString();
638            }
639    
640            public void persist()
641                    throws com.liferay.portal.kernel.exception.SystemException {
642                    _mdrRuleGroup.persist();
643            }
644    
645            public java.util.List<com.liferay.portlet.mobiledevicerules.model.MDRRule> getRules()
646                    throws com.liferay.portal.kernel.exception.SystemException {
647                    return _mdrRuleGroup.getRules();
648            }
649    
650            /**
651             * @deprecated Renamed to {@link #getWrappedModel}
652             */
653            public MDRRuleGroup getWrappedMDRRuleGroup() {
654                    return _mdrRuleGroup;
655            }
656    
657            public MDRRuleGroup getWrappedModel() {
658                    return _mdrRuleGroup;
659            }
660    
661            public void resetOriginalValues() {
662                    _mdrRuleGroup.resetOriginalValues();
663            }
664    
665            private MDRRuleGroup _mdrRuleGroup;
666    }