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