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.impl;
016    
017    import aQute.bnd.annotation.ProviderType;
018    
019    import com.liferay.expando.kernel.model.ExpandoBridge;
020    import com.liferay.expando.kernel.util.ExpandoBridgeFactoryUtil;
021    
022    import com.liferay.portal.kernel.bean.AutoEscapeBeanHandler;
023    import com.liferay.portal.kernel.exception.PortalException;
024    import com.liferay.portal.kernel.model.CacheModel;
025    import com.liferay.portal.kernel.model.User;
026    import com.liferay.portal.kernel.model.UserNotificationEvent;
027    import com.liferay.portal.kernel.model.UserNotificationEventModel;
028    import com.liferay.portal.kernel.model.impl.BaseModelImpl;
029    import com.liferay.portal.kernel.service.ServiceContext;
030    import com.liferay.portal.kernel.service.UserLocalServiceUtil;
031    import com.liferay.portal.kernel.util.GetterUtil;
032    import com.liferay.portal.kernel.util.ProxyUtil;
033    import com.liferay.portal.kernel.util.StringBundler;
034    import com.liferay.portal.kernel.util.StringPool;
035    
036    import java.io.Serializable;
037    
038    import java.sql.Types;
039    
040    import java.util.HashMap;
041    import java.util.Map;
042    
043    /**
044     * The base model implementation for the UserNotificationEvent service. Represents a row in the "UserNotificationEvent" database table, with each column mapped to a property of this class.
045     *
046     * <p>
047     * This implementation and its corresponding interface {@link UserNotificationEventModel} exist only as a container for the default property accessors generated by ServiceBuilder. Helper methods and all application logic should be put in {@link UserNotificationEventImpl}.
048     * </p>
049     *
050     * @author Brian Wing Shun Chan
051     * @see UserNotificationEventImpl
052     * @see UserNotificationEvent
053     * @see UserNotificationEventModel
054     * @generated
055     */
056    @ProviderType
057    public class UserNotificationEventModelImpl extends BaseModelImpl<UserNotificationEvent>
058            implements UserNotificationEventModel {
059            /*
060             * NOTE FOR DEVELOPERS:
061             *
062             * Never modify or reference this class directly. All methods that expect a user notification event model instance should use the {@link UserNotificationEvent} interface instead.
063             */
064            public static final String TABLE_NAME = "UserNotificationEvent";
065            public static final Object[][] TABLE_COLUMNS = {
066                            { "mvccVersion", Types.BIGINT },
067                            { "uuid_", Types.VARCHAR },
068                            { "userNotificationEventId", Types.BIGINT },
069                            { "companyId", Types.BIGINT },
070                            { "userId", Types.BIGINT },
071                            { "type_", Types.VARCHAR },
072                            { "timestamp", Types.BIGINT },
073                            { "deliveryType", Types.INTEGER },
074                            { "deliverBy", Types.BIGINT },
075                            { "delivered", Types.BOOLEAN },
076                            { "payload", Types.CLOB },
077                            { "actionRequired", Types.BOOLEAN },
078                            { "archived", Types.BOOLEAN }
079                    };
080            public static final Map<String, Integer> TABLE_COLUMNS_MAP = new HashMap<String, Integer>();
081    
082            static {
083                    TABLE_COLUMNS_MAP.put("mvccVersion", Types.BIGINT);
084                    TABLE_COLUMNS_MAP.put("uuid_", Types.VARCHAR);
085                    TABLE_COLUMNS_MAP.put("userNotificationEventId", Types.BIGINT);
086                    TABLE_COLUMNS_MAP.put("companyId", Types.BIGINT);
087                    TABLE_COLUMNS_MAP.put("userId", Types.BIGINT);
088                    TABLE_COLUMNS_MAP.put("type_", Types.VARCHAR);
089                    TABLE_COLUMNS_MAP.put("timestamp", Types.BIGINT);
090                    TABLE_COLUMNS_MAP.put("deliveryType", Types.INTEGER);
091                    TABLE_COLUMNS_MAP.put("deliverBy", Types.BIGINT);
092                    TABLE_COLUMNS_MAP.put("delivered", Types.BOOLEAN);
093                    TABLE_COLUMNS_MAP.put("payload", Types.CLOB);
094                    TABLE_COLUMNS_MAP.put("actionRequired", Types.BOOLEAN);
095                    TABLE_COLUMNS_MAP.put("archived", Types.BOOLEAN);
096            }
097    
098            public static final String TABLE_SQL_CREATE = "create table UserNotificationEvent (mvccVersion LONG default 0 not null,uuid_ VARCHAR(75) null,userNotificationEventId LONG not null primary key,companyId LONG,userId LONG,type_ VARCHAR(75) null,timestamp LONG,deliveryType INTEGER,deliverBy LONG,delivered BOOLEAN,payload TEXT null,actionRequired BOOLEAN,archived BOOLEAN)";
099            public static final String TABLE_SQL_DROP = "drop table UserNotificationEvent";
100            public static final String ORDER_BY_JPQL = " ORDER BY userNotificationEvent.timestamp DESC";
101            public static final String ORDER_BY_SQL = " ORDER BY UserNotificationEvent.timestamp DESC";
102            public static final String DATA_SOURCE = "liferayDataSource";
103            public static final String SESSION_FACTORY = "liferaySessionFactory";
104            public static final String TX_MANAGER = "liferayTransactionManager";
105            public static final boolean ENTITY_CACHE_ENABLED = GetterUtil.getBoolean(com.liferay.portal.util.PropsUtil.get(
106                                    "value.object.entity.cache.enabled.com.liferay.portal.kernel.model.UserNotificationEvent"),
107                            true);
108            public static final boolean FINDER_CACHE_ENABLED = GetterUtil.getBoolean(com.liferay.portal.util.PropsUtil.get(
109                                    "value.object.finder.cache.enabled.com.liferay.portal.kernel.model.UserNotificationEvent"),
110                            true);
111            public static final boolean COLUMN_BITMASK_ENABLED = GetterUtil.getBoolean(com.liferay.portal.util.PropsUtil.get(
112                                    "value.object.column.bitmask.enabled.com.liferay.portal.kernel.model.UserNotificationEvent"),
113                            true);
114            public static final long ACTIONREQUIRED_COLUMN_BITMASK = 1L;
115            public static final long ARCHIVED_COLUMN_BITMASK = 2L;
116            public static final long COMPANYID_COLUMN_BITMASK = 4L;
117            public static final long DELIVERED_COLUMN_BITMASK = 8L;
118            public static final long DELIVERYTYPE_COLUMN_BITMASK = 16L;
119            public static final long TYPE_COLUMN_BITMASK = 32L;
120            public static final long USERID_COLUMN_BITMASK = 64L;
121            public static final long UUID_COLUMN_BITMASK = 128L;
122            public static final long TIMESTAMP_COLUMN_BITMASK = 256L;
123            public static final long LOCK_EXPIRATION_TIME = GetterUtil.getLong(com.liferay.portal.util.PropsUtil.get(
124                                    "lock.expiration.time.com.liferay.portal.kernel.model.UserNotificationEvent"));
125    
126            public UserNotificationEventModelImpl() {
127            }
128    
129            @Override
130            public long getPrimaryKey() {
131                    return _userNotificationEventId;
132            }
133    
134            @Override
135            public void setPrimaryKey(long primaryKey) {
136                    setUserNotificationEventId(primaryKey);
137            }
138    
139            @Override
140            public Serializable getPrimaryKeyObj() {
141                    return _userNotificationEventId;
142            }
143    
144            @Override
145            public void setPrimaryKeyObj(Serializable primaryKeyObj) {
146                    setPrimaryKey(((Long)primaryKeyObj).longValue());
147            }
148    
149            @Override
150            public Class<?> getModelClass() {
151                    return UserNotificationEvent.class;
152            }
153    
154            @Override
155            public String getModelClassName() {
156                    return UserNotificationEvent.class.getName();
157            }
158    
159            @Override
160            public Map<String, Object> getModelAttributes() {
161                    Map<String, Object> attributes = new HashMap<String, Object>();
162    
163                    attributes.put("mvccVersion", getMvccVersion());
164                    attributes.put("uuid", getUuid());
165                    attributes.put("userNotificationEventId", getUserNotificationEventId());
166                    attributes.put("companyId", getCompanyId());
167                    attributes.put("userId", getUserId());
168                    attributes.put("type", getType());
169                    attributes.put("timestamp", getTimestamp());
170                    attributes.put("deliveryType", getDeliveryType());
171                    attributes.put("deliverBy", getDeliverBy());
172                    attributes.put("delivered", getDelivered());
173                    attributes.put("payload", getPayload());
174                    attributes.put("actionRequired", getActionRequired());
175                    attributes.put("archived", getArchived());
176    
177                    attributes.put("entityCacheEnabled", isEntityCacheEnabled());
178                    attributes.put("finderCacheEnabled", isFinderCacheEnabled());
179    
180                    return attributes;
181            }
182    
183            @Override
184            public void setModelAttributes(Map<String, Object> attributes) {
185                    Long mvccVersion = (Long)attributes.get("mvccVersion");
186    
187                    if (mvccVersion != null) {
188                            setMvccVersion(mvccVersion);
189                    }
190    
191                    String uuid = (String)attributes.get("uuid");
192    
193                    if (uuid != null) {
194                            setUuid(uuid);
195                    }
196    
197                    Long userNotificationEventId = (Long)attributes.get(
198                                    "userNotificationEventId");
199    
200                    if (userNotificationEventId != null) {
201                            setUserNotificationEventId(userNotificationEventId);
202                    }
203    
204                    Long companyId = (Long)attributes.get("companyId");
205    
206                    if (companyId != null) {
207                            setCompanyId(companyId);
208                    }
209    
210                    Long userId = (Long)attributes.get("userId");
211    
212                    if (userId != null) {
213                            setUserId(userId);
214                    }
215    
216                    String type = (String)attributes.get("type");
217    
218                    if (type != null) {
219                            setType(type);
220                    }
221    
222                    Long timestamp = (Long)attributes.get("timestamp");
223    
224                    if (timestamp != null) {
225                            setTimestamp(timestamp);
226                    }
227    
228                    Integer deliveryType = (Integer)attributes.get("deliveryType");
229    
230                    if (deliveryType != null) {
231                            setDeliveryType(deliveryType);
232                    }
233    
234                    Long deliverBy = (Long)attributes.get("deliverBy");
235    
236                    if (deliverBy != null) {
237                            setDeliverBy(deliverBy);
238                    }
239    
240                    Boolean delivered = (Boolean)attributes.get("delivered");
241    
242                    if (delivered != null) {
243                            setDelivered(delivered);
244                    }
245    
246                    String payload = (String)attributes.get("payload");
247    
248                    if (payload != null) {
249                            setPayload(payload);
250                    }
251    
252                    Boolean actionRequired = (Boolean)attributes.get("actionRequired");
253    
254                    if (actionRequired != null) {
255                            setActionRequired(actionRequired);
256                    }
257    
258                    Boolean archived = (Boolean)attributes.get("archived");
259    
260                    if (archived != null) {
261                            setArchived(archived);
262                    }
263            }
264    
265            @Override
266            public long getMvccVersion() {
267                    return _mvccVersion;
268            }
269    
270            @Override
271            public void setMvccVersion(long mvccVersion) {
272                    _mvccVersion = mvccVersion;
273            }
274    
275            @Override
276            public String getUuid() {
277                    if (_uuid == null) {
278                            return StringPool.BLANK;
279                    }
280                    else {
281                            return _uuid;
282                    }
283            }
284    
285            @Override
286            public void setUuid(String uuid) {
287                    if (_originalUuid == null) {
288                            _originalUuid = _uuid;
289                    }
290    
291                    _uuid = uuid;
292            }
293    
294            public String getOriginalUuid() {
295                    return GetterUtil.getString(_originalUuid);
296            }
297    
298            @Override
299            public long getUserNotificationEventId() {
300                    return _userNotificationEventId;
301            }
302    
303            @Override
304            public void setUserNotificationEventId(long userNotificationEventId) {
305                    _userNotificationEventId = userNotificationEventId;
306            }
307    
308            @Override
309            public long getCompanyId() {
310                    return _companyId;
311            }
312    
313            @Override
314            public void setCompanyId(long companyId) {
315                    _columnBitmask |= COMPANYID_COLUMN_BITMASK;
316    
317                    if (!_setOriginalCompanyId) {
318                            _setOriginalCompanyId = true;
319    
320                            _originalCompanyId = _companyId;
321                    }
322    
323                    _companyId = companyId;
324            }
325    
326            public long getOriginalCompanyId() {
327                    return _originalCompanyId;
328            }
329    
330            @Override
331            public long getUserId() {
332                    return _userId;
333            }
334    
335            @Override
336            public void setUserId(long userId) {
337                    _columnBitmask |= USERID_COLUMN_BITMASK;
338    
339                    if (!_setOriginalUserId) {
340                            _setOriginalUserId = true;
341    
342                            _originalUserId = _userId;
343                    }
344    
345                    _userId = userId;
346            }
347    
348            @Override
349            public String getUserUuid() {
350                    try {
351                            User user = UserLocalServiceUtil.getUserById(getUserId());
352    
353                            return user.getUuid();
354                    }
355                    catch (PortalException pe) {
356                            return StringPool.BLANK;
357                    }
358            }
359    
360            @Override
361            public void setUserUuid(String userUuid) {
362            }
363    
364            public long getOriginalUserId() {
365                    return _originalUserId;
366            }
367    
368            @Override
369            public String getType() {
370                    if (_type == null) {
371                            return StringPool.BLANK;
372                    }
373                    else {
374                            return _type;
375                    }
376            }
377    
378            @Override
379            public void setType(String type) {
380                    _columnBitmask |= TYPE_COLUMN_BITMASK;
381    
382                    if (_originalType == null) {
383                            _originalType = _type;
384                    }
385    
386                    _type = type;
387            }
388    
389            public String getOriginalType() {
390                    return GetterUtil.getString(_originalType);
391            }
392    
393            @Override
394            public long getTimestamp() {
395                    return _timestamp;
396            }
397    
398            @Override
399            public void setTimestamp(long timestamp) {
400                    _columnBitmask = -1L;
401    
402                    _timestamp = timestamp;
403            }
404    
405            @Override
406            public int getDeliveryType() {
407                    return _deliveryType;
408            }
409    
410            @Override
411            public void setDeliveryType(int deliveryType) {
412                    _columnBitmask |= DELIVERYTYPE_COLUMN_BITMASK;
413    
414                    if (!_setOriginalDeliveryType) {
415                            _setOriginalDeliveryType = true;
416    
417                            _originalDeliveryType = _deliveryType;
418                    }
419    
420                    _deliveryType = deliveryType;
421            }
422    
423            public int getOriginalDeliveryType() {
424                    return _originalDeliveryType;
425            }
426    
427            @Override
428            public long getDeliverBy() {
429                    return _deliverBy;
430            }
431    
432            @Override
433            public void setDeliverBy(long deliverBy) {
434                    _deliverBy = deliverBy;
435            }
436    
437            @Override
438            public boolean getDelivered() {
439                    return _delivered;
440            }
441    
442            @Override
443            public boolean isDelivered() {
444                    return _delivered;
445            }
446    
447            @Override
448            public void setDelivered(boolean delivered) {
449                    _columnBitmask |= DELIVERED_COLUMN_BITMASK;
450    
451                    if (!_setOriginalDelivered) {
452                            _setOriginalDelivered = true;
453    
454                            _originalDelivered = _delivered;
455                    }
456    
457                    _delivered = delivered;
458            }
459    
460            public boolean getOriginalDelivered() {
461                    return _originalDelivered;
462            }
463    
464            @Override
465            public String getPayload() {
466                    if (_payload == null) {
467                            return StringPool.BLANK;
468                    }
469                    else {
470                            return _payload;
471                    }
472            }
473    
474            @Override
475            public void setPayload(String payload) {
476                    _payload = payload;
477            }
478    
479            @Override
480            public boolean getActionRequired() {
481                    return _actionRequired;
482            }
483    
484            @Override
485            public boolean isActionRequired() {
486                    return _actionRequired;
487            }
488    
489            @Override
490            public void setActionRequired(boolean actionRequired) {
491                    _columnBitmask |= ACTIONREQUIRED_COLUMN_BITMASK;
492    
493                    if (!_setOriginalActionRequired) {
494                            _setOriginalActionRequired = true;
495    
496                            _originalActionRequired = _actionRequired;
497                    }
498    
499                    _actionRequired = actionRequired;
500            }
501    
502            public boolean getOriginalActionRequired() {
503                    return _originalActionRequired;
504            }
505    
506            @Override
507            public boolean getArchived() {
508                    return _archived;
509            }
510    
511            @Override
512            public boolean isArchived() {
513                    return _archived;
514            }
515    
516            @Override
517            public void setArchived(boolean archived) {
518                    _columnBitmask |= ARCHIVED_COLUMN_BITMASK;
519    
520                    if (!_setOriginalArchived) {
521                            _setOriginalArchived = true;
522    
523                            _originalArchived = _archived;
524                    }
525    
526                    _archived = archived;
527            }
528    
529            public boolean getOriginalArchived() {
530                    return _originalArchived;
531            }
532    
533            public long getColumnBitmask() {
534                    return _columnBitmask;
535            }
536    
537            @Override
538            public ExpandoBridge getExpandoBridge() {
539                    return ExpandoBridgeFactoryUtil.getExpandoBridge(getCompanyId(),
540                            UserNotificationEvent.class.getName(), getPrimaryKey());
541            }
542    
543            @Override
544            public void setExpandoBridgeAttributes(ServiceContext serviceContext) {
545                    ExpandoBridge expandoBridge = getExpandoBridge();
546    
547                    expandoBridge.setAttributes(serviceContext);
548            }
549    
550            @Override
551            public UserNotificationEvent toEscapedModel() {
552                    if (_escapedModel == null) {
553                            _escapedModel = (UserNotificationEvent)ProxyUtil.newProxyInstance(_classLoader,
554                                            _escapedModelInterfaces, new AutoEscapeBeanHandler(this));
555                    }
556    
557                    return _escapedModel;
558            }
559    
560            @Override
561            public Object clone() {
562                    UserNotificationEventImpl userNotificationEventImpl = new UserNotificationEventImpl();
563    
564                    userNotificationEventImpl.setMvccVersion(getMvccVersion());
565                    userNotificationEventImpl.setUuid(getUuid());
566                    userNotificationEventImpl.setUserNotificationEventId(getUserNotificationEventId());
567                    userNotificationEventImpl.setCompanyId(getCompanyId());
568                    userNotificationEventImpl.setUserId(getUserId());
569                    userNotificationEventImpl.setType(getType());
570                    userNotificationEventImpl.setTimestamp(getTimestamp());
571                    userNotificationEventImpl.setDeliveryType(getDeliveryType());
572                    userNotificationEventImpl.setDeliverBy(getDeliverBy());
573                    userNotificationEventImpl.setDelivered(getDelivered());
574                    userNotificationEventImpl.setPayload(getPayload());
575                    userNotificationEventImpl.setActionRequired(getActionRequired());
576                    userNotificationEventImpl.setArchived(getArchived());
577    
578                    userNotificationEventImpl.resetOriginalValues();
579    
580                    return userNotificationEventImpl;
581            }
582    
583            @Override
584            public int compareTo(UserNotificationEvent userNotificationEvent) {
585                    int value = 0;
586    
587                    if (getTimestamp() < userNotificationEvent.getTimestamp()) {
588                            value = -1;
589                    }
590                    else if (getTimestamp() > userNotificationEvent.getTimestamp()) {
591                            value = 1;
592                    }
593                    else {
594                            value = 0;
595                    }
596    
597                    value = value * -1;
598    
599                    if (value != 0) {
600                            return value;
601                    }
602    
603                    return 0;
604            }
605    
606            @Override
607            public boolean equals(Object obj) {
608                    if (this == obj) {
609                            return true;
610                    }
611    
612                    if (!(obj instanceof UserNotificationEvent)) {
613                            return false;
614                    }
615    
616                    UserNotificationEvent userNotificationEvent = (UserNotificationEvent)obj;
617    
618                    long primaryKey = userNotificationEvent.getPrimaryKey();
619    
620                    if (getPrimaryKey() == primaryKey) {
621                            return true;
622                    }
623                    else {
624                            return false;
625                    }
626            }
627    
628            @Override
629            public int hashCode() {
630                    return (int)getPrimaryKey();
631            }
632    
633            @Override
634            public boolean isEntityCacheEnabled() {
635                    return ENTITY_CACHE_ENABLED;
636            }
637    
638            @Override
639            public boolean isFinderCacheEnabled() {
640                    return FINDER_CACHE_ENABLED;
641            }
642    
643            @Override
644            public void resetOriginalValues() {
645                    UserNotificationEventModelImpl userNotificationEventModelImpl = this;
646    
647                    userNotificationEventModelImpl._originalUuid = userNotificationEventModelImpl._uuid;
648    
649                    userNotificationEventModelImpl._originalCompanyId = userNotificationEventModelImpl._companyId;
650    
651                    userNotificationEventModelImpl._setOriginalCompanyId = false;
652    
653                    userNotificationEventModelImpl._originalUserId = userNotificationEventModelImpl._userId;
654    
655                    userNotificationEventModelImpl._setOriginalUserId = false;
656    
657                    userNotificationEventModelImpl._originalType = userNotificationEventModelImpl._type;
658    
659                    userNotificationEventModelImpl._originalDeliveryType = userNotificationEventModelImpl._deliveryType;
660    
661                    userNotificationEventModelImpl._setOriginalDeliveryType = false;
662    
663                    userNotificationEventModelImpl._originalDelivered = userNotificationEventModelImpl._delivered;
664    
665                    userNotificationEventModelImpl._setOriginalDelivered = false;
666    
667                    userNotificationEventModelImpl._originalActionRequired = userNotificationEventModelImpl._actionRequired;
668    
669                    userNotificationEventModelImpl._setOriginalActionRequired = false;
670    
671                    userNotificationEventModelImpl._originalArchived = userNotificationEventModelImpl._archived;
672    
673                    userNotificationEventModelImpl._setOriginalArchived = false;
674    
675                    userNotificationEventModelImpl._columnBitmask = 0;
676            }
677    
678            @Override
679            public CacheModel<UserNotificationEvent> toCacheModel() {
680                    UserNotificationEventCacheModel userNotificationEventCacheModel = new UserNotificationEventCacheModel();
681    
682                    userNotificationEventCacheModel.mvccVersion = getMvccVersion();
683    
684                    userNotificationEventCacheModel.uuid = getUuid();
685    
686                    String uuid = userNotificationEventCacheModel.uuid;
687    
688                    if ((uuid != null) && (uuid.length() == 0)) {
689                            userNotificationEventCacheModel.uuid = null;
690                    }
691    
692                    userNotificationEventCacheModel.userNotificationEventId = getUserNotificationEventId();
693    
694                    userNotificationEventCacheModel.companyId = getCompanyId();
695    
696                    userNotificationEventCacheModel.userId = getUserId();
697    
698                    userNotificationEventCacheModel.type = getType();
699    
700                    String type = userNotificationEventCacheModel.type;
701    
702                    if ((type != null) && (type.length() == 0)) {
703                            userNotificationEventCacheModel.type = null;
704                    }
705    
706                    userNotificationEventCacheModel.timestamp = getTimestamp();
707    
708                    userNotificationEventCacheModel.deliveryType = getDeliveryType();
709    
710                    userNotificationEventCacheModel.deliverBy = getDeliverBy();
711    
712                    userNotificationEventCacheModel.delivered = getDelivered();
713    
714                    userNotificationEventCacheModel.payload = getPayload();
715    
716                    String payload = userNotificationEventCacheModel.payload;
717    
718                    if ((payload != null) && (payload.length() == 0)) {
719                            userNotificationEventCacheModel.payload = null;
720                    }
721    
722                    userNotificationEventCacheModel.actionRequired = getActionRequired();
723    
724                    userNotificationEventCacheModel.archived = getArchived();
725    
726                    return userNotificationEventCacheModel;
727            }
728    
729            @Override
730            public String toString() {
731                    StringBundler sb = new StringBundler(27);
732    
733                    sb.append("{mvccVersion=");
734                    sb.append(getMvccVersion());
735                    sb.append(", uuid=");
736                    sb.append(getUuid());
737                    sb.append(", userNotificationEventId=");
738                    sb.append(getUserNotificationEventId());
739                    sb.append(", companyId=");
740                    sb.append(getCompanyId());
741                    sb.append(", userId=");
742                    sb.append(getUserId());
743                    sb.append(", type=");
744                    sb.append(getType());
745                    sb.append(", timestamp=");
746                    sb.append(getTimestamp());
747                    sb.append(", deliveryType=");
748                    sb.append(getDeliveryType());
749                    sb.append(", deliverBy=");
750                    sb.append(getDeliverBy());
751                    sb.append(", delivered=");
752                    sb.append(getDelivered());
753                    sb.append(", payload=");
754                    sb.append(getPayload());
755                    sb.append(", actionRequired=");
756                    sb.append(getActionRequired());
757                    sb.append(", archived=");
758                    sb.append(getArchived());
759                    sb.append("}");
760    
761                    return sb.toString();
762            }
763    
764            @Override
765            public String toXmlString() {
766                    StringBundler sb = new StringBundler(43);
767    
768                    sb.append("<model><model-name>");
769                    sb.append("com.liferay.portal.kernel.model.UserNotificationEvent");
770                    sb.append("</model-name>");
771    
772                    sb.append(
773                            "<column><column-name>mvccVersion</column-name><column-value><![CDATA[");
774                    sb.append(getMvccVersion());
775                    sb.append("]]></column-value></column>");
776                    sb.append(
777                            "<column><column-name>uuid</column-name><column-value><![CDATA[");
778                    sb.append(getUuid());
779                    sb.append("]]></column-value></column>");
780                    sb.append(
781                            "<column><column-name>userNotificationEventId</column-name><column-value><![CDATA[");
782                    sb.append(getUserNotificationEventId());
783                    sb.append("]]></column-value></column>");
784                    sb.append(
785                            "<column><column-name>companyId</column-name><column-value><![CDATA[");
786                    sb.append(getCompanyId());
787                    sb.append("]]></column-value></column>");
788                    sb.append(
789                            "<column><column-name>userId</column-name><column-value><![CDATA[");
790                    sb.append(getUserId());
791                    sb.append("]]></column-value></column>");
792                    sb.append(
793                            "<column><column-name>type</column-name><column-value><![CDATA[");
794                    sb.append(getType());
795                    sb.append("]]></column-value></column>");
796                    sb.append(
797                            "<column><column-name>timestamp</column-name><column-value><![CDATA[");
798                    sb.append(getTimestamp());
799                    sb.append("]]></column-value></column>");
800                    sb.append(
801                            "<column><column-name>deliveryType</column-name><column-value><![CDATA[");
802                    sb.append(getDeliveryType());
803                    sb.append("]]></column-value></column>");
804                    sb.append(
805                            "<column><column-name>deliverBy</column-name><column-value><![CDATA[");
806                    sb.append(getDeliverBy());
807                    sb.append("]]></column-value></column>");
808                    sb.append(
809                            "<column><column-name>delivered</column-name><column-value><![CDATA[");
810                    sb.append(getDelivered());
811                    sb.append("]]></column-value></column>");
812                    sb.append(
813                            "<column><column-name>payload</column-name><column-value><![CDATA[");
814                    sb.append(getPayload());
815                    sb.append("]]></column-value></column>");
816                    sb.append(
817                            "<column><column-name>actionRequired</column-name><column-value><![CDATA[");
818                    sb.append(getActionRequired());
819                    sb.append("]]></column-value></column>");
820                    sb.append(
821                            "<column><column-name>archived</column-name><column-value><![CDATA[");
822                    sb.append(getArchived());
823                    sb.append("]]></column-value></column>");
824    
825                    sb.append("</model>");
826    
827                    return sb.toString();
828            }
829    
830            private static final ClassLoader _classLoader = UserNotificationEvent.class.getClassLoader();
831            private static final Class<?>[] _escapedModelInterfaces = new Class[] {
832                            UserNotificationEvent.class
833                    };
834            private long _mvccVersion;
835            private String _uuid;
836            private String _originalUuid;
837            private long _userNotificationEventId;
838            private long _companyId;
839            private long _originalCompanyId;
840            private boolean _setOriginalCompanyId;
841            private long _userId;
842            private long _originalUserId;
843            private boolean _setOriginalUserId;
844            private String _type;
845            private String _originalType;
846            private long _timestamp;
847            private int _deliveryType;
848            private int _originalDeliveryType;
849            private boolean _setOriginalDeliveryType;
850            private long _deliverBy;
851            private boolean _delivered;
852            private boolean _originalDelivered;
853            private boolean _setOriginalDelivered;
854            private String _payload;
855            private boolean _actionRequired;
856            private boolean _originalActionRequired;
857            private boolean _setOriginalActionRequired;
858            private boolean _archived;
859            private boolean _originalArchived;
860            private boolean _setOriginalArchived;
861            private long _columnBitmask;
862            private UserNotificationEvent _escapedModel;
863    }