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