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