001    /**
002     * Copyright (c) 2000-present Liferay, Inc. All rights reserved.
003     *
004     * This library is free software; you can redistribute it and/or modify it under
005     * the terms of the GNU Lesser General Public License as published by the Free
006     * Software Foundation; either version 2.1 of the License, or (at your option)
007     * any later version.
008     *
009     * This library is distributed in the hope that it will be useful, but WITHOUT
010     * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
011     * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
012     * details.
013     */
014    
015    package com.liferay.portlet.mobiledevicerules.model;
016    
017    import aQute.bnd.annotation.ProviderType;
018    
019    import com.liferay.portal.kernel.util.Validator;
020    import com.liferay.portal.model.ModelWrapper;
021    
022    import com.liferay.portlet.exportimport.lar.StagedModelType;
023    
024    import java.util.Date;
025    import java.util.HashMap;
026    import java.util.Map;
027    
028    /**
029     * <p>
030     * This class is a wrapper for {@link MDRRuleGroupInstance}.
031     * </p>
032     *
033     * @author Edward C. Han
034     * @see MDRRuleGroupInstance
035     * @generated
036     */
037    @ProviderType
038    public class MDRRuleGroupInstanceWrapper implements MDRRuleGroupInstance,
039            ModelWrapper<MDRRuleGroupInstance> {
040            public MDRRuleGroupInstanceWrapper(
041                    MDRRuleGroupInstance mdrRuleGroupInstance) {
042                    _mdrRuleGroupInstance = mdrRuleGroupInstance;
043            }
044    
045            @Override
046            public Class<?> getModelClass() {
047                    return MDRRuleGroupInstance.class;
048            }
049    
050            @Override
051            public String getModelClassName() {
052                    return MDRRuleGroupInstance.class.getName();
053            }
054    
055            @Override
056            public Map<String, Object> getModelAttributes() {
057                    Map<String, Object> attributes = new HashMap<String, Object>();
058    
059                    attributes.put("uuid", getUuid());
060                    attributes.put("ruleGroupInstanceId", getRuleGroupInstanceId());
061                    attributes.put("groupId", getGroupId());
062                    attributes.put("companyId", getCompanyId());
063                    attributes.put("userId", getUserId());
064                    attributes.put("userName", getUserName());
065                    attributes.put("createDate", getCreateDate());
066                    attributes.put("modifiedDate", getModifiedDate());
067                    attributes.put("classNameId", getClassNameId());
068                    attributes.put("classPK", getClassPK());
069                    attributes.put("ruleGroupId", getRuleGroupId());
070                    attributes.put("priority", getPriority());
071    
072                    return attributes;
073            }
074    
075            @Override
076            public void setModelAttributes(Map<String, Object> attributes) {
077                    String uuid = (String)attributes.get("uuid");
078    
079                    if (uuid != null) {
080                            setUuid(uuid);
081                    }
082    
083                    Long ruleGroupInstanceId = (Long)attributes.get("ruleGroupInstanceId");
084    
085                    if (ruleGroupInstanceId != null) {
086                            setRuleGroupInstanceId(ruleGroupInstanceId);
087                    }
088    
089                    Long groupId = (Long)attributes.get("groupId");
090    
091                    if (groupId != null) {
092                            setGroupId(groupId);
093                    }
094    
095                    Long companyId = (Long)attributes.get("companyId");
096    
097                    if (companyId != null) {
098                            setCompanyId(companyId);
099                    }
100    
101                    Long userId = (Long)attributes.get("userId");
102    
103                    if (userId != null) {
104                            setUserId(userId);
105                    }
106    
107                    String userName = (String)attributes.get("userName");
108    
109                    if (userName != null) {
110                            setUserName(userName);
111                    }
112    
113                    Date createDate = (Date)attributes.get("createDate");
114    
115                    if (createDate != null) {
116                            setCreateDate(createDate);
117                    }
118    
119                    Date modifiedDate = (Date)attributes.get("modifiedDate");
120    
121                    if (modifiedDate != null) {
122                            setModifiedDate(modifiedDate);
123                    }
124    
125                    Long classNameId = (Long)attributes.get("classNameId");
126    
127                    if (classNameId != null) {
128                            setClassNameId(classNameId);
129                    }
130    
131                    Long classPK = (Long)attributes.get("classPK");
132    
133                    if (classPK != null) {
134                            setClassPK(classPK);
135                    }
136    
137                    Long ruleGroupId = (Long)attributes.get("ruleGroupId");
138    
139                    if (ruleGroupId != null) {
140                            setRuleGroupId(ruleGroupId);
141                    }
142    
143                    Integer priority = (Integer)attributes.get("priority");
144    
145                    if (priority != null) {
146                            setPriority(priority);
147                    }
148            }
149    
150            @Override
151            public java.lang.Object clone() {
152                    return new MDRRuleGroupInstanceWrapper((MDRRuleGroupInstance)_mdrRuleGroupInstance.clone());
153            }
154    
155            @Override
156            public int compareTo(
157                    com.liferay.portlet.mobiledevicerules.model.MDRRuleGroupInstance mdrRuleGroupInstance) {
158                    return _mdrRuleGroupInstance.compareTo(mdrRuleGroupInstance);
159            }
160    
161            @Override
162            public java.util.List<com.liferay.portlet.mobiledevicerules.model.MDRAction> getActions() {
163                    return _mdrRuleGroupInstance.getActions();
164            }
165    
166            /**
167            * Returns the fully qualified class name of this m d r rule group instance.
168            *
169            * @return the fully qualified class name of this m d r rule group instance
170            */
171            @Override
172            public java.lang.String getClassName() {
173                    return _mdrRuleGroupInstance.getClassName();
174            }
175    
176            /**
177            * Returns the class name ID of this m d r rule group instance.
178            *
179            * @return the class name ID of this m d r rule group instance
180            */
181            @Override
182            public long getClassNameId() {
183                    return _mdrRuleGroupInstance.getClassNameId();
184            }
185    
186            /**
187            * Returns the class p k of this m d r rule group instance.
188            *
189            * @return the class p k of this m d r rule group instance
190            */
191            @Override
192            public long getClassPK() {
193                    return _mdrRuleGroupInstance.getClassPK();
194            }
195    
196            /**
197            * Returns the company ID of this m d r rule group instance.
198            *
199            * @return the company ID of this m d r rule group instance
200            */
201            @Override
202            public long getCompanyId() {
203                    return _mdrRuleGroupInstance.getCompanyId();
204            }
205    
206            /**
207            * Returns the create date of this m d r rule group instance.
208            *
209            * @return the create date of this m d r rule group instance
210            */
211            @Override
212            public Date getCreateDate() {
213                    return _mdrRuleGroupInstance.getCreateDate();
214            }
215    
216            @Override
217            public com.liferay.portlet.expando.model.ExpandoBridge getExpandoBridge() {
218                    return _mdrRuleGroupInstance.getExpandoBridge();
219            }
220    
221            /**
222            * Returns the group ID of this m d r rule group instance.
223            *
224            * @return the group ID of this m d r rule group instance
225            */
226            @Override
227            public long getGroupId() {
228                    return _mdrRuleGroupInstance.getGroupId();
229            }
230    
231            /**
232            * Returns the modified date of this m d r rule group instance.
233            *
234            * @return the modified date of this m d r rule group instance
235            */
236            @Override
237            public Date getModifiedDate() {
238                    return _mdrRuleGroupInstance.getModifiedDate();
239            }
240    
241            /**
242            * Returns the primary key of this m d r rule group instance.
243            *
244            * @return the primary key of this m d r rule group instance
245            */
246            @Override
247            public long getPrimaryKey() {
248                    return _mdrRuleGroupInstance.getPrimaryKey();
249            }
250    
251            @Override
252            public java.io.Serializable getPrimaryKeyObj() {
253                    return _mdrRuleGroupInstance.getPrimaryKeyObj();
254            }
255    
256            /**
257            * Returns the priority of this m d r rule group instance.
258            *
259            * @return the priority of this m d r rule group instance
260            */
261            @Override
262            public int getPriority() {
263                    return _mdrRuleGroupInstance.getPriority();
264            }
265    
266            @Override
267            public com.liferay.portlet.mobiledevicerules.model.MDRRuleGroup getRuleGroup()
268                    throws com.liferay.portal.kernel.exception.PortalException {
269                    return _mdrRuleGroupInstance.getRuleGroup();
270            }
271    
272            /**
273            * Returns the rule group ID of this m d r rule group instance.
274            *
275            * @return the rule group ID of this m d r rule group instance
276            */
277            @Override
278            public long getRuleGroupId() {
279                    return _mdrRuleGroupInstance.getRuleGroupId();
280            }
281    
282            /**
283            * Returns the rule group instance ID of this m d r rule group instance.
284            *
285            * @return the rule group instance ID of this m d r rule group instance
286            */
287            @Override
288            public long getRuleGroupInstanceId() {
289                    return _mdrRuleGroupInstance.getRuleGroupInstanceId();
290            }
291    
292            /**
293            * Returns the user ID of this m d r rule group instance.
294            *
295            * @return the user ID of this m d r rule group instance
296            */
297            @Override
298            public long getUserId() {
299                    return _mdrRuleGroupInstance.getUserId();
300            }
301    
302            /**
303            * Returns the user name of this m d r rule group instance.
304            *
305            * @return the user name of this m d r rule group instance
306            */
307            @Override
308            public java.lang.String getUserName() {
309                    return _mdrRuleGroupInstance.getUserName();
310            }
311    
312            /**
313            * Returns the user uuid of this m d r rule group instance.
314            *
315            * @return the user uuid of this m d r rule group instance
316            */
317            @Override
318            public java.lang.String getUserUuid() {
319                    return _mdrRuleGroupInstance.getUserUuid();
320            }
321    
322            /**
323            * Returns the uuid of this m d r rule group instance.
324            *
325            * @return the uuid of this m d r rule group instance
326            */
327            @Override
328            public java.lang.String getUuid() {
329                    return _mdrRuleGroupInstance.getUuid();
330            }
331    
332            @Override
333            public int hashCode() {
334                    return _mdrRuleGroupInstance.hashCode();
335            }
336    
337            @Override
338            public boolean isCachedModel() {
339                    return _mdrRuleGroupInstance.isCachedModel();
340            }
341    
342            @Override
343            public boolean isEscapedModel() {
344                    return _mdrRuleGroupInstance.isEscapedModel();
345            }
346    
347            @Override
348            public boolean isNew() {
349                    return _mdrRuleGroupInstance.isNew();
350            }
351    
352            @Override
353            public void persist() {
354                    _mdrRuleGroupInstance.persist();
355            }
356    
357            @Override
358            public void setCachedModel(boolean cachedModel) {
359                    _mdrRuleGroupInstance.setCachedModel(cachedModel);
360            }
361    
362            @Override
363            public void setClassName(java.lang.String className) {
364                    _mdrRuleGroupInstance.setClassName(className);
365            }
366    
367            /**
368            * Sets the class name ID of this m d r rule group instance.
369            *
370            * @param classNameId the class name ID of this m d r rule group instance
371            */
372            @Override
373            public void setClassNameId(long classNameId) {
374                    _mdrRuleGroupInstance.setClassNameId(classNameId);
375            }
376    
377            /**
378            * Sets the class p k of this m d r rule group instance.
379            *
380            * @param classPK the class p k of this m d r rule group instance
381            */
382            @Override
383            public void setClassPK(long classPK) {
384                    _mdrRuleGroupInstance.setClassPK(classPK);
385            }
386    
387            /**
388            * Sets the company ID of this m d r rule group instance.
389            *
390            * @param companyId the company ID of this m d r rule group instance
391            */
392            @Override
393            public void setCompanyId(long companyId) {
394                    _mdrRuleGroupInstance.setCompanyId(companyId);
395            }
396    
397            /**
398            * Sets the create date of this m d r rule group instance.
399            *
400            * @param createDate the create date of this m d r rule group instance
401            */
402            @Override
403            public void setCreateDate(Date createDate) {
404                    _mdrRuleGroupInstance.setCreateDate(createDate);
405            }
406    
407            @Override
408            public void setExpandoBridgeAttributes(
409                    com.liferay.portal.model.BaseModel<?> baseModel) {
410                    _mdrRuleGroupInstance.setExpandoBridgeAttributes(baseModel);
411            }
412    
413            @Override
414            public void setExpandoBridgeAttributes(
415                    com.liferay.portlet.expando.model.ExpandoBridge expandoBridge) {
416                    _mdrRuleGroupInstance.setExpandoBridgeAttributes(expandoBridge);
417            }
418    
419            @Override
420            public void setExpandoBridgeAttributes(
421                    com.liferay.portal.service.ServiceContext serviceContext) {
422                    _mdrRuleGroupInstance.setExpandoBridgeAttributes(serviceContext);
423            }
424    
425            /**
426            * Sets the group ID of this m d r rule group instance.
427            *
428            * @param groupId the group ID of this m d r rule group instance
429            */
430            @Override
431            public void setGroupId(long groupId) {
432                    _mdrRuleGroupInstance.setGroupId(groupId);
433            }
434    
435            /**
436            * Sets the modified date of this m d r rule group instance.
437            *
438            * @param modifiedDate the modified date of this m d r rule group instance
439            */
440            @Override
441            public void setModifiedDate(Date modifiedDate) {
442                    _mdrRuleGroupInstance.setModifiedDate(modifiedDate);
443            }
444    
445            @Override
446            public void setNew(boolean n) {
447                    _mdrRuleGroupInstance.setNew(n);
448            }
449    
450            /**
451            * Sets the primary key of this m d r rule group instance.
452            *
453            * @param primaryKey the primary key of this m d r rule group instance
454            */
455            @Override
456            public void setPrimaryKey(long primaryKey) {
457                    _mdrRuleGroupInstance.setPrimaryKey(primaryKey);
458            }
459    
460            @Override
461            public void setPrimaryKeyObj(java.io.Serializable primaryKeyObj) {
462                    _mdrRuleGroupInstance.setPrimaryKeyObj(primaryKeyObj);
463            }
464    
465            /**
466            * Sets the priority of this m d r rule group instance.
467            *
468            * @param priority the priority of this m d r rule group instance
469            */
470            @Override
471            public void setPriority(int priority) {
472                    _mdrRuleGroupInstance.setPriority(priority);
473            }
474    
475            /**
476            * Sets the rule group ID of this m d r rule group instance.
477            *
478            * @param ruleGroupId the rule group ID of this m d r rule group instance
479            */
480            @Override
481            public void setRuleGroupId(long ruleGroupId) {
482                    _mdrRuleGroupInstance.setRuleGroupId(ruleGroupId);
483            }
484    
485            /**
486            * Sets the rule group instance ID of this m d r rule group instance.
487            *
488            * @param ruleGroupInstanceId the rule group instance ID of this m d r rule group instance
489            */
490            @Override
491            public void setRuleGroupInstanceId(long ruleGroupInstanceId) {
492                    _mdrRuleGroupInstance.setRuleGroupInstanceId(ruleGroupInstanceId);
493            }
494    
495            /**
496            * Sets the user ID of this m d r rule group instance.
497            *
498            * @param userId the user ID of this m d r rule group instance
499            */
500            @Override
501            public void setUserId(long userId) {
502                    _mdrRuleGroupInstance.setUserId(userId);
503            }
504    
505            /**
506            * Sets the user name of this m d r rule group instance.
507            *
508            * @param userName the user name of this m d r rule group instance
509            */
510            @Override
511            public void setUserName(java.lang.String userName) {
512                    _mdrRuleGroupInstance.setUserName(userName);
513            }
514    
515            /**
516            * Sets the user uuid of this m d r rule group instance.
517            *
518            * @param userUuid the user uuid of this m d r rule group instance
519            */
520            @Override
521            public void setUserUuid(java.lang.String userUuid) {
522                    _mdrRuleGroupInstance.setUserUuid(userUuid);
523            }
524    
525            /**
526            * Sets the uuid of this m d r rule group instance.
527            *
528            * @param uuid the uuid of this m d r rule group instance
529            */
530            @Override
531            public void setUuid(java.lang.String uuid) {
532                    _mdrRuleGroupInstance.setUuid(uuid);
533            }
534    
535            @Override
536            public com.liferay.portal.model.CacheModel<com.liferay.portlet.mobiledevicerules.model.MDRRuleGroupInstance> toCacheModel() {
537                    return _mdrRuleGroupInstance.toCacheModel();
538            }
539    
540            @Override
541            public com.liferay.portlet.mobiledevicerules.model.MDRRuleGroupInstance toEscapedModel() {
542                    return new MDRRuleGroupInstanceWrapper(_mdrRuleGroupInstance.toEscapedModel());
543            }
544    
545            @Override
546            public java.lang.String toString() {
547                    return _mdrRuleGroupInstance.toString();
548            }
549    
550            @Override
551            public com.liferay.portlet.mobiledevicerules.model.MDRRuleGroupInstance toUnescapedModel() {
552                    return new MDRRuleGroupInstanceWrapper(_mdrRuleGroupInstance.toUnescapedModel());
553            }
554    
555            @Override
556            public java.lang.String toXmlString() {
557                    return _mdrRuleGroupInstance.toXmlString();
558            }
559    
560            @Override
561            public boolean equals(Object obj) {
562                    if (this == obj) {
563                            return true;
564                    }
565    
566                    if (!(obj instanceof MDRRuleGroupInstanceWrapper)) {
567                            return false;
568                    }
569    
570                    MDRRuleGroupInstanceWrapper mdrRuleGroupInstanceWrapper = (MDRRuleGroupInstanceWrapper)obj;
571    
572                    if (Validator.equals(_mdrRuleGroupInstance,
573                                            mdrRuleGroupInstanceWrapper._mdrRuleGroupInstance)) {
574                            return true;
575                    }
576    
577                    return false;
578            }
579    
580            @Override
581            public StagedModelType getStagedModelType() {
582                    return _mdrRuleGroupInstance.getStagedModelType();
583            }
584    
585            /**
586             * @deprecated As of 6.1.0, replaced by {@link #getWrappedModel}
587             */
588            @Deprecated
589            public MDRRuleGroupInstance getWrappedMDRRuleGroupInstance() {
590                    return _mdrRuleGroupInstance;
591            }
592    
593            @Override
594            public MDRRuleGroupInstance getWrappedModel() {
595                    return _mdrRuleGroupInstance;
596            }
597    
598            @Override
599            public boolean isEntityCacheEnabled() {
600                    return _mdrRuleGroupInstance.isEntityCacheEnabled();
601            }
602    
603            @Override
604            public boolean isFinderCacheEnabled() {
605                    return _mdrRuleGroupInstance.isFinderCacheEnabled();
606            }
607    
608            @Override
609            public void resetOriginalValues() {
610                    _mdrRuleGroupInstance.resetOriginalValues();
611            }
612    
613            private final MDRRuleGroupInstance _mdrRuleGroupInstance;
614    }