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.portal.model;
016    
017    import aQute.bnd.annotation.ProviderType;
018    
019    import com.liferay.portal.kernel.util.Validator;
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 SystemEvent}.
028     * </p>
029     *
030     * @author Brian Wing Shun Chan
031     * @see SystemEvent
032     * @generated
033     */
034    @ProviderType
035    public class SystemEventWrapper implements SystemEvent,
036            ModelWrapper<SystemEvent> {
037            public SystemEventWrapper(SystemEvent systemEvent) {
038                    _systemEvent = systemEvent;
039            }
040    
041            @Override
042            public Class<?> getModelClass() {
043                    return SystemEvent.class;
044            }
045    
046            @Override
047            public String getModelClassName() {
048                    return SystemEvent.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("mvccVersion", getMvccVersion());
056                    attributes.put("systemEventId", getSystemEventId());
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("classNameId", getClassNameId());
063                    attributes.put("classPK", getClassPK());
064                    attributes.put("classUuid", getClassUuid());
065                    attributes.put("referrerClassNameId", getReferrerClassNameId());
066                    attributes.put("parentSystemEventId", getParentSystemEventId());
067                    attributes.put("systemEventSetKey", getSystemEventSetKey());
068                    attributes.put("type", getType());
069                    attributes.put("extraData", getExtraData());
070    
071                    return attributes;
072            }
073    
074            @Override
075            public void setModelAttributes(Map<String, Object> attributes) {
076                    Long mvccVersion = (Long)attributes.get("mvccVersion");
077    
078                    if (mvccVersion != null) {
079                            setMvccVersion(mvccVersion);
080                    }
081    
082                    Long systemEventId = (Long)attributes.get("systemEventId");
083    
084                    if (systemEventId != null) {
085                            setSystemEventId(systemEventId);
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                    Long classNameId = (Long)attributes.get("classNameId");
119    
120                    if (classNameId != null) {
121                            setClassNameId(classNameId);
122                    }
123    
124                    Long classPK = (Long)attributes.get("classPK");
125    
126                    if (classPK != null) {
127                            setClassPK(classPK);
128                    }
129    
130                    String classUuid = (String)attributes.get("classUuid");
131    
132                    if (classUuid != null) {
133                            setClassUuid(classUuid);
134                    }
135    
136                    Long referrerClassNameId = (Long)attributes.get("referrerClassNameId");
137    
138                    if (referrerClassNameId != null) {
139                            setReferrerClassNameId(referrerClassNameId);
140                    }
141    
142                    Long parentSystemEventId = (Long)attributes.get("parentSystemEventId");
143    
144                    if (parentSystemEventId != null) {
145                            setParentSystemEventId(parentSystemEventId);
146                    }
147    
148                    Long systemEventSetKey = (Long)attributes.get("systemEventSetKey");
149    
150                    if (systemEventSetKey != null) {
151                            setSystemEventSetKey(systemEventSetKey);
152                    }
153    
154                    Integer type = (Integer)attributes.get("type");
155    
156                    if (type != null) {
157                            setType(type);
158                    }
159    
160                    String extraData = (String)attributes.get("extraData");
161    
162                    if (extraData != null) {
163                            setExtraData(extraData);
164                    }
165            }
166    
167            @Override
168            public java.lang.Object clone() {
169                    return new SystemEventWrapper((SystemEvent)_systemEvent.clone());
170            }
171    
172            @Override
173            public int compareTo(com.liferay.portal.model.SystemEvent systemEvent) {
174                    return _systemEvent.compareTo(systemEvent);
175            }
176    
177            /**
178            * Returns the fully qualified class name of this system event.
179            *
180            * @return the fully qualified class name of this system event
181            */
182            @Override
183            public java.lang.String getClassName() {
184                    return _systemEvent.getClassName();
185            }
186    
187            /**
188            * Returns the class name ID of this system event.
189            *
190            * @return the class name ID of this system event
191            */
192            @Override
193            public long getClassNameId() {
194                    return _systemEvent.getClassNameId();
195            }
196    
197            /**
198            * Returns the class p k of this system event.
199            *
200            * @return the class p k of this system event
201            */
202            @Override
203            public long getClassPK() {
204                    return _systemEvent.getClassPK();
205            }
206    
207            /**
208            * Returns the class uuid of this system event.
209            *
210            * @return the class uuid of this system event
211            */
212            @Override
213            public java.lang.String getClassUuid() {
214                    return _systemEvent.getClassUuid();
215            }
216    
217            /**
218            * Returns the company ID of this system event.
219            *
220            * @return the company ID of this system event
221            */
222            @Override
223            public long getCompanyId() {
224                    return _systemEvent.getCompanyId();
225            }
226    
227            /**
228            * Returns the create date of this system event.
229            *
230            * @return the create date of this system event
231            */
232            @Override
233            public Date getCreateDate() {
234                    return _systemEvent.getCreateDate();
235            }
236    
237            @Override
238            public com.liferay.portlet.expando.model.ExpandoBridge getExpandoBridge() {
239                    return _systemEvent.getExpandoBridge();
240            }
241    
242            /**
243            * Returns the extra data of this system event.
244            *
245            * @return the extra data of this system event
246            */
247            @Override
248            public java.lang.String getExtraData() {
249                    return _systemEvent.getExtraData();
250            }
251    
252            /**
253            * Returns the group ID of this system event.
254            *
255            * @return the group ID of this system event
256            */
257            @Override
258            public long getGroupId() {
259                    return _systemEvent.getGroupId();
260            }
261    
262            /**
263            * Returns the mvcc version of this system event.
264            *
265            * @return the mvcc version of this system event
266            */
267            @Override
268            public long getMvccVersion() {
269                    return _systemEvent.getMvccVersion();
270            }
271    
272            /**
273            * Returns the parent system event ID of this system event.
274            *
275            * @return the parent system event ID of this system event
276            */
277            @Override
278            public long getParentSystemEventId() {
279                    return _systemEvent.getParentSystemEventId();
280            }
281    
282            /**
283            * Returns the primary key of this system event.
284            *
285            * @return the primary key of this system event
286            */
287            @Override
288            public long getPrimaryKey() {
289                    return _systemEvent.getPrimaryKey();
290            }
291    
292            @Override
293            public java.io.Serializable getPrimaryKeyObj() {
294                    return _systemEvent.getPrimaryKeyObj();
295            }
296    
297            @Override
298            public java.lang.String getReferrerClassName() {
299                    return _systemEvent.getReferrerClassName();
300            }
301    
302            /**
303            * Returns the referrer class name ID of this system event.
304            *
305            * @return the referrer class name ID of this system event
306            */
307            @Override
308            public long getReferrerClassNameId() {
309                    return _systemEvent.getReferrerClassNameId();
310            }
311    
312            /**
313            * Returns the system event ID of this system event.
314            *
315            * @return the system event ID of this system event
316            */
317            @Override
318            public long getSystemEventId() {
319                    return _systemEvent.getSystemEventId();
320            }
321    
322            /**
323            * Returns the system event set key of this system event.
324            *
325            * @return the system event set key of this system event
326            */
327            @Override
328            public long getSystemEventSetKey() {
329                    return _systemEvent.getSystemEventSetKey();
330            }
331    
332            /**
333            * Returns the type of this system event.
334            *
335            * @return the type of this system event
336            */
337            @Override
338            public int getType() {
339                    return _systemEvent.getType();
340            }
341    
342            /**
343            * Returns the user ID of this system event.
344            *
345            * @return the user ID of this system event
346            */
347            @Override
348            public long getUserId() {
349                    return _systemEvent.getUserId();
350            }
351    
352            /**
353            * Returns the user name of this system event.
354            *
355            * @return the user name of this system event
356            */
357            @Override
358            public java.lang.String getUserName() {
359                    return _systemEvent.getUserName();
360            }
361    
362            /**
363            * Returns the user uuid of this system event.
364            *
365            * @return the user uuid of this system event
366            */
367            @Override
368            public java.lang.String getUserUuid() {
369                    return _systemEvent.getUserUuid();
370            }
371    
372            @Override
373            public int hashCode() {
374                    return _systemEvent.hashCode();
375            }
376    
377            @Override
378            public boolean isCachedModel() {
379                    return _systemEvent.isCachedModel();
380            }
381    
382            @Override
383            public boolean isEscapedModel() {
384                    return _systemEvent.isEscapedModel();
385            }
386    
387            @Override
388            public boolean isNew() {
389                    return _systemEvent.isNew();
390            }
391    
392            @Override
393            public void persist() {
394                    _systemEvent.persist();
395            }
396    
397            @Override
398            public void setCachedModel(boolean cachedModel) {
399                    _systemEvent.setCachedModel(cachedModel);
400            }
401    
402            @Override
403            public void setClassName(java.lang.String className) {
404                    _systemEvent.setClassName(className);
405            }
406    
407            /**
408            * Sets the class name ID of this system event.
409            *
410            * @param classNameId the class name ID of this system event
411            */
412            @Override
413            public void setClassNameId(long classNameId) {
414                    _systemEvent.setClassNameId(classNameId);
415            }
416    
417            /**
418            * Sets the class p k of this system event.
419            *
420            * @param classPK the class p k of this system event
421            */
422            @Override
423            public void setClassPK(long classPK) {
424                    _systemEvent.setClassPK(classPK);
425            }
426    
427            /**
428            * Sets the class uuid of this system event.
429            *
430            * @param classUuid the class uuid of this system event
431            */
432            @Override
433            public void setClassUuid(java.lang.String classUuid) {
434                    _systemEvent.setClassUuid(classUuid);
435            }
436    
437            /**
438            * Sets the company ID of this system event.
439            *
440            * @param companyId the company ID of this system event
441            */
442            @Override
443            public void setCompanyId(long companyId) {
444                    _systemEvent.setCompanyId(companyId);
445            }
446    
447            /**
448            * Sets the create date of this system event.
449            *
450            * @param createDate the create date of this system event
451            */
452            @Override
453            public void setCreateDate(Date createDate) {
454                    _systemEvent.setCreateDate(createDate);
455            }
456    
457            @Override
458            public void setExpandoBridgeAttributes(BaseModel<?> baseModel) {
459                    _systemEvent.setExpandoBridgeAttributes(baseModel);
460            }
461    
462            @Override
463            public void setExpandoBridgeAttributes(
464                    com.liferay.portlet.expando.model.ExpandoBridge expandoBridge) {
465                    _systemEvent.setExpandoBridgeAttributes(expandoBridge);
466            }
467    
468            @Override
469            public void setExpandoBridgeAttributes(
470                    com.liferay.portal.service.ServiceContext serviceContext) {
471                    _systemEvent.setExpandoBridgeAttributes(serviceContext);
472            }
473    
474            /**
475            * Sets the extra data of this system event.
476            *
477            * @param extraData the extra data of this system event
478            */
479            @Override
480            public void setExtraData(java.lang.String extraData) {
481                    _systemEvent.setExtraData(extraData);
482            }
483    
484            /**
485            * Sets the group ID of this system event.
486            *
487            * @param groupId the group ID of this system event
488            */
489            @Override
490            public void setGroupId(long groupId) {
491                    _systemEvent.setGroupId(groupId);
492            }
493    
494            /**
495            * Sets the mvcc version of this system event.
496            *
497            * @param mvccVersion the mvcc version of this system event
498            */
499            @Override
500            public void setMvccVersion(long mvccVersion) {
501                    _systemEvent.setMvccVersion(mvccVersion);
502            }
503    
504            @Override
505            public void setNew(boolean n) {
506                    _systemEvent.setNew(n);
507            }
508    
509            /**
510            * Sets the parent system event ID of this system event.
511            *
512            * @param parentSystemEventId the parent system event ID of this system event
513            */
514            @Override
515            public void setParentSystemEventId(long parentSystemEventId) {
516                    _systemEvent.setParentSystemEventId(parentSystemEventId);
517            }
518    
519            /**
520            * Sets the primary key of this system event.
521            *
522            * @param primaryKey the primary key of this system event
523            */
524            @Override
525            public void setPrimaryKey(long primaryKey) {
526                    _systemEvent.setPrimaryKey(primaryKey);
527            }
528    
529            @Override
530            public void setPrimaryKeyObj(java.io.Serializable primaryKeyObj) {
531                    _systemEvent.setPrimaryKeyObj(primaryKeyObj);
532            }
533    
534            @Override
535            public void setReferrerClassName(java.lang.String referrerClassName) {
536                    _systemEvent.setReferrerClassName(referrerClassName);
537            }
538    
539            /**
540            * Sets the referrer class name ID of this system event.
541            *
542            * @param referrerClassNameId the referrer class name ID of this system event
543            */
544            @Override
545            public void setReferrerClassNameId(long referrerClassNameId) {
546                    _systemEvent.setReferrerClassNameId(referrerClassNameId);
547            }
548    
549            /**
550            * Sets the system event ID of this system event.
551            *
552            * @param systemEventId the system event ID of this system event
553            */
554            @Override
555            public void setSystemEventId(long systemEventId) {
556                    _systemEvent.setSystemEventId(systemEventId);
557            }
558    
559            /**
560            * Sets the system event set key of this system event.
561            *
562            * @param systemEventSetKey the system event set key of this system event
563            */
564            @Override
565            public void setSystemEventSetKey(long systemEventSetKey) {
566                    _systemEvent.setSystemEventSetKey(systemEventSetKey);
567            }
568    
569            /**
570            * Sets the type of this system event.
571            *
572            * @param type the type of this system event
573            */
574            @Override
575            public void setType(int type) {
576                    _systemEvent.setType(type);
577            }
578    
579            /**
580            * Sets the user ID of this system event.
581            *
582            * @param userId the user ID of this system event
583            */
584            @Override
585            public void setUserId(long userId) {
586                    _systemEvent.setUserId(userId);
587            }
588    
589            /**
590            * Sets the user name of this system event.
591            *
592            * @param userName the user name of this system event
593            */
594            @Override
595            public void setUserName(java.lang.String userName) {
596                    _systemEvent.setUserName(userName);
597            }
598    
599            /**
600            * Sets the user uuid of this system event.
601            *
602            * @param userUuid the user uuid of this system event
603            */
604            @Override
605            public void setUserUuid(java.lang.String userUuid) {
606                    _systemEvent.setUserUuid(userUuid);
607            }
608    
609            @Override
610            public CacheModel<com.liferay.portal.model.SystemEvent> toCacheModel() {
611                    return _systemEvent.toCacheModel();
612            }
613    
614            @Override
615            public com.liferay.portal.model.SystemEvent toEscapedModel() {
616                    return new SystemEventWrapper(_systemEvent.toEscapedModel());
617            }
618    
619            @Override
620            public java.lang.String toString() {
621                    return _systemEvent.toString();
622            }
623    
624            @Override
625            public com.liferay.portal.model.SystemEvent toUnescapedModel() {
626                    return new SystemEventWrapper(_systemEvent.toUnescapedModel());
627            }
628    
629            @Override
630            public java.lang.String toXmlString() {
631                    return _systemEvent.toXmlString();
632            }
633    
634            @Override
635            public boolean equals(Object obj) {
636                    if (this == obj) {
637                            return true;
638                    }
639    
640                    if (!(obj instanceof SystemEventWrapper)) {
641                            return false;
642                    }
643    
644                    SystemEventWrapper systemEventWrapper = (SystemEventWrapper)obj;
645    
646                    if (Validator.equals(_systemEvent, systemEventWrapper._systemEvent)) {
647                            return true;
648                    }
649    
650                    return false;
651            }
652    
653            @Override
654            public SystemEvent getWrappedModel() {
655                    return _systemEvent;
656            }
657    
658            @Override
659            public boolean isEntityCacheEnabled() {
660                    return _systemEvent.isEntityCacheEnabled();
661            }
662    
663            @Override
664            public boolean isFinderCacheEnabled() {
665                    return _systemEvent.isFinderCacheEnabled();
666            }
667    
668            @Override
669            public void resetOriginalValues() {
670                    _systemEvent.resetOriginalValues();
671            }
672    
673            private final SystemEvent _systemEvent;
674    }