001    /**
002     * Copyright (c) 2000-2012 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.portlet.messageboards.model.impl;
016    
017    import com.liferay.portal.kernel.bean.AutoEscapeBeanHandler;
018    import com.liferay.portal.kernel.exception.SystemException;
019    import com.liferay.portal.kernel.json.JSON;
020    import com.liferay.portal.kernel.util.DateUtil;
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.kernel.workflow.WorkflowConstants;
026    import com.liferay.portal.model.CacheModel;
027    import com.liferay.portal.model.impl.BaseModelImpl;
028    import com.liferay.portal.service.ServiceContext;
029    import com.liferay.portal.util.PortalUtil;
030    
031    import com.liferay.portlet.expando.model.ExpandoBridge;
032    import com.liferay.portlet.expando.util.ExpandoBridgeFactoryUtil;
033    import com.liferay.portlet.messageboards.model.MBThread;
034    import com.liferay.portlet.messageboards.model.MBThreadModel;
035    import com.liferay.portlet.messageboards.model.MBThreadSoap;
036    
037    import java.io.Serializable;
038    
039    import java.sql.Types;
040    
041    import java.util.ArrayList;
042    import java.util.Date;
043    import java.util.List;
044    
045    /**
046     * The base model implementation for the MBThread service. Represents a row in the "MBThread" database table, with each column mapped to a property of this class.
047     *
048     * <p>
049     * This implementation and its corresponding interface {@link com.liferay.portlet.messageboards.model.MBThreadModel} exist only as a container for the default property accessors generated by ServiceBuilder. Helper methods and all application logic should be put in {@link MBThreadImpl}.
050     * </p>
051     *
052     * @author Brian Wing Shun Chan
053     * @see MBThreadImpl
054     * @see com.liferay.portlet.messageboards.model.MBThread
055     * @see com.liferay.portlet.messageboards.model.MBThreadModel
056     * @generated
057     */
058    @JSON(strict = true)
059    public class MBThreadModelImpl extends BaseModelImpl<MBThread>
060            implements MBThreadModel {
061            /*
062             * NOTE FOR DEVELOPERS:
063             *
064             * Never modify or reference this class directly. All methods that expect a message boards thread model instance should use the {@link com.liferay.portlet.messageboards.model.MBThread} interface instead.
065             */
066            public static final String TABLE_NAME = "MBThread";
067            public static final Object[][] TABLE_COLUMNS = {
068                            { "threadId", Types.BIGINT },
069                            { "groupId", Types.BIGINT },
070                            { "companyId", Types.BIGINT },
071                            { "categoryId", Types.BIGINT },
072                            { "rootMessageId", Types.BIGINT },
073                            { "rootMessageUserId", Types.BIGINT },
074                            { "messageCount", Types.INTEGER },
075                            { "viewCount", Types.INTEGER },
076                            { "lastPostByUserId", Types.BIGINT },
077                            { "lastPostDate", Types.TIMESTAMP },
078                            { "priority", Types.DOUBLE },
079                            { "question", Types.BOOLEAN },
080                            { "status", Types.INTEGER },
081                            { "statusByUserId", Types.BIGINT },
082                            { "statusByUserName", Types.VARCHAR },
083                            { "statusDate", Types.TIMESTAMP }
084                    };
085            public static final String TABLE_SQL_CREATE = "create table MBThread (threadId LONG not null primary key,groupId LONG,companyId LONG,categoryId LONG,rootMessageId LONG,rootMessageUserId LONG,messageCount INTEGER,viewCount INTEGER,lastPostByUserId LONG,lastPostDate DATE null,priority DOUBLE,question BOOLEAN,status INTEGER,statusByUserId LONG,statusByUserName VARCHAR(75) null,statusDate DATE null)";
086            public static final String TABLE_SQL_DROP = "drop table MBThread";
087            public static final String ORDER_BY_JPQL = " ORDER BY mbThread.priority DESC, mbThread.lastPostDate DESC";
088            public static final String ORDER_BY_SQL = " ORDER BY MBThread.priority DESC, MBThread.lastPostDate DESC";
089            public static final String DATA_SOURCE = "liferayDataSource";
090            public static final String SESSION_FACTORY = "liferaySessionFactory";
091            public static final String TX_MANAGER = "liferayTransactionManager";
092            public static final boolean ENTITY_CACHE_ENABLED = GetterUtil.getBoolean(com.liferay.portal.util.PropsUtil.get(
093                                    "value.object.entity.cache.enabled.com.liferay.portlet.messageboards.model.MBThread"),
094                            true);
095            public static final boolean FINDER_CACHE_ENABLED = GetterUtil.getBoolean(com.liferay.portal.util.PropsUtil.get(
096                                    "value.object.finder.cache.enabled.com.liferay.portlet.messageboards.model.MBThread"),
097                            true);
098            public static final boolean COLUMN_BITMASK_ENABLED = GetterUtil.getBoolean(com.liferay.portal.util.PropsUtil.get(
099                                    "value.object.column.bitmask.enabled.com.liferay.portlet.messageboards.model.MBThread"),
100                            true);
101            public static long CATEGORYID_COLUMN_BITMASK = 1L;
102            public static long GROUPID_COLUMN_BITMASK = 2L;
103            public static long LASTPOSTDATE_COLUMN_BITMASK = 4L;
104            public static long PRIORITY_COLUMN_BITMASK = 8L;
105            public static long ROOTMESSAGEID_COLUMN_BITMASK = 16L;
106            public static long STATUS_COLUMN_BITMASK = 32L;
107    
108            /**
109             * Converts the soap model instance into a normal model instance.
110             *
111             * @param soapModel the soap model instance to convert
112             * @return the normal model instance
113             */
114            public static MBThread toModel(MBThreadSoap soapModel) {
115                    MBThread model = new MBThreadImpl();
116    
117                    model.setThreadId(soapModel.getThreadId());
118                    model.setGroupId(soapModel.getGroupId());
119                    model.setCompanyId(soapModel.getCompanyId());
120                    model.setCategoryId(soapModel.getCategoryId());
121                    model.setRootMessageId(soapModel.getRootMessageId());
122                    model.setRootMessageUserId(soapModel.getRootMessageUserId());
123                    model.setMessageCount(soapModel.getMessageCount());
124                    model.setViewCount(soapModel.getViewCount());
125                    model.setLastPostByUserId(soapModel.getLastPostByUserId());
126                    model.setLastPostDate(soapModel.getLastPostDate());
127                    model.setPriority(soapModel.getPriority());
128                    model.setQuestion(soapModel.getQuestion());
129                    model.setStatus(soapModel.getStatus());
130                    model.setStatusByUserId(soapModel.getStatusByUserId());
131                    model.setStatusByUserName(soapModel.getStatusByUserName());
132                    model.setStatusDate(soapModel.getStatusDate());
133    
134                    return model;
135            }
136    
137            /**
138             * Converts the soap model instances into normal model instances.
139             *
140             * @param soapModels the soap model instances to convert
141             * @return the normal model instances
142             */
143            public static List<MBThread> toModels(MBThreadSoap[] soapModels) {
144                    List<MBThread> models = new ArrayList<MBThread>(soapModels.length);
145    
146                    for (MBThreadSoap soapModel : soapModels) {
147                            models.add(toModel(soapModel));
148                    }
149    
150                    return models;
151            }
152    
153            public static final long LOCK_EXPIRATION_TIME = GetterUtil.getLong(com.liferay.portal.util.PropsUtil.get(
154                                    "lock.expiration.time.com.liferay.portlet.messageboards.model.MBThread"));
155    
156            public MBThreadModelImpl() {
157            }
158    
159            public long getPrimaryKey() {
160                    return _threadId;
161            }
162    
163            public void setPrimaryKey(long primaryKey) {
164                    setThreadId(primaryKey);
165            }
166    
167            public Serializable getPrimaryKeyObj() {
168                    return new Long(_threadId);
169            }
170    
171            public void setPrimaryKeyObj(Serializable primaryKeyObj) {
172                    setPrimaryKey(((Long)primaryKeyObj).longValue());
173            }
174    
175            public Class<?> getModelClass() {
176                    return MBThread.class;
177            }
178    
179            public String getModelClassName() {
180                    return MBThread.class.getName();
181            }
182    
183            @JSON
184            public long getThreadId() {
185                    return _threadId;
186            }
187    
188            public void setThreadId(long threadId) {
189                    _threadId = threadId;
190            }
191    
192            @JSON
193            public long getGroupId() {
194                    return _groupId;
195            }
196    
197            public void setGroupId(long groupId) {
198                    _columnBitmask |= GROUPID_COLUMN_BITMASK;
199    
200                    if (!_setOriginalGroupId) {
201                            _setOriginalGroupId = true;
202    
203                            _originalGroupId = _groupId;
204                    }
205    
206                    _groupId = groupId;
207            }
208    
209            public long getOriginalGroupId() {
210                    return _originalGroupId;
211            }
212    
213            @JSON
214            public long getCompanyId() {
215                    return _companyId;
216            }
217    
218            public void setCompanyId(long companyId) {
219                    _companyId = companyId;
220            }
221    
222            @JSON
223            public long getCategoryId() {
224                    return _categoryId;
225            }
226    
227            public void setCategoryId(long categoryId) {
228                    _columnBitmask |= CATEGORYID_COLUMN_BITMASK;
229    
230                    if (!_setOriginalCategoryId) {
231                            _setOriginalCategoryId = true;
232    
233                            _originalCategoryId = _categoryId;
234                    }
235    
236                    _categoryId = categoryId;
237            }
238    
239            public long getOriginalCategoryId() {
240                    return _originalCategoryId;
241            }
242    
243            @JSON
244            public long getRootMessageId() {
245                    return _rootMessageId;
246            }
247    
248            public void setRootMessageId(long rootMessageId) {
249                    _columnBitmask |= ROOTMESSAGEID_COLUMN_BITMASK;
250    
251                    if (!_setOriginalRootMessageId) {
252                            _setOriginalRootMessageId = true;
253    
254                            _originalRootMessageId = _rootMessageId;
255                    }
256    
257                    _rootMessageId = rootMessageId;
258            }
259    
260            public long getOriginalRootMessageId() {
261                    return _originalRootMessageId;
262            }
263    
264            @JSON
265            public long getRootMessageUserId() {
266                    return _rootMessageUserId;
267            }
268    
269            public void setRootMessageUserId(long rootMessageUserId) {
270                    _rootMessageUserId = rootMessageUserId;
271            }
272    
273            public String getRootMessageUserUuid() throws SystemException {
274                    return PortalUtil.getUserValue(getRootMessageUserId(), "uuid",
275                            _rootMessageUserUuid);
276            }
277    
278            public void setRootMessageUserUuid(String rootMessageUserUuid) {
279                    _rootMessageUserUuid = rootMessageUserUuid;
280            }
281    
282            @JSON
283            public int getMessageCount() {
284                    return _messageCount;
285            }
286    
287            public void setMessageCount(int messageCount) {
288                    _messageCount = messageCount;
289            }
290    
291            @JSON
292            public int getViewCount() {
293                    return _viewCount;
294            }
295    
296            public void setViewCount(int viewCount) {
297                    _viewCount = viewCount;
298            }
299    
300            @JSON
301            public long getLastPostByUserId() {
302                    return _lastPostByUserId;
303            }
304    
305            public void setLastPostByUserId(long lastPostByUserId) {
306                    _lastPostByUserId = lastPostByUserId;
307            }
308    
309            public String getLastPostByUserUuid() throws SystemException {
310                    return PortalUtil.getUserValue(getLastPostByUserId(), "uuid",
311                            _lastPostByUserUuid);
312            }
313    
314            public void setLastPostByUserUuid(String lastPostByUserUuid) {
315                    _lastPostByUserUuid = lastPostByUserUuid;
316            }
317    
318            @JSON
319            public Date getLastPostDate() {
320                    return _lastPostDate;
321            }
322    
323            public void setLastPostDate(Date lastPostDate) {
324                    _columnBitmask = -1L;
325    
326                    if (_originalLastPostDate == null) {
327                            _originalLastPostDate = _lastPostDate;
328                    }
329    
330                    _lastPostDate = lastPostDate;
331            }
332    
333            public Date getOriginalLastPostDate() {
334                    return _originalLastPostDate;
335            }
336    
337            @JSON
338            public double getPriority() {
339                    return _priority;
340            }
341    
342            public void setPriority(double priority) {
343                    _columnBitmask = -1L;
344    
345                    if (!_setOriginalPriority) {
346                            _setOriginalPriority = true;
347    
348                            _originalPriority = _priority;
349                    }
350    
351                    _priority = priority;
352            }
353    
354            public double getOriginalPriority() {
355                    return _originalPriority;
356            }
357    
358            @JSON
359            public boolean getQuestion() {
360                    return _question;
361            }
362    
363            public boolean isQuestion() {
364                    return _question;
365            }
366    
367            public void setQuestion(boolean question) {
368                    _question = question;
369            }
370    
371            @JSON
372            public int getStatus() {
373                    return _status;
374            }
375    
376            public void setStatus(int status) {
377                    _columnBitmask |= STATUS_COLUMN_BITMASK;
378    
379                    if (!_setOriginalStatus) {
380                            _setOriginalStatus = true;
381    
382                            _originalStatus = _status;
383                    }
384    
385                    _status = status;
386            }
387    
388            public int getOriginalStatus() {
389                    return _originalStatus;
390            }
391    
392            @JSON
393            public long getStatusByUserId() {
394                    return _statusByUserId;
395            }
396    
397            public void setStatusByUserId(long statusByUserId) {
398                    _statusByUserId = statusByUserId;
399            }
400    
401            public String getStatusByUserUuid() throws SystemException {
402                    return PortalUtil.getUserValue(getStatusByUserId(), "uuid",
403                            _statusByUserUuid);
404            }
405    
406            public void setStatusByUserUuid(String statusByUserUuid) {
407                    _statusByUserUuid = statusByUserUuid;
408            }
409    
410            @JSON
411            public String getStatusByUserName() {
412                    if (_statusByUserName == null) {
413                            return StringPool.BLANK;
414                    }
415                    else {
416                            return _statusByUserName;
417                    }
418            }
419    
420            public void setStatusByUserName(String statusByUserName) {
421                    _statusByUserName = statusByUserName;
422            }
423    
424            @JSON
425            public Date getStatusDate() {
426                    return _statusDate;
427            }
428    
429            public void setStatusDate(Date statusDate) {
430                    _statusDate = statusDate;
431            }
432    
433            /**
434             * @deprecated {@link #isApproved}
435             */
436            public boolean getApproved() {
437                    return isApproved();
438            }
439    
440            public boolean isApproved() {
441                    if (getStatus() == WorkflowConstants.STATUS_APPROVED) {
442                            return true;
443                    }
444                    else {
445                            return false;
446                    }
447            }
448    
449            public boolean isDraft() {
450                    if (getStatus() == WorkflowConstants.STATUS_DRAFT) {
451                            return true;
452                    }
453                    else {
454                            return false;
455                    }
456            }
457    
458            public boolean isExpired() {
459                    if (getStatus() == WorkflowConstants.STATUS_EXPIRED) {
460                            return true;
461                    }
462                    else {
463                            return false;
464                    }
465            }
466    
467            public boolean isPending() {
468                    if (getStatus() == WorkflowConstants.STATUS_PENDING) {
469                            return true;
470                    }
471                    else {
472                            return false;
473                    }
474            }
475    
476            public long getColumnBitmask() {
477                    return _columnBitmask;
478            }
479    
480            @Override
481            public MBThread toEscapedModel() {
482                    if (_escapedModelProxy == null) {
483                            _escapedModelProxy = (MBThread)ProxyUtil.newProxyInstance(_classLoader,
484                                            _escapedModelProxyInterfaces,
485                                            new AutoEscapeBeanHandler(this));
486                    }
487    
488                    return _escapedModelProxy;
489            }
490    
491            @Override
492            public ExpandoBridge getExpandoBridge() {
493                    if (_expandoBridge == null) {
494                            _expandoBridge = ExpandoBridgeFactoryUtil.getExpandoBridge(getCompanyId(),
495                                            MBThread.class.getName(), getPrimaryKey());
496                    }
497    
498                    return _expandoBridge;
499            }
500    
501            @Override
502            public void setExpandoBridgeAttributes(ServiceContext serviceContext) {
503                    getExpandoBridge().setAttributes(serviceContext);
504            }
505    
506            @Override
507            public Object clone() {
508                    MBThreadImpl mbThreadImpl = new MBThreadImpl();
509    
510                    mbThreadImpl.setThreadId(getThreadId());
511                    mbThreadImpl.setGroupId(getGroupId());
512                    mbThreadImpl.setCompanyId(getCompanyId());
513                    mbThreadImpl.setCategoryId(getCategoryId());
514                    mbThreadImpl.setRootMessageId(getRootMessageId());
515                    mbThreadImpl.setRootMessageUserId(getRootMessageUserId());
516                    mbThreadImpl.setMessageCount(getMessageCount());
517                    mbThreadImpl.setViewCount(getViewCount());
518                    mbThreadImpl.setLastPostByUserId(getLastPostByUserId());
519                    mbThreadImpl.setLastPostDate(getLastPostDate());
520                    mbThreadImpl.setPriority(getPriority());
521                    mbThreadImpl.setQuestion(getQuestion());
522                    mbThreadImpl.setStatus(getStatus());
523                    mbThreadImpl.setStatusByUserId(getStatusByUserId());
524                    mbThreadImpl.setStatusByUserName(getStatusByUserName());
525                    mbThreadImpl.setStatusDate(getStatusDate());
526    
527                    mbThreadImpl.resetOriginalValues();
528    
529                    return mbThreadImpl;
530            }
531    
532            public int compareTo(MBThread mbThread) {
533                    int value = 0;
534    
535                    if (getPriority() < mbThread.getPriority()) {
536                            value = -1;
537                    }
538                    else if (getPriority() > mbThread.getPriority()) {
539                            value = 1;
540                    }
541                    else {
542                            value = 0;
543                    }
544    
545                    value = value * -1;
546    
547                    if (value != 0) {
548                            return value;
549                    }
550    
551                    value = DateUtil.compareTo(getLastPostDate(), mbThread.getLastPostDate());
552    
553                    value = value * -1;
554    
555                    if (value != 0) {
556                            return value;
557                    }
558    
559                    return 0;
560            }
561    
562            @Override
563            public boolean equals(Object obj) {
564                    if (obj == null) {
565                            return false;
566                    }
567    
568                    MBThread mbThread = null;
569    
570                    try {
571                            mbThread = (MBThread)obj;
572                    }
573                    catch (ClassCastException cce) {
574                            return false;
575                    }
576    
577                    long primaryKey = mbThread.getPrimaryKey();
578    
579                    if (getPrimaryKey() == primaryKey) {
580                            return true;
581                    }
582                    else {
583                            return false;
584                    }
585            }
586    
587            @Override
588            public int hashCode() {
589                    return (int)getPrimaryKey();
590            }
591    
592            @Override
593            public void resetOriginalValues() {
594                    MBThreadModelImpl mbThreadModelImpl = this;
595    
596                    mbThreadModelImpl._originalGroupId = mbThreadModelImpl._groupId;
597    
598                    mbThreadModelImpl._setOriginalGroupId = false;
599    
600                    mbThreadModelImpl._originalCategoryId = mbThreadModelImpl._categoryId;
601    
602                    mbThreadModelImpl._setOriginalCategoryId = false;
603    
604                    mbThreadModelImpl._originalRootMessageId = mbThreadModelImpl._rootMessageId;
605    
606                    mbThreadModelImpl._setOriginalRootMessageId = false;
607    
608                    mbThreadModelImpl._originalLastPostDate = mbThreadModelImpl._lastPostDate;
609    
610                    mbThreadModelImpl._originalPriority = mbThreadModelImpl._priority;
611    
612                    mbThreadModelImpl._setOriginalPriority = false;
613    
614                    mbThreadModelImpl._originalStatus = mbThreadModelImpl._status;
615    
616                    mbThreadModelImpl._setOriginalStatus = false;
617    
618                    mbThreadModelImpl._columnBitmask = 0;
619            }
620    
621            @Override
622            public CacheModel<MBThread> toCacheModel() {
623                    MBThreadCacheModel mbThreadCacheModel = new MBThreadCacheModel();
624    
625                    mbThreadCacheModel.threadId = getThreadId();
626    
627                    mbThreadCacheModel.groupId = getGroupId();
628    
629                    mbThreadCacheModel.companyId = getCompanyId();
630    
631                    mbThreadCacheModel.categoryId = getCategoryId();
632    
633                    mbThreadCacheModel.rootMessageId = getRootMessageId();
634    
635                    mbThreadCacheModel.rootMessageUserId = getRootMessageUserId();
636    
637                    mbThreadCacheModel.messageCount = getMessageCount();
638    
639                    mbThreadCacheModel.viewCount = getViewCount();
640    
641                    mbThreadCacheModel.lastPostByUserId = getLastPostByUserId();
642    
643                    Date lastPostDate = getLastPostDate();
644    
645                    if (lastPostDate != null) {
646                            mbThreadCacheModel.lastPostDate = lastPostDate.getTime();
647                    }
648                    else {
649                            mbThreadCacheModel.lastPostDate = Long.MIN_VALUE;
650                    }
651    
652                    mbThreadCacheModel.priority = getPriority();
653    
654                    mbThreadCacheModel.question = getQuestion();
655    
656                    mbThreadCacheModel.status = getStatus();
657    
658                    mbThreadCacheModel.statusByUserId = getStatusByUserId();
659    
660                    mbThreadCacheModel.statusByUserName = getStatusByUserName();
661    
662                    String statusByUserName = mbThreadCacheModel.statusByUserName;
663    
664                    if ((statusByUserName != null) && (statusByUserName.length() == 0)) {
665                            mbThreadCacheModel.statusByUserName = null;
666                    }
667    
668                    Date statusDate = getStatusDate();
669    
670                    if (statusDate != null) {
671                            mbThreadCacheModel.statusDate = statusDate.getTime();
672                    }
673                    else {
674                            mbThreadCacheModel.statusDate = Long.MIN_VALUE;
675                    }
676    
677                    return mbThreadCacheModel;
678            }
679    
680            @Override
681            public String toString() {
682                    StringBundler sb = new StringBundler(33);
683    
684                    sb.append("{threadId=");
685                    sb.append(getThreadId());
686                    sb.append(", groupId=");
687                    sb.append(getGroupId());
688                    sb.append(", companyId=");
689                    sb.append(getCompanyId());
690                    sb.append(", categoryId=");
691                    sb.append(getCategoryId());
692                    sb.append(", rootMessageId=");
693                    sb.append(getRootMessageId());
694                    sb.append(", rootMessageUserId=");
695                    sb.append(getRootMessageUserId());
696                    sb.append(", messageCount=");
697                    sb.append(getMessageCount());
698                    sb.append(", viewCount=");
699                    sb.append(getViewCount());
700                    sb.append(", lastPostByUserId=");
701                    sb.append(getLastPostByUserId());
702                    sb.append(", lastPostDate=");
703                    sb.append(getLastPostDate());
704                    sb.append(", priority=");
705                    sb.append(getPriority());
706                    sb.append(", question=");
707                    sb.append(getQuestion());
708                    sb.append(", status=");
709                    sb.append(getStatus());
710                    sb.append(", statusByUserId=");
711                    sb.append(getStatusByUserId());
712                    sb.append(", statusByUserName=");
713                    sb.append(getStatusByUserName());
714                    sb.append(", statusDate=");
715                    sb.append(getStatusDate());
716                    sb.append("}");
717    
718                    return sb.toString();
719            }
720    
721            public String toXmlString() {
722                    StringBundler sb = new StringBundler(52);
723    
724                    sb.append("<model><model-name>");
725                    sb.append("com.liferay.portlet.messageboards.model.MBThread");
726                    sb.append("</model-name>");
727    
728                    sb.append(
729                            "<column><column-name>threadId</column-name><column-value><![CDATA[");
730                    sb.append(getThreadId());
731                    sb.append("]]></column-value></column>");
732                    sb.append(
733                            "<column><column-name>groupId</column-name><column-value><![CDATA[");
734                    sb.append(getGroupId());
735                    sb.append("]]></column-value></column>");
736                    sb.append(
737                            "<column><column-name>companyId</column-name><column-value><![CDATA[");
738                    sb.append(getCompanyId());
739                    sb.append("]]></column-value></column>");
740                    sb.append(
741                            "<column><column-name>categoryId</column-name><column-value><![CDATA[");
742                    sb.append(getCategoryId());
743                    sb.append("]]></column-value></column>");
744                    sb.append(
745                            "<column><column-name>rootMessageId</column-name><column-value><![CDATA[");
746                    sb.append(getRootMessageId());
747                    sb.append("]]></column-value></column>");
748                    sb.append(
749                            "<column><column-name>rootMessageUserId</column-name><column-value><![CDATA[");
750                    sb.append(getRootMessageUserId());
751                    sb.append("]]></column-value></column>");
752                    sb.append(
753                            "<column><column-name>messageCount</column-name><column-value><![CDATA[");
754                    sb.append(getMessageCount());
755                    sb.append("]]></column-value></column>");
756                    sb.append(
757                            "<column><column-name>viewCount</column-name><column-value><![CDATA[");
758                    sb.append(getViewCount());
759                    sb.append("]]></column-value></column>");
760                    sb.append(
761                            "<column><column-name>lastPostByUserId</column-name><column-value><![CDATA[");
762                    sb.append(getLastPostByUserId());
763                    sb.append("]]></column-value></column>");
764                    sb.append(
765                            "<column><column-name>lastPostDate</column-name><column-value><![CDATA[");
766                    sb.append(getLastPostDate());
767                    sb.append("]]></column-value></column>");
768                    sb.append(
769                            "<column><column-name>priority</column-name><column-value><![CDATA[");
770                    sb.append(getPriority());
771                    sb.append("]]></column-value></column>");
772                    sb.append(
773                            "<column><column-name>question</column-name><column-value><![CDATA[");
774                    sb.append(getQuestion());
775                    sb.append("]]></column-value></column>");
776                    sb.append(
777                            "<column><column-name>status</column-name><column-value><![CDATA[");
778                    sb.append(getStatus());
779                    sb.append("]]></column-value></column>");
780                    sb.append(
781                            "<column><column-name>statusByUserId</column-name><column-value><![CDATA[");
782                    sb.append(getStatusByUserId());
783                    sb.append("]]></column-value></column>");
784                    sb.append(
785                            "<column><column-name>statusByUserName</column-name><column-value><![CDATA[");
786                    sb.append(getStatusByUserName());
787                    sb.append("]]></column-value></column>");
788                    sb.append(
789                            "<column><column-name>statusDate</column-name><column-value><![CDATA[");
790                    sb.append(getStatusDate());
791                    sb.append("]]></column-value></column>");
792    
793                    sb.append("</model>");
794    
795                    return sb.toString();
796            }
797    
798            private static ClassLoader _classLoader = MBThread.class.getClassLoader();
799            private static Class<?>[] _escapedModelProxyInterfaces = new Class[] {
800                            MBThread.class
801                    };
802            private long _threadId;
803            private long _groupId;
804            private long _originalGroupId;
805            private boolean _setOriginalGroupId;
806            private long _companyId;
807            private long _categoryId;
808            private long _originalCategoryId;
809            private boolean _setOriginalCategoryId;
810            private long _rootMessageId;
811            private long _originalRootMessageId;
812            private boolean _setOriginalRootMessageId;
813            private long _rootMessageUserId;
814            private String _rootMessageUserUuid;
815            private int _messageCount;
816            private int _viewCount;
817            private long _lastPostByUserId;
818            private String _lastPostByUserUuid;
819            private Date _lastPostDate;
820            private Date _originalLastPostDate;
821            private double _priority;
822            private double _originalPriority;
823            private boolean _setOriginalPriority;
824            private boolean _question;
825            private int _status;
826            private int _originalStatus;
827            private boolean _setOriginalStatus;
828            private long _statusByUserId;
829            private String _statusByUserUuid;
830            private String _statusByUserName;
831            private Date _statusDate;
832            private transient ExpandoBridge _expandoBridge;
833            private long _columnBitmask;
834            private MBThread _escapedModelProxy;
835    }