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