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