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