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