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