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