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