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