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