001
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 import java.util.HashMap;
039 import java.util.Map;
040
041
054 public class MBMailingListModelImpl extends BaseModelImpl<MBMailingList>
055 implements MBMailingListModel {
056
061 public static final String TABLE_NAME = "MBMailingList";
062 public static final Object[][] TABLE_COLUMNS = {
063 { "uuid_", Types.VARCHAR },
064 { "mailingListId", Types.BIGINT },
065 { "groupId", Types.BIGINT },
066 { "companyId", Types.BIGINT },
067 { "userId", Types.BIGINT },
068 { "userName", Types.VARCHAR },
069 { "createDate", Types.TIMESTAMP },
070 { "modifiedDate", Types.TIMESTAMP },
071 { "categoryId", Types.BIGINT },
072 { "emailAddress", Types.VARCHAR },
073 { "inProtocol", Types.VARCHAR },
074 { "inServerName", Types.VARCHAR },
075 { "inServerPort", Types.INTEGER },
076 { "inUseSSL", Types.BOOLEAN },
077 { "inUserName", Types.VARCHAR },
078 { "inPassword", Types.VARCHAR },
079 { "inReadInterval", Types.INTEGER },
080 { "outEmailAddress", Types.VARCHAR },
081 { "outCustom", Types.BOOLEAN },
082 { "outServerName", Types.VARCHAR },
083 { "outServerPort", Types.INTEGER },
084 { "outUseSSL", Types.BOOLEAN },
085 { "outUserName", Types.VARCHAR },
086 { "outPassword", Types.VARCHAR },
087 { "allowAnonymous", Types.BOOLEAN },
088 { "active_", Types.BOOLEAN }
089 };
090 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)";
091 public static final String TABLE_SQL_DROP = "drop table MBMailingList";
092 public static final String ORDER_BY_JPQL = " ORDER BY mbMailingList.mailingListId ASC";
093 public static final String ORDER_BY_SQL = " ORDER BY MBMailingList.mailingListId ASC";
094 public static final String DATA_SOURCE = "liferayDataSource";
095 public static final String SESSION_FACTORY = "liferaySessionFactory";
096 public static final String TX_MANAGER = "liferayTransactionManager";
097 public static final boolean ENTITY_CACHE_ENABLED = GetterUtil.getBoolean(com.liferay.portal.util.PropsUtil.get(
098 "value.object.entity.cache.enabled.com.liferay.portlet.messageboards.model.MBMailingList"),
099 true);
100 public static final boolean FINDER_CACHE_ENABLED = GetterUtil.getBoolean(com.liferay.portal.util.PropsUtil.get(
101 "value.object.finder.cache.enabled.com.liferay.portlet.messageboards.model.MBMailingList"),
102 true);
103 public static final boolean COLUMN_BITMASK_ENABLED = GetterUtil.getBoolean(com.liferay.portal.util.PropsUtil.get(
104 "value.object.column.bitmask.enabled.com.liferay.portlet.messageboards.model.MBMailingList"),
105 true);
106 public static long ACTIVE_COLUMN_BITMASK = 1L;
107 public static long CATEGORYID_COLUMN_BITMASK = 2L;
108 public static long COMPANYID_COLUMN_BITMASK = 4L;
109 public static long GROUPID_COLUMN_BITMASK = 8L;
110 public static long UUID_COLUMN_BITMASK = 16L;
111 public static long MAILINGLISTID_COLUMN_BITMASK = 32L;
112 public static final long LOCK_EXPIRATION_TIME = GetterUtil.getLong(com.liferay.portal.util.PropsUtil.get(
113 "lock.expiration.time.com.liferay.portlet.messageboards.model.MBMailingList"));
114
115 public MBMailingListModelImpl() {
116 }
117
118 public long getPrimaryKey() {
119 return _mailingListId;
120 }
121
122 public void setPrimaryKey(long primaryKey) {
123 setMailingListId(primaryKey);
124 }
125
126 public Serializable getPrimaryKeyObj() {
127 return _mailingListId;
128 }
129
130 public void setPrimaryKeyObj(Serializable primaryKeyObj) {
131 setPrimaryKey(((Long)primaryKeyObj).longValue());
132 }
133
134 public Class<?> getModelClass() {
135 return MBMailingList.class;
136 }
137
138 public String getModelClassName() {
139 return MBMailingList.class.getName();
140 }
141
142 @Override
143 public Map<String, Object> getModelAttributes() {
144 Map<String, Object> attributes = new HashMap<String, Object>();
145
146 attributes.put("uuid", getUuid());
147 attributes.put("mailingListId", getMailingListId());
148 attributes.put("groupId", getGroupId());
149 attributes.put("companyId", getCompanyId());
150 attributes.put("userId", getUserId());
151 attributes.put("userName", getUserName());
152 attributes.put("createDate", getCreateDate());
153 attributes.put("modifiedDate", getModifiedDate());
154 attributes.put("categoryId", getCategoryId());
155 attributes.put("emailAddress", getEmailAddress());
156 attributes.put("inProtocol", getInProtocol());
157 attributes.put("inServerName", getInServerName());
158 attributes.put("inServerPort", getInServerPort());
159 attributes.put("inUseSSL", getInUseSSL());
160 attributes.put("inUserName", getInUserName());
161 attributes.put("inPassword", getInPassword());
162 attributes.put("inReadInterval", getInReadInterval());
163 attributes.put("outEmailAddress", getOutEmailAddress());
164 attributes.put("outCustom", getOutCustom());
165 attributes.put("outServerName", getOutServerName());
166 attributes.put("outServerPort", getOutServerPort());
167 attributes.put("outUseSSL", getOutUseSSL());
168 attributes.put("outUserName", getOutUserName());
169 attributes.put("outPassword", getOutPassword());
170 attributes.put("allowAnonymous", getAllowAnonymous());
171 attributes.put("active", getActive());
172
173 return attributes;
174 }
175
176 @Override
177 public void setModelAttributes(Map<String, Object> attributes) {
178 String uuid = (String)attributes.get("uuid");
179
180 if (uuid != null) {
181 setUuid(uuid);
182 }
183
184 Long mailingListId = (Long)attributes.get("mailingListId");
185
186 if (mailingListId != null) {
187 setMailingListId(mailingListId);
188 }
189
190 Long groupId = (Long)attributes.get("groupId");
191
192 if (groupId != null) {
193 setGroupId(groupId);
194 }
195
196 Long companyId = (Long)attributes.get("companyId");
197
198 if (companyId != null) {
199 setCompanyId(companyId);
200 }
201
202 Long userId = (Long)attributes.get("userId");
203
204 if (userId != null) {
205 setUserId(userId);
206 }
207
208 String userName = (String)attributes.get("userName");
209
210 if (userName != null) {
211 setUserName(userName);
212 }
213
214 Date createDate = (Date)attributes.get("createDate");
215
216 if (createDate != null) {
217 setCreateDate(createDate);
218 }
219
220 Date modifiedDate = (Date)attributes.get("modifiedDate");
221
222 if (modifiedDate != null) {
223 setModifiedDate(modifiedDate);
224 }
225
226 Long categoryId = (Long)attributes.get("categoryId");
227
228 if (categoryId != null) {
229 setCategoryId(categoryId);
230 }
231
232 String emailAddress = (String)attributes.get("emailAddress");
233
234 if (emailAddress != null) {
235 setEmailAddress(emailAddress);
236 }
237
238 String inProtocol = (String)attributes.get("inProtocol");
239
240 if (inProtocol != null) {
241 setInProtocol(inProtocol);
242 }
243
244 String inServerName = (String)attributes.get("inServerName");
245
246 if (inServerName != null) {
247 setInServerName(inServerName);
248 }
249
250 Integer inServerPort = (Integer)attributes.get("inServerPort");
251
252 if (inServerPort != null) {
253 setInServerPort(inServerPort);
254 }
255
256 Boolean inUseSSL = (Boolean)attributes.get("inUseSSL");
257
258 if (inUseSSL != null) {
259 setInUseSSL(inUseSSL);
260 }
261
262 String inUserName = (String)attributes.get("inUserName");
263
264 if (inUserName != null) {
265 setInUserName(inUserName);
266 }
267
268 String inPassword = (String)attributes.get("inPassword");
269
270 if (inPassword != null) {
271 setInPassword(inPassword);
272 }
273
274 Integer inReadInterval = (Integer)attributes.get("inReadInterval");
275
276 if (inReadInterval != null) {
277 setInReadInterval(inReadInterval);
278 }
279
280 String outEmailAddress = (String)attributes.get("outEmailAddress");
281
282 if (outEmailAddress != null) {
283 setOutEmailAddress(outEmailAddress);
284 }
285
286 Boolean outCustom = (Boolean)attributes.get("outCustom");
287
288 if (outCustom != null) {
289 setOutCustom(outCustom);
290 }
291
292 String outServerName = (String)attributes.get("outServerName");
293
294 if (outServerName != null) {
295 setOutServerName(outServerName);
296 }
297
298 Integer outServerPort = (Integer)attributes.get("outServerPort");
299
300 if (outServerPort != null) {
301 setOutServerPort(outServerPort);
302 }
303
304 Boolean outUseSSL = (Boolean)attributes.get("outUseSSL");
305
306 if (outUseSSL != null) {
307 setOutUseSSL(outUseSSL);
308 }
309
310 String outUserName = (String)attributes.get("outUserName");
311
312 if (outUserName != null) {
313 setOutUserName(outUserName);
314 }
315
316 String outPassword = (String)attributes.get("outPassword");
317
318 if (outPassword != null) {
319 setOutPassword(outPassword);
320 }
321
322 Boolean allowAnonymous = (Boolean)attributes.get("allowAnonymous");
323
324 if (allowAnonymous != null) {
325 setAllowAnonymous(allowAnonymous);
326 }
327
328 Boolean active = (Boolean)attributes.get("active");
329
330 if (active != null) {
331 setActive(active);
332 }
333 }
334
335 public String getUuid() {
336 if (_uuid == null) {
337 return StringPool.BLANK;
338 }
339 else {
340 return _uuid;
341 }
342 }
343
344 public void setUuid(String uuid) {
345 if (_originalUuid == null) {
346 _originalUuid = _uuid;
347 }
348
349 _uuid = uuid;
350 }
351
352 public String getOriginalUuid() {
353 return GetterUtil.getString(_originalUuid);
354 }
355
356 public long getMailingListId() {
357 return _mailingListId;
358 }
359
360 public void setMailingListId(long mailingListId) {
361 _mailingListId = mailingListId;
362 }
363
364 public long getGroupId() {
365 return _groupId;
366 }
367
368 public void setGroupId(long groupId) {
369 _columnBitmask |= GROUPID_COLUMN_BITMASK;
370
371 if (!_setOriginalGroupId) {
372 _setOriginalGroupId = true;
373
374 _originalGroupId = _groupId;
375 }
376
377 _groupId = groupId;
378 }
379
380 public long getOriginalGroupId() {
381 return _originalGroupId;
382 }
383
384 public long getCompanyId() {
385 return _companyId;
386 }
387
388 public void setCompanyId(long companyId) {
389 _columnBitmask |= COMPANYID_COLUMN_BITMASK;
390
391 if (!_setOriginalCompanyId) {
392 _setOriginalCompanyId = true;
393
394 _originalCompanyId = _companyId;
395 }
396
397 _companyId = companyId;
398 }
399
400 public long getOriginalCompanyId() {
401 return _originalCompanyId;
402 }
403
404 public long getUserId() {
405 return _userId;
406 }
407
408 public void setUserId(long userId) {
409 _userId = userId;
410 }
411
412 public String getUserUuid() throws SystemException {
413 return PortalUtil.getUserValue(getUserId(), "uuid", _userUuid);
414 }
415
416 public void setUserUuid(String userUuid) {
417 _userUuid = userUuid;
418 }
419
420 public String getUserName() {
421 if (_userName == null) {
422 return StringPool.BLANK;
423 }
424 else {
425 return _userName;
426 }
427 }
428
429 public void setUserName(String userName) {
430 _userName = userName;
431 }
432
433 public Date getCreateDate() {
434 return _createDate;
435 }
436
437 public void setCreateDate(Date createDate) {
438 _createDate = createDate;
439 }
440
441 public Date getModifiedDate() {
442 return _modifiedDate;
443 }
444
445 public void setModifiedDate(Date modifiedDate) {
446 _modifiedDate = modifiedDate;
447 }
448
449 public long getCategoryId() {
450 return _categoryId;
451 }
452
453 public void setCategoryId(long categoryId) {
454 _columnBitmask |= CATEGORYID_COLUMN_BITMASK;
455
456 if (!_setOriginalCategoryId) {
457 _setOriginalCategoryId = true;
458
459 _originalCategoryId = _categoryId;
460 }
461
462 _categoryId = categoryId;
463 }
464
465 public long getOriginalCategoryId() {
466 return _originalCategoryId;
467 }
468
469 public String getEmailAddress() {
470 if (_emailAddress == null) {
471 return StringPool.BLANK;
472 }
473 else {
474 return _emailAddress;
475 }
476 }
477
478 public void setEmailAddress(String emailAddress) {
479 _emailAddress = emailAddress;
480 }
481
482 public String getInProtocol() {
483 if (_inProtocol == null) {
484 return StringPool.BLANK;
485 }
486 else {
487 return _inProtocol;
488 }
489 }
490
491 public void setInProtocol(String inProtocol) {
492 _inProtocol = inProtocol;
493 }
494
495 public String getInServerName() {
496 if (_inServerName == null) {
497 return StringPool.BLANK;
498 }
499 else {
500 return _inServerName;
501 }
502 }
503
504 public void setInServerName(String inServerName) {
505 _inServerName = inServerName;
506 }
507
508 public int getInServerPort() {
509 return _inServerPort;
510 }
511
512 public void setInServerPort(int inServerPort) {
513 _inServerPort = inServerPort;
514 }
515
516 public boolean getInUseSSL() {
517 return _inUseSSL;
518 }
519
520 public boolean isInUseSSL() {
521 return _inUseSSL;
522 }
523
524 public void setInUseSSL(boolean inUseSSL) {
525 _inUseSSL = inUseSSL;
526 }
527
528 public String getInUserName() {
529 if (_inUserName == null) {
530 return StringPool.BLANK;
531 }
532 else {
533 return _inUserName;
534 }
535 }
536
537 public void setInUserName(String inUserName) {
538 _inUserName = inUserName;
539 }
540
541 public String getInPassword() {
542 if (_inPassword == null) {
543 return StringPool.BLANK;
544 }
545 else {
546 return _inPassword;
547 }
548 }
549
550 public void setInPassword(String inPassword) {
551 _inPassword = inPassword;
552 }
553
554 public int getInReadInterval() {
555 return _inReadInterval;
556 }
557
558 public void setInReadInterval(int inReadInterval) {
559 _inReadInterval = inReadInterval;
560 }
561
562 public String getOutEmailAddress() {
563 if (_outEmailAddress == null) {
564 return StringPool.BLANK;
565 }
566 else {
567 return _outEmailAddress;
568 }
569 }
570
571 public void setOutEmailAddress(String outEmailAddress) {
572 _outEmailAddress = outEmailAddress;
573 }
574
575 public boolean getOutCustom() {
576 return _outCustom;
577 }
578
579 public boolean isOutCustom() {
580 return _outCustom;
581 }
582
583 public void setOutCustom(boolean outCustom) {
584 _outCustom = outCustom;
585 }
586
587 public String getOutServerName() {
588 if (_outServerName == null) {
589 return StringPool.BLANK;
590 }
591 else {
592 return _outServerName;
593 }
594 }
595
596 public void setOutServerName(String outServerName) {
597 _outServerName = outServerName;
598 }
599
600 public int getOutServerPort() {
601 return _outServerPort;
602 }
603
604 public void setOutServerPort(int outServerPort) {
605 _outServerPort = outServerPort;
606 }
607
608 public boolean getOutUseSSL() {
609 return _outUseSSL;
610 }
611
612 public boolean isOutUseSSL() {
613 return _outUseSSL;
614 }
615
616 public void setOutUseSSL(boolean outUseSSL) {
617 _outUseSSL = outUseSSL;
618 }
619
620 public String getOutUserName() {
621 if (_outUserName == null) {
622 return StringPool.BLANK;
623 }
624 else {
625 return _outUserName;
626 }
627 }
628
629 public void setOutUserName(String outUserName) {
630 _outUserName = outUserName;
631 }
632
633 public String getOutPassword() {
634 if (_outPassword == null) {
635 return StringPool.BLANK;
636 }
637 else {
638 return _outPassword;
639 }
640 }
641
642 public void setOutPassword(String outPassword) {
643 _outPassword = outPassword;
644 }
645
646 public boolean getAllowAnonymous() {
647 return _allowAnonymous;
648 }
649
650 public boolean isAllowAnonymous() {
651 return _allowAnonymous;
652 }
653
654 public void setAllowAnonymous(boolean allowAnonymous) {
655 _allowAnonymous = allowAnonymous;
656 }
657
658 public boolean getActive() {
659 return _active;
660 }
661
662 public boolean isActive() {
663 return _active;
664 }
665
666 public void setActive(boolean active) {
667 _columnBitmask |= ACTIVE_COLUMN_BITMASK;
668
669 if (!_setOriginalActive) {
670 _setOriginalActive = true;
671
672 _originalActive = _active;
673 }
674
675 _active = active;
676 }
677
678 public boolean getOriginalActive() {
679 return _originalActive;
680 }
681
682 public long getColumnBitmask() {
683 return _columnBitmask;
684 }
685
686 @Override
687 public ExpandoBridge getExpandoBridge() {
688 return ExpandoBridgeFactoryUtil.getExpandoBridge(getCompanyId(),
689 MBMailingList.class.getName(), getPrimaryKey());
690 }
691
692 @Override
693 public void setExpandoBridgeAttributes(ServiceContext serviceContext) {
694 ExpandoBridge expandoBridge = getExpandoBridge();
695
696 expandoBridge.setAttributes(serviceContext);
697 }
698
699 @Override
700 public MBMailingList toEscapedModel() {
701 if (_escapedModel == null) {
702 _escapedModel = (MBMailingList)ProxyUtil.newProxyInstance(_classLoader,
703 _escapedModelInterfaces, new AutoEscapeBeanHandler(this));
704 }
705
706 return _escapedModel;
707 }
708
709 @Override
710 public Object clone() {
711 MBMailingListImpl mbMailingListImpl = new MBMailingListImpl();
712
713 mbMailingListImpl.setUuid(getUuid());
714 mbMailingListImpl.setMailingListId(getMailingListId());
715 mbMailingListImpl.setGroupId(getGroupId());
716 mbMailingListImpl.setCompanyId(getCompanyId());
717 mbMailingListImpl.setUserId(getUserId());
718 mbMailingListImpl.setUserName(getUserName());
719 mbMailingListImpl.setCreateDate(getCreateDate());
720 mbMailingListImpl.setModifiedDate(getModifiedDate());
721 mbMailingListImpl.setCategoryId(getCategoryId());
722 mbMailingListImpl.setEmailAddress(getEmailAddress());
723 mbMailingListImpl.setInProtocol(getInProtocol());
724 mbMailingListImpl.setInServerName(getInServerName());
725 mbMailingListImpl.setInServerPort(getInServerPort());
726 mbMailingListImpl.setInUseSSL(getInUseSSL());
727 mbMailingListImpl.setInUserName(getInUserName());
728 mbMailingListImpl.setInPassword(getInPassword());
729 mbMailingListImpl.setInReadInterval(getInReadInterval());
730 mbMailingListImpl.setOutEmailAddress(getOutEmailAddress());
731 mbMailingListImpl.setOutCustom(getOutCustom());
732 mbMailingListImpl.setOutServerName(getOutServerName());
733 mbMailingListImpl.setOutServerPort(getOutServerPort());
734 mbMailingListImpl.setOutUseSSL(getOutUseSSL());
735 mbMailingListImpl.setOutUserName(getOutUserName());
736 mbMailingListImpl.setOutPassword(getOutPassword());
737 mbMailingListImpl.setAllowAnonymous(getAllowAnonymous());
738 mbMailingListImpl.setActive(getActive());
739
740 mbMailingListImpl.resetOriginalValues();
741
742 return mbMailingListImpl;
743 }
744
745 public int compareTo(MBMailingList mbMailingList) {
746 long primaryKey = mbMailingList.getPrimaryKey();
747
748 if (getPrimaryKey() < primaryKey) {
749 return -1;
750 }
751 else if (getPrimaryKey() > primaryKey) {
752 return 1;
753 }
754 else {
755 return 0;
756 }
757 }
758
759 @Override
760 public boolean equals(Object obj) {
761 if (obj == null) {
762 return false;
763 }
764
765 MBMailingList mbMailingList = null;
766
767 try {
768 mbMailingList = (MBMailingList)obj;
769 }
770 catch (ClassCastException cce) {
771 return false;
772 }
773
774 long primaryKey = mbMailingList.getPrimaryKey();
775
776 if (getPrimaryKey() == primaryKey) {
777 return true;
778 }
779 else {
780 return false;
781 }
782 }
783
784 @Override
785 public int hashCode() {
786 return (int)getPrimaryKey();
787 }
788
789 @Override
790 public void resetOriginalValues() {
791 MBMailingListModelImpl mbMailingListModelImpl = this;
792
793 mbMailingListModelImpl._originalUuid = mbMailingListModelImpl._uuid;
794
795 mbMailingListModelImpl._originalGroupId = mbMailingListModelImpl._groupId;
796
797 mbMailingListModelImpl._setOriginalGroupId = false;
798
799 mbMailingListModelImpl._originalCompanyId = mbMailingListModelImpl._companyId;
800
801 mbMailingListModelImpl._setOriginalCompanyId = false;
802
803 mbMailingListModelImpl._originalCategoryId = mbMailingListModelImpl._categoryId;
804
805 mbMailingListModelImpl._setOriginalCategoryId = false;
806
807 mbMailingListModelImpl._originalActive = mbMailingListModelImpl._active;
808
809 mbMailingListModelImpl._setOriginalActive = false;
810
811 mbMailingListModelImpl._columnBitmask = 0;
812 }
813
814 @Override
815 public CacheModel<MBMailingList> toCacheModel() {
816 MBMailingListCacheModel mbMailingListCacheModel = new MBMailingListCacheModel();
817
818 mbMailingListCacheModel.uuid = getUuid();
819
820 String uuid = mbMailingListCacheModel.uuid;
821
822 if ((uuid != null) && (uuid.length() == 0)) {
823 mbMailingListCacheModel.uuid = null;
824 }
825
826 mbMailingListCacheModel.mailingListId = getMailingListId();
827
828 mbMailingListCacheModel.groupId = getGroupId();
829
830 mbMailingListCacheModel.companyId = getCompanyId();
831
832 mbMailingListCacheModel.userId = getUserId();
833
834 mbMailingListCacheModel.userName = getUserName();
835
836 String userName = mbMailingListCacheModel.userName;
837
838 if ((userName != null) && (userName.length() == 0)) {
839 mbMailingListCacheModel.userName = null;
840 }
841
842 Date createDate = getCreateDate();
843
844 if (createDate != null) {
845 mbMailingListCacheModel.createDate = createDate.getTime();
846 }
847 else {
848 mbMailingListCacheModel.createDate = Long.MIN_VALUE;
849 }
850
851 Date modifiedDate = getModifiedDate();
852
853 if (modifiedDate != null) {
854 mbMailingListCacheModel.modifiedDate = modifiedDate.getTime();
855 }
856 else {
857 mbMailingListCacheModel.modifiedDate = Long.MIN_VALUE;
858 }
859
860 mbMailingListCacheModel.categoryId = getCategoryId();
861
862 mbMailingListCacheModel.emailAddress = getEmailAddress();
863
864 String emailAddress = mbMailingListCacheModel.emailAddress;
865
866 if ((emailAddress != null) && (emailAddress.length() == 0)) {
867 mbMailingListCacheModel.emailAddress = null;
868 }
869
870 mbMailingListCacheModel.inProtocol = getInProtocol();
871
872 String inProtocol = mbMailingListCacheModel.inProtocol;
873
874 if ((inProtocol != null) && (inProtocol.length() == 0)) {
875 mbMailingListCacheModel.inProtocol = null;
876 }
877
878 mbMailingListCacheModel.inServerName = getInServerName();
879
880 String inServerName = mbMailingListCacheModel.inServerName;
881
882 if ((inServerName != null) && (inServerName.length() == 0)) {
883 mbMailingListCacheModel.inServerName = null;
884 }
885
886 mbMailingListCacheModel.inServerPort = getInServerPort();
887
888 mbMailingListCacheModel.inUseSSL = getInUseSSL();
889
890 mbMailingListCacheModel.inUserName = getInUserName();
891
892 String inUserName = mbMailingListCacheModel.inUserName;
893
894 if ((inUserName != null) && (inUserName.length() == 0)) {
895 mbMailingListCacheModel.inUserName = null;
896 }
897
898 mbMailingListCacheModel.inPassword = getInPassword();
899
900 String inPassword = mbMailingListCacheModel.inPassword;
901
902 if ((inPassword != null) && (inPassword.length() == 0)) {
903 mbMailingListCacheModel.inPassword = null;
904 }
905
906 mbMailingListCacheModel.inReadInterval = getInReadInterval();
907
908 mbMailingListCacheModel.outEmailAddress = getOutEmailAddress();
909
910 String outEmailAddress = mbMailingListCacheModel.outEmailAddress;
911
912 if ((outEmailAddress != null) && (outEmailAddress.length() == 0)) {
913 mbMailingListCacheModel.outEmailAddress = null;
914 }
915
916 mbMailingListCacheModel.outCustom = getOutCustom();
917
918 mbMailingListCacheModel.outServerName = getOutServerName();
919
920 String outServerName = mbMailingListCacheModel.outServerName;
921
922 if ((outServerName != null) && (outServerName.length() == 0)) {
923 mbMailingListCacheModel.outServerName = null;
924 }
925
926 mbMailingListCacheModel.outServerPort = getOutServerPort();
927
928 mbMailingListCacheModel.outUseSSL = getOutUseSSL();
929
930 mbMailingListCacheModel.outUserName = getOutUserName();
931
932 String outUserName = mbMailingListCacheModel.outUserName;
933
934 if ((outUserName != null) && (outUserName.length() == 0)) {
935 mbMailingListCacheModel.outUserName = null;
936 }
937
938 mbMailingListCacheModel.outPassword = getOutPassword();
939
940 String outPassword = mbMailingListCacheModel.outPassword;
941
942 if ((outPassword != null) && (outPassword.length() == 0)) {
943 mbMailingListCacheModel.outPassword = null;
944 }
945
946 mbMailingListCacheModel.allowAnonymous = getAllowAnonymous();
947
948 mbMailingListCacheModel.active = getActive();
949
950 return mbMailingListCacheModel;
951 }
952
953 @Override
954 public String toString() {
955 StringBundler sb = new StringBundler(53);
956
957 sb.append("{uuid=");
958 sb.append(getUuid());
959 sb.append(", mailingListId=");
960 sb.append(getMailingListId());
961 sb.append(", groupId=");
962 sb.append(getGroupId());
963 sb.append(", companyId=");
964 sb.append(getCompanyId());
965 sb.append(", userId=");
966 sb.append(getUserId());
967 sb.append(", userName=");
968 sb.append(getUserName());
969 sb.append(", createDate=");
970 sb.append(getCreateDate());
971 sb.append(", modifiedDate=");
972 sb.append(getModifiedDate());
973 sb.append(", categoryId=");
974 sb.append(getCategoryId());
975 sb.append(", emailAddress=");
976 sb.append(getEmailAddress());
977 sb.append(", inProtocol=");
978 sb.append(getInProtocol());
979 sb.append(", inServerName=");
980 sb.append(getInServerName());
981 sb.append(", inServerPort=");
982 sb.append(getInServerPort());
983 sb.append(", inUseSSL=");
984 sb.append(getInUseSSL());
985 sb.append(", inUserName=");
986 sb.append(getInUserName());
987 sb.append(", inPassword=");
988 sb.append(getInPassword());
989 sb.append(", inReadInterval=");
990 sb.append(getInReadInterval());
991 sb.append(", outEmailAddress=");
992 sb.append(getOutEmailAddress());
993 sb.append(", outCustom=");
994 sb.append(getOutCustom());
995 sb.append(", outServerName=");
996 sb.append(getOutServerName());
997 sb.append(", outServerPort=");
998 sb.append(getOutServerPort());
999 sb.append(", outUseSSL=");
1000 sb.append(getOutUseSSL());
1001 sb.append(", outUserName=");
1002 sb.append(getOutUserName());
1003 sb.append(", outPassword=");
1004 sb.append(getOutPassword());
1005 sb.append(", allowAnonymous=");
1006 sb.append(getAllowAnonymous());
1007 sb.append(", active=");
1008 sb.append(getActive());
1009 sb.append("}");
1010
1011 return sb.toString();
1012 }
1013
1014 public String toXmlString() {
1015 StringBundler sb = new StringBundler(82);
1016
1017 sb.append("<model><model-name>");
1018 sb.append("com.liferay.portlet.messageboards.model.MBMailingList");
1019 sb.append("</model-name>");
1020
1021 sb.append(
1022 "<column><column-name>uuid</column-name><column-value><![CDATA[");
1023 sb.append(getUuid());
1024 sb.append("]]></column-value></column>");
1025 sb.append(
1026 "<column><column-name>mailingListId</column-name><column-value><![CDATA[");
1027 sb.append(getMailingListId());
1028 sb.append("]]></column-value></column>");
1029 sb.append(
1030 "<column><column-name>groupId</column-name><column-value><![CDATA[");
1031 sb.append(getGroupId());
1032 sb.append("]]></column-value></column>");
1033 sb.append(
1034 "<column><column-name>companyId</column-name><column-value><![CDATA[");
1035 sb.append(getCompanyId());
1036 sb.append("]]></column-value></column>");
1037 sb.append(
1038 "<column><column-name>userId</column-name><column-value><![CDATA[");
1039 sb.append(getUserId());
1040 sb.append("]]></column-value></column>");
1041 sb.append(
1042 "<column><column-name>userName</column-name><column-value><![CDATA[");
1043 sb.append(getUserName());
1044 sb.append("]]></column-value></column>");
1045 sb.append(
1046 "<column><column-name>createDate</column-name><column-value><![CDATA[");
1047 sb.append(getCreateDate());
1048 sb.append("]]></column-value></column>");
1049 sb.append(
1050 "<column><column-name>modifiedDate</column-name><column-value><![CDATA[");
1051 sb.append(getModifiedDate());
1052 sb.append("]]></column-value></column>");
1053 sb.append(
1054 "<column><column-name>categoryId</column-name><column-value><![CDATA[");
1055 sb.append(getCategoryId());
1056 sb.append("]]></column-value></column>");
1057 sb.append(
1058 "<column><column-name>emailAddress</column-name><column-value><![CDATA[");
1059 sb.append(getEmailAddress());
1060 sb.append("]]></column-value></column>");
1061 sb.append(
1062 "<column><column-name>inProtocol</column-name><column-value><![CDATA[");
1063 sb.append(getInProtocol());
1064 sb.append("]]></column-value></column>");
1065 sb.append(
1066 "<column><column-name>inServerName</column-name><column-value><![CDATA[");
1067 sb.append(getInServerName());
1068 sb.append("]]></column-value></column>");
1069 sb.append(
1070 "<column><column-name>inServerPort</column-name><column-value><![CDATA[");
1071 sb.append(getInServerPort());
1072 sb.append("]]></column-value></column>");
1073 sb.append(
1074 "<column><column-name>inUseSSL</column-name><column-value><![CDATA[");
1075 sb.append(getInUseSSL());
1076 sb.append("]]></column-value></column>");
1077 sb.append(
1078 "<column><column-name>inUserName</column-name><column-value><![CDATA[");
1079 sb.append(getInUserName());
1080 sb.append("]]></column-value></column>");
1081 sb.append(
1082 "<column><column-name>inPassword</column-name><column-value><![CDATA[");
1083 sb.append(getInPassword());
1084 sb.append("]]></column-value></column>");
1085 sb.append(
1086 "<column><column-name>inReadInterval</column-name><column-value><![CDATA[");
1087 sb.append(getInReadInterval());
1088 sb.append("]]></column-value></column>");
1089 sb.append(
1090 "<column><column-name>outEmailAddress</column-name><column-value><![CDATA[");
1091 sb.append(getOutEmailAddress());
1092 sb.append("]]></column-value></column>");
1093 sb.append(
1094 "<column><column-name>outCustom</column-name><column-value><![CDATA[");
1095 sb.append(getOutCustom());
1096 sb.append("]]></column-value></column>");
1097 sb.append(
1098 "<column><column-name>outServerName</column-name><column-value><![CDATA[");
1099 sb.append(getOutServerName());
1100 sb.append("]]></column-value></column>");
1101 sb.append(
1102 "<column><column-name>outServerPort</column-name><column-value><![CDATA[");
1103 sb.append(getOutServerPort());
1104 sb.append("]]></column-value></column>");
1105 sb.append(
1106 "<column><column-name>outUseSSL</column-name><column-value><![CDATA[");
1107 sb.append(getOutUseSSL());
1108 sb.append("]]></column-value></column>");
1109 sb.append(
1110 "<column><column-name>outUserName</column-name><column-value><![CDATA[");
1111 sb.append(getOutUserName());
1112 sb.append("]]></column-value></column>");
1113 sb.append(
1114 "<column><column-name>outPassword</column-name><column-value><![CDATA[");
1115 sb.append(getOutPassword());
1116 sb.append("]]></column-value></column>");
1117 sb.append(
1118 "<column><column-name>allowAnonymous</column-name><column-value><![CDATA[");
1119 sb.append(getAllowAnonymous());
1120 sb.append("]]></column-value></column>");
1121 sb.append(
1122 "<column><column-name>active</column-name><column-value><![CDATA[");
1123 sb.append(getActive());
1124 sb.append("]]></column-value></column>");
1125
1126 sb.append("</model>");
1127
1128 return sb.toString();
1129 }
1130
1131 private static ClassLoader _classLoader = MBMailingList.class.getClassLoader();
1132 private static Class<?>[] _escapedModelInterfaces = new Class[] {
1133 MBMailingList.class
1134 };
1135 private String _uuid;
1136 private String _originalUuid;
1137 private long _mailingListId;
1138 private long _groupId;
1139 private long _originalGroupId;
1140 private boolean _setOriginalGroupId;
1141 private long _companyId;
1142 private long _originalCompanyId;
1143 private boolean _setOriginalCompanyId;
1144 private long _userId;
1145 private String _userUuid;
1146 private String _userName;
1147 private Date _createDate;
1148 private Date _modifiedDate;
1149 private long _categoryId;
1150 private long _originalCategoryId;
1151 private boolean _setOriginalCategoryId;
1152 private String _emailAddress;
1153 private String _inProtocol;
1154 private String _inServerName;
1155 private int _inServerPort;
1156 private boolean _inUseSSL;
1157 private String _inUserName;
1158 private String _inPassword;
1159 private int _inReadInterval;
1160 private String _outEmailAddress;
1161 private boolean _outCustom;
1162 private String _outServerName;
1163 private int _outServerPort;
1164 private boolean _outUseSSL;
1165 private String _outUserName;
1166 private String _outPassword;
1167 private boolean _allowAnonymous;
1168 private boolean _active;
1169 private boolean _originalActive;
1170 private boolean _setOriginalActive;
1171 private long _columnBitmask;
1172 private MBMailingList _escapedModel;
1173 }