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 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            /**
150            * Returns the primary key of this m d r rule group instance.
151            *
152            * @return the primary key of this m d r rule group instance
153            */
154            @Override
155            public long getPrimaryKey() {
156                    return _mdrRuleGroupInstance.getPrimaryKey();
157            }
158    
159            /**
160            * Sets the primary key of this m d r rule group instance.
161            *
162            * @param primaryKey the primary key of this m d r rule group instance
163            */
164            @Override
165            public void setPrimaryKey(long primaryKey) {
166                    _mdrRuleGroupInstance.setPrimaryKey(primaryKey);
167            }
168    
169            /**
170            * Returns the uuid of this m d r rule group instance.
171            *
172            * @return the uuid of this m d r rule group instance
173            */
174            @Override
175            public java.lang.String getUuid() {
176                    return _mdrRuleGroupInstance.getUuid();
177            }
178    
179            /**
180            * Sets the uuid of this m d r rule group instance.
181            *
182            * @param uuid the uuid of this m d r rule group instance
183            */
184            @Override
185            public void setUuid(java.lang.String uuid) {
186                    _mdrRuleGroupInstance.setUuid(uuid);
187            }
188    
189            /**
190            * Returns the rule group instance ID of this m d r rule group instance.
191            *
192            * @return the rule group instance ID of this m d r rule group instance
193            */
194            @Override
195            public long getRuleGroupInstanceId() {
196                    return _mdrRuleGroupInstance.getRuleGroupInstanceId();
197            }
198    
199            /**
200            * Sets the rule group instance ID of this m d r rule group instance.
201            *
202            * @param ruleGroupInstanceId the rule group instance ID of this m d r rule group instance
203            */
204            @Override
205            public void setRuleGroupInstanceId(long ruleGroupInstanceId) {
206                    _mdrRuleGroupInstance.setRuleGroupInstanceId(ruleGroupInstanceId);
207            }
208    
209            /**
210            * Returns the group ID of this m d r rule group instance.
211            *
212            * @return the group ID of this m d r rule group instance
213            */
214            @Override
215            public long getGroupId() {
216                    return _mdrRuleGroupInstance.getGroupId();
217            }
218    
219            /**
220            * Sets the group ID of this m d r rule group instance.
221            *
222            * @param groupId the group ID of this m d r rule group instance
223            */
224            @Override
225            public void setGroupId(long groupId) {
226                    _mdrRuleGroupInstance.setGroupId(groupId);
227            }
228    
229            /**
230            * Returns the company ID of this m d r rule group instance.
231            *
232            * @return the company ID of this m d r rule group instance
233            */
234            @Override
235            public long getCompanyId() {
236                    return _mdrRuleGroupInstance.getCompanyId();
237            }
238    
239            /**
240            * Sets the company ID of this m d r rule group instance.
241            *
242            * @param companyId the company ID of this m d r rule group instance
243            */
244            @Override
245            public void setCompanyId(long companyId) {
246                    _mdrRuleGroupInstance.setCompanyId(companyId);
247            }
248    
249            /**
250            * Returns the user ID of this m d r rule group instance.
251            *
252            * @return the user ID of this m d r rule group instance
253            */
254            @Override
255            public long getUserId() {
256                    return _mdrRuleGroupInstance.getUserId();
257            }
258    
259            /**
260            * Sets the user ID of this m d r rule group instance.
261            *
262            * @param userId the user ID of this m d r rule group instance
263            */
264            @Override
265            public void setUserId(long userId) {
266                    _mdrRuleGroupInstance.setUserId(userId);
267            }
268    
269            /**
270            * Returns the user uuid of this m d r rule group instance.
271            *
272            * @return the user uuid of this m d r rule group instance
273            * @throws SystemException if a system exception occurred
274            */
275            @Override
276            public java.lang.String getUserUuid()
277                    throws com.liferay.portal.kernel.exception.SystemException {
278                    return _mdrRuleGroupInstance.getUserUuid();
279            }
280    
281            /**
282            * Sets the user uuid of this m d r rule group instance.
283            *
284            * @param userUuid the user uuid of this m d r rule group instance
285            */
286            @Override
287            public void setUserUuid(java.lang.String userUuid) {
288                    _mdrRuleGroupInstance.setUserUuid(userUuid);
289            }
290    
291            /**
292            * Returns the user name of this m d r rule group instance.
293            *
294            * @return the user name of this m d r rule group instance
295            */
296            @Override
297            public java.lang.String getUserName() {
298                    return _mdrRuleGroupInstance.getUserName();
299            }
300    
301            /**
302            * Sets the user name of this m d r rule group instance.
303            *
304            * @param userName the user name of this m d r rule group instance
305            */
306            @Override
307            public void setUserName(java.lang.String userName) {
308                    _mdrRuleGroupInstance.setUserName(userName);
309            }
310    
311            /**
312            * Returns the create date of this m d r rule group instance.
313            *
314            * @return the create date of this m d r rule group instance
315            */
316            @Override
317            public java.util.Date getCreateDate() {
318                    return _mdrRuleGroupInstance.getCreateDate();
319            }
320    
321            /**
322            * Sets the create date of this m d r rule group instance.
323            *
324            * @param createDate the create date of this m d r rule group instance
325            */
326            @Override
327            public void setCreateDate(java.util.Date createDate) {
328                    _mdrRuleGroupInstance.setCreateDate(createDate);
329            }
330    
331            /**
332            * Returns the modified date of this m d r rule group instance.
333            *
334            * @return the modified date of this m d r rule group instance
335            */
336            @Override
337            public java.util.Date getModifiedDate() {
338                    return _mdrRuleGroupInstance.getModifiedDate();
339            }
340    
341            /**
342            * Sets the modified date of this m d r rule group instance.
343            *
344            * @param modifiedDate the modified date of this m d r rule group instance
345            */
346            @Override
347            public void setModifiedDate(java.util.Date modifiedDate) {
348                    _mdrRuleGroupInstance.setModifiedDate(modifiedDate);
349            }
350    
351            /**
352            * Returns the fully qualified class name of this m d r rule group instance.
353            *
354            * @return the fully qualified class name of this m d r rule group instance
355            */
356            @Override
357            public java.lang.String getClassName() {
358                    return _mdrRuleGroupInstance.getClassName();
359            }
360    
361            @Override
362            public void setClassName(java.lang.String className) {
363                    _mdrRuleGroupInstance.setClassName(className);
364            }
365    
366            /**
367            * Returns the class name ID of this m d r rule group instance.
368            *
369            * @return the class name ID of this m d r rule group instance
370            */
371            @Override
372            public long getClassNameId() {
373                    return _mdrRuleGroupInstance.getClassNameId();
374            }
375    
376            /**
377            * Sets the class name ID of this m d r rule group instance.
378            *
379            * @param classNameId the class name ID of this m d r rule group instance
380            */
381            @Override
382            public void setClassNameId(long classNameId) {
383                    _mdrRuleGroupInstance.setClassNameId(classNameId);
384            }
385    
386            /**
387            * Returns the class p k of this m d r rule group instance.
388            *
389            * @return the class p k of this m d r rule group instance
390            */
391            @Override
392            public long getClassPK() {
393                    return _mdrRuleGroupInstance.getClassPK();
394            }
395    
396            /**
397            * Sets the class p k of this m d r rule group instance.
398            *
399            * @param classPK the class p k of this m d r rule group instance
400            */
401            @Override
402            public void setClassPK(long classPK) {
403                    _mdrRuleGroupInstance.setClassPK(classPK);
404            }
405    
406            /**
407            * Returns the rule group ID of this m d r rule group instance.
408            *
409            * @return the rule group ID of this m d r rule group instance
410            */
411            @Override
412            public long getRuleGroupId() {
413                    return _mdrRuleGroupInstance.getRuleGroupId();
414            }
415    
416            /**
417            * Sets the rule group ID of this m d r rule group instance.
418            *
419            * @param ruleGroupId the rule group ID of this m d r rule group instance
420            */
421            @Override
422            public void setRuleGroupId(long ruleGroupId) {
423                    _mdrRuleGroupInstance.setRuleGroupId(ruleGroupId);
424            }
425    
426            /**
427            * Returns the priority of this m d r rule group instance.
428            *
429            * @return the priority of this m d r rule group instance
430            */
431            @Override
432            public int getPriority() {
433                    return _mdrRuleGroupInstance.getPriority();
434            }
435    
436            /**
437            * Sets the priority of this m d r rule group instance.
438            *
439            * @param priority the priority of this m d r rule group instance
440            */
441            @Override
442            public void setPriority(int priority) {
443                    _mdrRuleGroupInstance.setPriority(priority);
444            }
445    
446            @Override
447            public boolean isNew() {
448                    return _mdrRuleGroupInstance.isNew();
449            }
450    
451            @Override
452            public void setNew(boolean n) {
453                    _mdrRuleGroupInstance.setNew(n);
454            }
455    
456            @Override
457            public boolean isCachedModel() {
458                    return _mdrRuleGroupInstance.isCachedModel();
459            }
460    
461            @Override
462            public void setCachedModel(boolean cachedModel) {
463                    _mdrRuleGroupInstance.setCachedModel(cachedModel);
464            }
465    
466            @Override
467            public boolean isEscapedModel() {
468                    return _mdrRuleGroupInstance.isEscapedModel();
469            }
470    
471            @Override
472            public java.io.Serializable getPrimaryKeyObj() {
473                    return _mdrRuleGroupInstance.getPrimaryKeyObj();
474            }
475    
476            @Override
477            public void setPrimaryKeyObj(java.io.Serializable primaryKeyObj) {
478                    _mdrRuleGroupInstance.setPrimaryKeyObj(primaryKeyObj);
479            }
480    
481            @Override
482            public com.liferay.portlet.expando.model.ExpandoBridge getExpandoBridge() {
483                    return _mdrRuleGroupInstance.getExpandoBridge();
484            }
485    
486            @Override
487            public void setExpandoBridgeAttributes(
488                    com.liferay.portal.model.BaseModel<?> baseModel) {
489                    _mdrRuleGroupInstance.setExpandoBridgeAttributes(baseModel);
490            }
491    
492            @Override
493            public void setExpandoBridgeAttributes(
494                    com.liferay.portlet.expando.model.ExpandoBridge expandoBridge) {
495                    _mdrRuleGroupInstance.setExpandoBridgeAttributes(expandoBridge);
496            }
497    
498            @Override
499            public void setExpandoBridgeAttributes(
500                    com.liferay.portal.service.ServiceContext serviceContext) {
501                    _mdrRuleGroupInstance.setExpandoBridgeAttributes(serviceContext);
502            }
503    
504            @Override
505            public java.lang.Object clone() {
506                    return new MDRRuleGroupInstanceWrapper((MDRRuleGroupInstance)_mdrRuleGroupInstance.clone());
507            }
508    
509            @Override
510            public int compareTo(
511                    com.liferay.portlet.mobiledevicerules.model.MDRRuleGroupInstance mdrRuleGroupInstance) {
512                    return _mdrRuleGroupInstance.compareTo(mdrRuleGroupInstance);
513            }
514    
515            @Override
516            public int hashCode() {
517                    return _mdrRuleGroupInstance.hashCode();
518            }
519    
520            @Override
521            public com.liferay.portal.model.CacheModel<com.liferay.portlet.mobiledevicerules.model.MDRRuleGroupInstance> toCacheModel() {
522                    return _mdrRuleGroupInstance.toCacheModel();
523            }
524    
525            @Override
526            public com.liferay.portlet.mobiledevicerules.model.MDRRuleGroupInstance toEscapedModel() {
527                    return new MDRRuleGroupInstanceWrapper(_mdrRuleGroupInstance.toEscapedModel());
528            }
529    
530            @Override
531            public com.liferay.portlet.mobiledevicerules.model.MDRRuleGroupInstance toUnescapedModel() {
532                    return new MDRRuleGroupInstanceWrapper(_mdrRuleGroupInstance.toUnescapedModel());
533            }
534    
535            @Override
536            public java.lang.String toString() {
537                    return _mdrRuleGroupInstance.toString();
538            }
539    
540            @Override
541            public java.lang.String toXmlString() {
542                    return _mdrRuleGroupInstance.toXmlString();
543            }
544    
545            @Override
546            public void persist()
547                    throws com.liferay.portal.kernel.exception.SystemException {
548                    _mdrRuleGroupInstance.persist();
549            }
550    
551            @Override
552            public java.util.List<com.liferay.portlet.mobiledevicerules.model.MDRAction> getActions()
553                    throws com.liferay.portal.kernel.exception.SystemException {
554                    return _mdrRuleGroupInstance.getActions();
555            }
556    
557            @Override
558            public com.liferay.portlet.mobiledevicerules.model.MDRRuleGroup getRuleGroup()
559                    throws com.liferay.portal.kernel.exception.PortalException,
560                            com.liferay.portal.kernel.exception.SystemException {
561                    return _mdrRuleGroupInstance.getRuleGroup();
562            }
563    
564            @Override
565            public boolean equals(Object obj) {
566                    if (this == obj) {
567                            return true;
568                    }
569    
570                    if (!(obj instanceof MDRRuleGroupInstanceWrapper)) {
571                            return false;
572                    }
573    
574                    MDRRuleGroupInstanceWrapper mdrRuleGroupInstanceWrapper = (MDRRuleGroupInstanceWrapper)obj;
575    
576                    if (Validator.equals(_mdrRuleGroupInstance,
577                                            mdrRuleGroupInstanceWrapper._mdrRuleGroupInstance)) {
578                            return true;
579                    }
580    
581                    return false;
582            }
583    
584            @Override
585            public StagedModelType getStagedModelType() {
586                    return _mdrRuleGroupInstance.getStagedModelType();
587            }
588    
589            /**
590             * @deprecated As of 6.1.0, replaced by {@link #getWrappedModel}
591             */
592            public MDRRuleGroupInstance getWrappedMDRRuleGroupInstance() {
593                    return _mdrRuleGroupInstance;
594            }
595    
596            @Override
597            public MDRRuleGroupInstance getWrappedModel() {
598                    return _mdrRuleGroupInstance;
599            }
600    
601            @Override
602            public void resetOriginalValues() {
603                    _mdrRuleGroupInstance.resetOriginalValues();
604            }
605    
606            private MDRRuleGroupInstance _mdrRuleGroupInstance;
607    }