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