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