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.util.GetterUtil;
020    import com.liferay.portal.kernel.util.ProxyUtil;
021    import com.liferay.portal.kernel.util.StringBundler;
022    import com.liferay.portal.kernel.util.StringPool;
023    import com.liferay.portal.model.CacheModel;
024    import com.liferay.portal.model.impl.BaseModelImpl;
025    import com.liferay.portal.service.ServiceContext;
026    import com.liferay.portal.util.PortalUtil;
027    
028    import com.liferay.portlet.expando.model.ExpandoBridge;
029    import com.liferay.portlet.expando.util.ExpandoBridgeFactoryUtil;
030    import com.liferay.portlet.messageboards.model.MBMailingList;
031    import com.liferay.portlet.messageboards.model.MBMailingListModel;
032    
033    import java.io.Serializable;
034    
035    import java.sql.Types;
036    
037    import java.util.Date;
038    
039    /**
040     * The base model implementation for the MBMailingList service. Represents a row in the "MBMailingList" database table, with each column mapped to a property of this class.
041     *
042     * <p>
043     * This implementation and its corresponding interface {@link com.liferay.portlet.messageboards.model.MBMailingListModel} exist only as a container for the default property accessors generated by ServiceBuilder. Helper methods and all application logic should be put in {@link MBMailingListImpl}.
044     * </p>
045     *
046     * @author Brian Wing Shun Chan
047     * @see MBMailingListImpl
048     * @see com.liferay.portlet.messageboards.model.MBMailingList
049     * @see com.liferay.portlet.messageboards.model.MBMailingListModel
050     * @generated
051     */
052    public class MBMailingListModelImpl extends BaseModelImpl<MBMailingList>
053            implements MBMailingListModel {
054            /*
055             * NOTE FOR DEVELOPERS:
056             *
057             * Never modify or reference this class directly. All methods that expect a message boards mailing list model instance should use the {@link com.liferay.portlet.messageboards.model.MBMailingList} interface instead.
058             */
059            public static final String TABLE_NAME = "MBMailingList";
060            public static final Object[][] TABLE_COLUMNS = {
061                            { "uuid_", Types.VARCHAR },
062                            { "mailingListId", Types.BIGINT },
063                            { "groupId", Types.BIGINT },
064                            { "companyId", Types.BIGINT },
065                            { "userId", Types.BIGINT },
066                            { "userName", Types.VARCHAR },
067                            { "createDate", Types.TIMESTAMP },
068                            { "modifiedDate", Types.TIMESTAMP },
069                            { "categoryId", Types.BIGINT },
070                            { "emailAddress", Types.VARCHAR },
071                            { "inProtocol", Types.VARCHAR },
072                            { "inServerName", Types.VARCHAR },
073                            { "inServerPort", Types.INTEGER },
074                            { "inUseSSL", Types.BOOLEAN },
075                            { "inUserName", Types.VARCHAR },
076                            { "inPassword", Types.VARCHAR },
077                            { "inReadInterval", Types.INTEGER },
078                            { "outEmailAddress", Types.VARCHAR },
079                            { "outCustom", Types.BOOLEAN },
080                            { "outServerName", Types.VARCHAR },
081                            { "outServerPort", Types.INTEGER },
082                            { "outUseSSL", Types.BOOLEAN },
083                            { "outUserName", Types.VARCHAR },
084                            { "outPassword", Types.VARCHAR },
085                            { "allowAnonymous", Types.BOOLEAN },
086                            { "active_", Types.BOOLEAN }
087                    };
088            public static final String TABLE_SQL_CREATE = "create table MBMailingList (uuid_ VARCHAR(75) null,mailingListId LONG not null primary key,groupId LONG,companyId LONG,userId LONG,userName VARCHAR(75) null,createDate DATE null,modifiedDate DATE null,categoryId LONG,emailAddress VARCHAR(75) null,inProtocol VARCHAR(75) null,inServerName VARCHAR(75) null,inServerPort INTEGER,inUseSSL BOOLEAN,inUserName VARCHAR(75) null,inPassword VARCHAR(75) null,inReadInterval INTEGER,outEmailAddress VARCHAR(75) null,outCustom BOOLEAN,outServerName VARCHAR(75) null,outServerPort INTEGER,outUseSSL BOOLEAN,outUserName VARCHAR(75) null,outPassword VARCHAR(75) null,allowAnonymous BOOLEAN,active_ BOOLEAN)";
089            public static final String TABLE_SQL_DROP = "drop table MBMailingList";
090            public static final String DATA_SOURCE = "liferayDataSource";
091            public static final String SESSION_FACTORY = "liferaySessionFactory";
092            public static final String TX_MANAGER = "liferayTransactionManager";
093            public static final boolean ENTITY_CACHE_ENABLED = GetterUtil.getBoolean(com.liferay.portal.util.PropsUtil.get(
094                                    "value.object.entity.cache.enabled.com.liferay.portlet.messageboards.model.MBMailingList"),
095                            true);
096            public static final boolean FINDER_CACHE_ENABLED = GetterUtil.getBoolean(com.liferay.portal.util.PropsUtil.get(
097                                    "value.object.finder.cache.enabled.com.liferay.portlet.messageboards.model.MBMailingList"),
098                            true);
099            public static final boolean COLUMN_BITMASK_ENABLED = GetterUtil.getBoolean(com.liferay.portal.util.PropsUtil.get(
100                                    "value.object.column.bitmask.enabled.com.liferay.portlet.messageboards.model.MBMailingList"),
101                            true);
102            public static long ACTIVE_COLUMN_BITMASK = 1L;
103            public static long CATEGORYID_COLUMN_BITMASK = 2L;
104            public static long GROUPID_COLUMN_BITMASK = 4L;
105            public static long UUID_COLUMN_BITMASK = 8L;
106            public static final long LOCK_EXPIRATION_TIME = GetterUtil.getLong(com.liferay.portal.util.PropsUtil.get(
107                                    "lock.expiration.time.com.liferay.portlet.messageboards.model.MBMailingList"));
108    
109            public MBMailingListModelImpl() {
110            }
111    
112            public long getPrimaryKey() {
113                    return _mailingListId;
114            }
115    
116            public void setPrimaryKey(long primaryKey) {
117                    setMailingListId(primaryKey);
118            }
119    
120            public Serializable getPrimaryKeyObj() {
121                    return new Long(_mailingListId);
122            }
123    
124            public void setPrimaryKeyObj(Serializable primaryKeyObj) {
125                    setPrimaryKey(((Long)primaryKeyObj).longValue());
126            }
127    
128            public Class<?> getModelClass() {
129                    return MBMailingList.class;
130            }
131    
132            public String getModelClassName() {
133                    return MBMailingList.class.getName();
134            }
135    
136            public String getUuid() {
137                    if (_uuid == null) {
138                            return StringPool.BLANK;
139                    }
140                    else {
141                            return _uuid;
142                    }
143            }
144    
145            public void setUuid(String uuid) {
146                    if (_originalUuid == null) {
147                            _originalUuid = _uuid;
148                    }
149    
150                    _uuid = uuid;
151            }
152    
153            public String getOriginalUuid() {
154                    return GetterUtil.getString(_originalUuid);
155            }
156    
157            public long getMailingListId() {
158                    return _mailingListId;
159            }
160    
161            public void setMailingListId(long mailingListId) {
162                    _mailingListId = mailingListId;
163            }
164    
165            public long getGroupId() {
166                    return _groupId;
167            }
168    
169            public void setGroupId(long groupId) {
170                    _columnBitmask |= GROUPID_COLUMN_BITMASK;
171    
172                    if (!_setOriginalGroupId) {
173                            _setOriginalGroupId = true;
174    
175                            _originalGroupId = _groupId;
176                    }
177    
178                    _groupId = groupId;
179            }
180    
181            public long getOriginalGroupId() {
182                    return _originalGroupId;
183            }
184    
185            public long getCompanyId() {
186                    return _companyId;
187            }
188    
189            public void setCompanyId(long companyId) {
190                    _companyId = companyId;
191            }
192    
193            public long getUserId() {
194                    return _userId;
195            }
196    
197            public void setUserId(long userId) {
198                    _userId = userId;
199            }
200    
201            public String getUserUuid() throws SystemException {
202                    return PortalUtil.getUserValue(getUserId(), "uuid", _userUuid);
203            }
204    
205            public void setUserUuid(String userUuid) {
206                    _userUuid = userUuid;
207            }
208    
209            public String getUserName() {
210                    if (_userName == null) {
211                            return StringPool.BLANK;
212                    }
213                    else {
214                            return _userName;
215                    }
216            }
217    
218            public void setUserName(String userName) {
219                    _userName = userName;
220            }
221    
222            public Date getCreateDate() {
223                    return _createDate;
224            }
225    
226            public void setCreateDate(Date createDate) {
227                    _createDate = createDate;
228            }
229    
230            public Date getModifiedDate() {
231                    return _modifiedDate;
232            }
233    
234            public void setModifiedDate(Date modifiedDate) {
235                    _modifiedDate = modifiedDate;
236            }
237    
238            public long getCategoryId() {
239                    return _categoryId;
240            }
241    
242            public void setCategoryId(long categoryId) {
243                    _columnBitmask |= CATEGORYID_COLUMN_BITMASK;
244    
245                    if (!_setOriginalCategoryId) {
246                            _setOriginalCategoryId = true;
247    
248                            _originalCategoryId = _categoryId;
249                    }
250    
251                    _categoryId = categoryId;
252            }
253    
254            public long getOriginalCategoryId() {
255                    return _originalCategoryId;
256            }
257    
258            public String getEmailAddress() {
259                    if (_emailAddress == null) {
260                            return StringPool.BLANK;
261                    }
262                    else {
263                            return _emailAddress;
264                    }
265            }
266    
267            public void setEmailAddress(String emailAddress) {
268                    _emailAddress = emailAddress;
269            }
270    
271            public String getInProtocol() {
272                    if (_inProtocol == null) {
273                            return StringPool.BLANK;
274                    }
275                    else {
276                            return _inProtocol;
277                    }
278            }
279    
280            public void setInProtocol(String inProtocol) {
281                    _inProtocol = inProtocol;
282            }
283    
284            public String getInServerName() {
285                    if (_inServerName == null) {
286                            return StringPool.BLANK;
287                    }
288                    else {
289                            return _inServerName;
290                    }
291            }
292    
293            public void setInServerName(String inServerName) {
294                    _inServerName = inServerName;
295            }
296    
297            public int getInServerPort() {
298                    return _inServerPort;
299            }
300    
301            public void setInServerPort(int inServerPort) {
302                    _inServerPort = inServerPort;
303            }
304    
305            public boolean getInUseSSL() {
306                    return _inUseSSL;
307            }
308    
309            public boolean isInUseSSL() {
310                    return _inUseSSL;
311            }
312    
313            public void setInUseSSL(boolean inUseSSL) {
314                    _inUseSSL = inUseSSL;
315            }
316    
317            public String getInUserName() {
318                    if (_inUserName == null) {
319                            return StringPool.BLANK;
320                    }
321                    else {
322                            return _inUserName;
323                    }
324            }
325    
326            public void setInUserName(String inUserName) {
327                    _inUserName = inUserName;
328            }
329    
330            public String getInPassword() {
331                    if (_inPassword == null) {
332                            return StringPool.BLANK;
333                    }
334                    else {
335                            return _inPassword;
336                    }
337            }
338    
339            public void setInPassword(String inPassword) {
340                    _inPassword = inPassword;
341            }
342    
343            public int getInReadInterval() {
344                    return _inReadInterval;
345            }
346    
347            public void setInReadInterval(int inReadInterval) {
348                    _inReadInterval = inReadInterval;
349            }
350    
351            public String getOutEmailAddress() {
352                    if (_outEmailAddress == null) {
353                            return StringPool.BLANK;
354                    }
355                    else {
356                            return _outEmailAddress;
357                    }
358            }
359    
360            public void setOutEmailAddress(String outEmailAddress) {
361                    _outEmailAddress = outEmailAddress;
362            }
363    
364            public boolean getOutCustom() {
365                    return _outCustom;
366            }
367    
368            public boolean isOutCustom() {
369                    return _outCustom;
370            }
371    
372            public void setOutCustom(boolean outCustom) {
373                    _outCustom = outCustom;
374            }
375    
376            public String getOutServerName() {
377                    if (_outServerName == null) {
378                            return StringPool.BLANK;
379                    }
380                    else {
381                            return _outServerName;
382                    }
383            }
384    
385            public void setOutServerName(String outServerName) {
386                    _outServerName = outServerName;
387            }
388    
389            public int getOutServerPort() {
390                    return _outServerPort;
391            }
392    
393            public void setOutServerPort(int outServerPort) {
394                    _outServerPort = outServerPort;
395            }
396    
397            public boolean getOutUseSSL() {
398                    return _outUseSSL;
399            }
400    
401            public boolean isOutUseSSL() {
402                    return _outUseSSL;
403            }
404    
405            public void setOutUseSSL(boolean outUseSSL) {
406                    _outUseSSL = outUseSSL;
407            }
408    
409            public String getOutUserName() {
410                    if (_outUserName == null) {
411                            return StringPool.BLANK;
412                    }
413                    else {
414                            return _outUserName;
415                    }
416            }
417    
418            public void setOutUserName(String outUserName) {
419                    _outUserName = outUserName;
420            }
421    
422            public String getOutPassword() {
423                    if (_outPassword == null) {
424                            return StringPool.BLANK;
425                    }
426                    else {
427                            return _outPassword;
428                    }
429            }
430    
431            public void setOutPassword(String outPassword) {
432                    _outPassword = outPassword;
433            }
434    
435            public boolean getAllowAnonymous() {
436                    return _allowAnonymous;
437            }
438    
439            public boolean isAllowAnonymous() {
440                    return _allowAnonymous;
441            }
442    
443            public void setAllowAnonymous(boolean allowAnonymous) {
444                    _allowAnonymous = allowAnonymous;
445            }
446    
447            public boolean getActive() {
448                    return _active;
449            }
450    
451            public boolean isActive() {
452                    return _active;
453            }
454    
455            public void setActive(boolean active) {
456                    _columnBitmask |= ACTIVE_COLUMN_BITMASK;
457    
458                    if (!_setOriginalActive) {
459                            _setOriginalActive = true;
460    
461                            _originalActive = _active;
462                    }
463    
464                    _active = active;
465            }
466    
467            public boolean getOriginalActive() {
468                    return _originalActive;
469            }
470    
471            public long getColumnBitmask() {
472                    return _columnBitmask;
473            }
474    
475            @Override
476            public MBMailingList toEscapedModel() {
477                    if (_escapedModelProxy == null) {
478                            _escapedModelProxy = (MBMailingList)ProxyUtil.newProxyInstance(_classLoader,
479                                            _escapedModelProxyInterfaces,
480                                            new AutoEscapeBeanHandler(this));
481                    }
482    
483                    return _escapedModelProxy;
484            }
485    
486            @Override
487            public ExpandoBridge getExpandoBridge() {
488                    if (_expandoBridge == null) {
489                            _expandoBridge = ExpandoBridgeFactoryUtil.getExpandoBridge(getCompanyId(),
490                                            MBMailingList.class.getName(), getPrimaryKey());
491                    }
492    
493                    return _expandoBridge;
494            }
495    
496            @Override
497            public void setExpandoBridgeAttributes(ServiceContext serviceContext) {
498                    getExpandoBridge().setAttributes(serviceContext);
499            }
500    
501            @Override
502            public Object clone() {
503                    MBMailingListImpl mbMailingListImpl = new MBMailingListImpl();
504    
505                    mbMailingListImpl.setUuid(getUuid());
506                    mbMailingListImpl.setMailingListId(getMailingListId());
507                    mbMailingListImpl.setGroupId(getGroupId());
508                    mbMailingListImpl.setCompanyId(getCompanyId());
509                    mbMailingListImpl.setUserId(getUserId());
510                    mbMailingListImpl.setUserName(getUserName());
511                    mbMailingListImpl.setCreateDate(getCreateDate());
512                    mbMailingListImpl.setModifiedDate(getModifiedDate());
513                    mbMailingListImpl.setCategoryId(getCategoryId());
514                    mbMailingListImpl.setEmailAddress(getEmailAddress());
515                    mbMailingListImpl.setInProtocol(getInProtocol());
516                    mbMailingListImpl.setInServerName(getInServerName());
517                    mbMailingListImpl.setInServerPort(getInServerPort());
518                    mbMailingListImpl.setInUseSSL(getInUseSSL());
519                    mbMailingListImpl.setInUserName(getInUserName());
520                    mbMailingListImpl.setInPassword(getInPassword());
521                    mbMailingListImpl.setInReadInterval(getInReadInterval());
522                    mbMailingListImpl.setOutEmailAddress(getOutEmailAddress());
523                    mbMailingListImpl.setOutCustom(getOutCustom());
524                    mbMailingListImpl.setOutServerName(getOutServerName());
525                    mbMailingListImpl.setOutServerPort(getOutServerPort());
526                    mbMailingListImpl.setOutUseSSL(getOutUseSSL());
527                    mbMailingListImpl.setOutUserName(getOutUserName());
528                    mbMailingListImpl.setOutPassword(getOutPassword());
529                    mbMailingListImpl.setAllowAnonymous(getAllowAnonymous());
530                    mbMailingListImpl.setActive(getActive());
531    
532                    mbMailingListImpl.resetOriginalValues();
533    
534                    return mbMailingListImpl;
535            }
536    
537            public int compareTo(MBMailingList mbMailingList) {
538                    long primaryKey = mbMailingList.getPrimaryKey();
539    
540                    if (getPrimaryKey() < primaryKey) {
541                            return -1;
542                    }
543                    else if (getPrimaryKey() > primaryKey) {
544                            return 1;
545                    }
546                    else {
547                            return 0;
548                    }
549            }
550    
551            @Override
552            public boolean equals(Object obj) {
553                    if (obj == null) {
554                            return false;
555                    }
556    
557                    MBMailingList mbMailingList = null;
558    
559                    try {
560                            mbMailingList = (MBMailingList)obj;
561                    }
562                    catch (ClassCastException cce) {
563                            return false;
564                    }
565    
566                    long primaryKey = mbMailingList.getPrimaryKey();
567    
568                    if (getPrimaryKey() == primaryKey) {
569                            return true;
570                    }
571                    else {
572                            return false;
573                    }
574            }
575    
576            @Override
577            public int hashCode() {
578                    return (int)getPrimaryKey();
579            }
580    
581            @Override
582            public void resetOriginalValues() {
583                    MBMailingListModelImpl mbMailingListModelImpl = this;
584    
585                    mbMailingListModelImpl._originalUuid = mbMailingListModelImpl._uuid;
586    
587                    mbMailingListModelImpl._originalGroupId = mbMailingListModelImpl._groupId;
588    
589                    mbMailingListModelImpl._setOriginalGroupId = false;
590    
591                    mbMailingListModelImpl._originalCategoryId = mbMailingListModelImpl._categoryId;
592    
593                    mbMailingListModelImpl._setOriginalCategoryId = false;
594    
595                    mbMailingListModelImpl._originalActive = mbMailingListModelImpl._active;
596    
597                    mbMailingListModelImpl._setOriginalActive = false;
598    
599                    mbMailingListModelImpl._columnBitmask = 0;
600            }
601    
602            @Override
603            public CacheModel<MBMailingList> toCacheModel() {
604                    MBMailingListCacheModel mbMailingListCacheModel = new MBMailingListCacheModel();
605    
606                    mbMailingListCacheModel.uuid = getUuid();
607    
608                    String uuid = mbMailingListCacheModel.uuid;
609    
610                    if ((uuid != null) && (uuid.length() == 0)) {
611                            mbMailingListCacheModel.uuid = null;
612                    }
613    
614                    mbMailingListCacheModel.mailingListId = getMailingListId();
615    
616                    mbMailingListCacheModel.groupId = getGroupId();
617    
618                    mbMailingListCacheModel.companyId = getCompanyId();
619    
620                    mbMailingListCacheModel.userId = getUserId();
621    
622                    mbMailingListCacheModel.userName = getUserName();
623    
624                    String userName = mbMailingListCacheModel.userName;
625    
626                    if ((userName != null) && (userName.length() == 0)) {
627                            mbMailingListCacheModel.userName = null;
628                    }
629    
630                    Date createDate = getCreateDate();
631    
632                    if (createDate != null) {
633                            mbMailingListCacheModel.createDate = createDate.getTime();
634                    }
635                    else {
636                            mbMailingListCacheModel.createDate = Long.MIN_VALUE;
637                    }
638    
639                    Date modifiedDate = getModifiedDate();
640    
641                    if (modifiedDate != null) {
642                            mbMailingListCacheModel.modifiedDate = modifiedDate.getTime();
643                    }
644                    else {
645                            mbMailingListCacheModel.modifiedDate = Long.MIN_VALUE;
646                    }
647    
648                    mbMailingListCacheModel.categoryId = getCategoryId();
649    
650                    mbMailingListCacheModel.emailAddress = getEmailAddress();
651    
652                    String emailAddress = mbMailingListCacheModel.emailAddress;
653    
654                    if ((emailAddress != null) && (emailAddress.length() == 0)) {
655                            mbMailingListCacheModel.emailAddress = null;
656                    }
657    
658                    mbMailingListCacheModel.inProtocol = getInProtocol();
659    
660                    String inProtocol = mbMailingListCacheModel.inProtocol;
661    
662                    if ((inProtocol != null) && (inProtocol.length() == 0)) {
663                            mbMailingListCacheModel.inProtocol = null;
664                    }
665    
666                    mbMailingListCacheModel.inServerName = getInServerName();
667    
668                    String inServerName = mbMailingListCacheModel.inServerName;
669    
670                    if ((inServerName != null) && (inServerName.length() == 0)) {
671                            mbMailingListCacheModel.inServerName = null;
672                    }
673    
674                    mbMailingListCacheModel.inServerPort = getInServerPort();
675    
676                    mbMailingListCacheModel.inUseSSL = getInUseSSL();
677    
678                    mbMailingListCacheModel.inUserName = getInUserName();
679    
680                    String inUserName = mbMailingListCacheModel.inUserName;
681    
682                    if ((inUserName != null) && (inUserName.length() == 0)) {
683                            mbMailingListCacheModel.inUserName = null;
684                    }
685    
686                    mbMailingListCacheModel.inPassword = getInPassword();
687    
688                    String inPassword = mbMailingListCacheModel.inPassword;
689    
690                    if ((inPassword != null) && (inPassword.length() == 0)) {
691                            mbMailingListCacheModel.inPassword = null;
692                    }
693    
694                    mbMailingListCacheModel.inReadInterval = getInReadInterval();
695    
696                    mbMailingListCacheModel.outEmailAddress = getOutEmailAddress();
697    
698                    String outEmailAddress = mbMailingListCacheModel.outEmailAddress;
699    
700                    if ((outEmailAddress != null) && (outEmailAddress.length() == 0)) {
701                            mbMailingListCacheModel.outEmailAddress = null;
702                    }
703    
704                    mbMailingListCacheModel.outCustom = getOutCustom();
705    
706                    mbMailingListCacheModel.outServerName = getOutServerName();
707    
708                    String outServerName = mbMailingListCacheModel.outServerName;
709    
710                    if ((outServerName != null) && (outServerName.length() == 0)) {
711                            mbMailingListCacheModel.outServerName = null;
712                    }
713    
714                    mbMailingListCacheModel.outServerPort = getOutServerPort();
715    
716                    mbMailingListCacheModel.outUseSSL = getOutUseSSL();
717    
718                    mbMailingListCacheModel.outUserName = getOutUserName();
719    
720                    String outUserName = mbMailingListCacheModel.outUserName;
721    
722                    if ((outUserName != null) && (outUserName.length() == 0)) {
723                            mbMailingListCacheModel.outUserName = null;
724                    }
725    
726                    mbMailingListCacheModel.outPassword = getOutPassword();
727    
728                    String outPassword = mbMailingListCacheModel.outPassword;
729    
730                    if ((outPassword != null) && (outPassword.length() == 0)) {
731                            mbMailingListCacheModel.outPassword = null;
732                    }
733    
734                    mbMailingListCacheModel.allowAnonymous = getAllowAnonymous();
735    
736                    mbMailingListCacheModel.active = getActive();
737    
738                    return mbMailingListCacheModel;
739            }
740    
741            @Override
742            public String toString() {
743                    StringBundler sb = new StringBundler(53);
744    
745                    sb.append("{uuid=");
746                    sb.append(getUuid());
747                    sb.append(", mailingListId=");
748                    sb.append(getMailingListId());
749                    sb.append(", groupId=");
750                    sb.append(getGroupId());
751                    sb.append(", companyId=");
752                    sb.append(getCompanyId());
753                    sb.append(", userId=");
754                    sb.append(getUserId());
755                    sb.append(", userName=");
756                    sb.append(getUserName());
757                    sb.append(", createDate=");
758                    sb.append(getCreateDate());
759                    sb.append(", modifiedDate=");
760                    sb.append(getModifiedDate());
761                    sb.append(", categoryId=");
762                    sb.append(getCategoryId());
763                    sb.append(", emailAddress=");
764                    sb.append(getEmailAddress());
765                    sb.append(", inProtocol=");
766                    sb.append(getInProtocol());
767                    sb.append(", inServerName=");
768                    sb.append(getInServerName());
769                    sb.append(", inServerPort=");
770                    sb.append(getInServerPort());
771                    sb.append(", inUseSSL=");
772                    sb.append(getInUseSSL());
773                    sb.append(", inUserName=");
774                    sb.append(getInUserName());
775                    sb.append(", inPassword=");
776                    sb.append(getInPassword());
777                    sb.append(", inReadInterval=");
778                    sb.append(getInReadInterval());
779                    sb.append(", outEmailAddress=");
780                    sb.append(getOutEmailAddress());
781                    sb.append(", outCustom=");
782                    sb.append(getOutCustom());
783                    sb.append(", outServerName=");
784                    sb.append(getOutServerName());
785                    sb.append(", outServerPort=");
786                    sb.append(getOutServerPort());
787                    sb.append(", outUseSSL=");
788                    sb.append(getOutUseSSL());
789                    sb.append(", outUserName=");
790                    sb.append(getOutUserName());
791                    sb.append(", outPassword=");
792                    sb.append(getOutPassword());
793                    sb.append(", allowAnonymous=");
794                    sb.append(getAllowAnonymous());
795                    sb.append(", active=");
796                    sb.append(getActive());
797                    sb.append("}");
798    
799                    return sb.toString();
800            }
801    
802            public String toXmlString() {
803                    StringBundler sb = new StringBundler(82);
804    
805                    sb.append("<model><model-name>");
806                    sb.append("com.liferay.portlet.messageboards.model.MBMailingList");
807                    sb.append("</model-name>");
808    
809                    sb.append(
810                            "<column><column-name>uuid</column-name><column-value><![CDATA[");
811                    sb.append(getUuid());
812                    sb.append("]]></column-value></column>");
813                    sb.append(
814                            "<column><column-name>mailingListId</column-name><column-value><![CDATA[");
815                    sb.append(getMailingListId());
816                    sb.append("]]></column-value></column>");
817                    sb.append(
818                            "<column><column-name>groupId</column-name><column-value><![CDATA[");
819                    sb.append(getGroupId());
820                    sb.append("]]></column-value></column>");
821                    sb.append(
822                            "<column><column-name>companyId</column-name><column-value><![CDATA[");
823                    sb.append(getCompanyId());
824                    sb.append("]]></column-value></column>");
825                    sb.append(
826                            "<column><column-name>userId</column-name><column-value><![CDATA[");
827                    sb.append(getUserId());
828                    sb.append("]]></column-value></column>");
829                    sb.append(
830                            "<column><column-name>userName</column-name><column-value><![CDATA[");
831                    sb.append(getUserName());
832                    sb.append("]]></column-value></column>");
833                    sb.append(
834                            "<column><column-name>createDate</column-name><column-value><![CDATA[");
835                    sb.append(getCreateDate());
836                    sb.append("]]></column-value></column>");
837                    sb.append(
838                            "<column><column-name>modifiedDate</column-name><column-value><![CDATA[");
839                    sb.append(getModifiedDate());
840                    sb.append("]]></column-value></column>");
841                    sb.append(
842                            "<column><column-name>categoryId</column-name><column-value><![CDATA[");
843                    sb.append(getCategoryId());
844                    sb.append("]]></column-value></column>");
845                    sb.append(
846                            "<column><column-name>emailAddress</column-name><column-value><![CDATA[");
847                    sb.append(getEmailAddress());
848                    sb.append("]]></column-value></column>");
849                    sb.append(
850                            "<column><column-name>inProtocol</column-name><column-value><![CDATA[");
851                    sb.append(getInProtocol());
852                    sb.append("]]></column-value></column>");
853                    sb.append(
854                            "<column><column-name>inServerName</column-name><column-value><![CDATA[");
855                    sb.append(getInServerName());
856                    sb.append("]]></column-value></column>");
857                    sb.append(
858                            "<column><column-name>inServerPort</column-name><column-value><![CDATA[");
859                    sb.append(getInServerPort());
860                    sb.append("]]></column-value></column>");
861                    sb.append(
862                            "<column><column-name>inUseSSL</column-name><column-value><![CDATA[");
863                    sb.append(getInUseSSL());
864                    sb.append("]]></column-value></column>");
865                    sb.append(
866                            "<column><column-name>inUserName</column-name><column-value><![CDATA[");
867                    sb.append(getInUserName());
868                    sb.append("]]></column-value></column>");
869                    sb.append(
870                            "<column><column-name>inPassword</column-name><column-value><![CDATA[");
871                    sb.append(getInPassword());
872                    sb.append("]]></column-value></column>");
873                    sb.append(
874                            "<column><column-name>inReadInterval</column-name><column-value><![CDATA[");
875                    sb.append(getInReadInterval());
876                    sb.append("]]></column-value></column>");
877                    sb.append(
878                            "<column><column-name>outEmailAddress</column-name><column-value><![CDATA[");
879                    sb.append(getOutEmailAddress());
880                    sb.append("]]></column-value></column>");
881                    sb.append(
882                            "<column><column-name>outCustom</column-name><column-value><![CDATA[");
883                    sb.append(getOutCustom());
884                    sb.append("]]></column-value></column>");
885                    sb.append(
886                            "<column><column-name>outServerName</column-name><column-value><![CDATA[");
887                    sb.append(getOutServerName());
888                    sb.append("]]></column-value></column>");
889                    sb.append(
890                            "<column><column-name>outServerPort</column-name><column-value><![CDATA[");
891                    sb.append(getOutServerPort());
892                    sb.append("]]></column-value></column>");
893                    sb.append(
894                            "<column><column-name>outUseSSL</column-name><column-value><![CDATA[");
895                    sb.append(getOutUseSSL());
896                    sb.append("]]></column-value></column>");
897                    sb.append(
898                            "<column><column-name>outUserName</column-name><column-value><![CDATA[");
899                    sb.append(getOutUserName());
900                    sb.append("]]></column-value></column>");
901                    sb.append(
902                            "<column><column-name>outPassword</column-name><column-value><![CDATA[");
903                    sb.append(getOutPassword());
904                    sb.append("]]></column-value></column>");
905                    sb.append(
906                            "<column><column-name>allowAnonymous</column-name><column-value><![CDATA[");
907                    sb.append(getAllowAnonymous());
908                    sb.append("]]></column-value></column>");
909                    sb.append(
910                            "<column><column-name>active</column-name><column-value><![CDATA[");
911                    sb.append(getActive());
912                    sb.append("]]></column-value></column>");
913    
914                    sb.append("</model>");
915    
916                    return sb.toString();
917            }
918    
919            private static ClassLoader _classLoader = MBMailingList.class.getClassLoader();
920            private static Class<?>[] _escapedModelProxyInterfaces = new Class[] {
921                            MBMailingList.class
922                    };
923            private String _uuid;
924            private String _originalUuid;
925            private long _mailingListId;
926            private long _groupId;
927            private long _originalGroupId;
928            private boolean _setOriginalGroupId;
929            private long _companyId;
930            private long _userId;
931            private String _userUuid;
932            private String _userName;
933            private Date _createDate;
934            private Date _modifiedDate;
935            private long _categoryId;
936            private long _originalCategoryId;
937            private boolean _setOriginalCategoryId;
938            private String _emailAddress;
939            private String _inProtocol;
940            private String _inServerName;
941            private int _inServerPort;
942            private boolean _inUseSSL;
943            private String _inUserName;
944            private String _inPassword;
945            private int _inReadInterval;
946            private String _outEmailAddress;
947            private boolean _outCustom;
948            private String _outServerName;
949            private int _outServerPort;
950            private boolean _outUseSSL;
951            private String _outUserName;
952            private String _outPassword;
953            private boolean _allowAnonymous;
954            private boolean _active;
955            private boolean _originalActive;
956            private boolean _setOriginalActive;
957            private transient ExpandoBridge _expandoBridge;
958            private long _columnBitmask;
959            private MBMailingList _escapedModelProxy;
960    }