001
014
015 package com.liferay.portlet.announcements.model.impl;
016
017 import com.liferay.portal.kernel.bean.AutoEscapeBeanHandler;
018 import com.liferay.portal.kernel.exception.SystemException;
019 import com.liferay.portal.kernel.json.JSON;
020 import com.liferay.portal.kernel.util.DateUtil;
021 import com.liferay.portal.kernel.util.GetterUtil;
022 import com.liferay.portal.kernel.util.ProxyUtil;
023 import com.liferay.portal.kernel.util.StringBundler;
024 import com.liferay.portal.kernel.util.StringPool;
025 import com.liferay.portal.kernel.util.Validator;
026 import com.liferay.portal.model.CacheModel;
027 import com.liferay.portal.model.impl.BaseModelImpl;
028 import com.liferay.portal.service.ServiceContext;
029 import com.liferay.portal.util.PortalUtil;
030
031 import com.liferay.portlet.announcements.model.AnnouncementsEntry;
032 import com.liferay.portlet.announcements.model.AnnouncementsEntryModel;
033 import com.liferay.portlet.announcements.model.AnnouncementsEntrySoap;
034 import com.liferay.portlet.expando.model.ExpandoBridge;
035 import com.liferay.portlet.expando.util.ExpandoBridgeFactoryUtil;
036
037 import java.io.Serializable;
038
039 import java.sql.Types;
040
041 import java.util.ArrayList;
042 import java.util.Date;
043 import java.util.HashMap;
044 import java.util.List;
045 import java.util.Map;
046
047
060 @JSON(strict = true)
061 public class AnnouncementsEntryModelImpl extends BaseModelImpl<AnnouncementsEntry>
062 implements AnnouncementsEntryModel {
063
068 public static final String TABLE_NAME = "AnnouncementsEntry";
069 public static final Object[][] TABLE_COLUMNS = {
070 { "uuid_", Types.VARCHAR },
071 { "entryId", Types.BIGINT },
072 { "companyId", Types.BIGINT },
073 { "userId", Types.BIGINT },
074 { "userName", Types.VARCHAR },
075 { "createDate", Types.TIMESTAMP },
076 { "modifiedDate", Types.TIMESTAMP },
077 { "classNameId", Types.BIGINT },
078 { "classPK", Types.BIGINT },
079 { "title", Types.VARCHAR },
080 { "content", Types.VARCHAR },
081 { "url", Types.VARCHAR },
082 { "type_", Types.VARCHAR },
083 { "displayDate", Types.TIMESTAMP },
084 { "expirationDate", Types.TIMESTAMP },
085 { "priority", Types.INTEGER },
086 { "alert", Types.BOOLEAN }
087 };
088 public static final String TABLE_SQL_CREATE = "create table AnnouncementsEntry (uuid_ VARCHAR(75) null,entryId LONG not null primary key,companyId LONG,userId LONG,userName VARCHAR(75) null,createDate DATE null,modifiedDate DATE null,classNameId LONG,classPK LONG,title VARCHAR(75) null,content STRING null,url STRING null,type_ VARCHAR(75) null,displayDate DATE null,expirationDate DATE null,priority INTEGER,alert BOOLEAN)";
089 public static final String TABLE_SQL_DROP = "drop table AnnouncementsEntry";
090 public static final String ORDER_BY_JPQL = " ORDER BY announcementsEntry.priority ASC, announcementsEntry.modifiedDate ASC";
091 public static final String ORDER_BY_SQL = " ORDER BY AnnouncementsEntry.priority ASC, AnnouncementsEntry.modifiedDate ASC";
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.announcements.model.AnnouncementsEntry"),
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.announcements.model.AnnouncementsEntry"),
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.announcements.model.AnnouncementsEntry"),
103 true);
104 public static long ALERT_COLUMN_BITMASK = 1L;
105 public static long CLASSNAMEID_COLUMN_BITMASK = 2L;
106 public static long CLASSPK_COLUMN_BITMASK = 4L;
107 public static long USERID_COLUMN_BITMASK = 8L;
108 public static long UUID_COLUMN_BITMASK = 16L;
109
110
116 public static AnnouncementsEntry toModel(AnnouncementsEntrySoap soapModel) {
117 if (soapModel == null) {
118 return null;
119 }
120
121 AnnouncementsEntry model = new AnnouncementsEntryImpl();
122
123 model.setUuid(soapModel.getUuid());
124 model.setEntryId(soapModel.getEntryId());
125 model.setCompanyId(soapModel.getCompanyId());
126 model.setUserId(soapModel.getUserId());
127 model.setUserName(soapModel.getUserName());
128 model.setCreateDate(soapModel.getCreateDate());
129 model.setModifiedDate(soapModel.getModifiedDate());
130 model.setClassNameId(soapModel.getClassNameId());
131 model.setClassPK(soapModel.getClassPK());
132 model.setTitle(soapModel.getTitle());
133 model.setContent(soapModel.getContent());
134 model.setUrl(soapModel.getUrl());
135 model.setType(soapModel.getType());
136 model.setDisplayDate(soapModel.getDisplayDate());
137 model.setExpirationDate(soapModel.getExpirationDate());
138 model.setPriority(soapModel.getPriority());
139 model.setAlert(soapModel.getAlert());
140
141 return model;
142 }
143
144
150 public static List<AnnouncementsEntry> toModels(
151 AnnouncementsEntrySoap[] soapModels) {
152 if (soapModels == null) {
153 return null;
154 }
155
156 List<AnnouncementsEntry> models = new ArrayList<AnnouncementsEntry>(soapModels.length);
157
158 for (AnnouncementsEntrySoap soapModel : soapModels) {
159 models.add(toModel(soapModel));
160 }
161
162 return models;
163 }
164
165 public static final long LOCK_EXPIRATION_TIME = GetterUtil.getLong(com.liferay.portal.util.PropsUtil.get(
166 "lock.expiration.time.com.liferay.portlet.announcements.model.AnnouncementsEntry"));
167
168 public AnnouncementsEntryModelImpl() {
169 }
170
171 public long getPrimaryKey() {
172 return _entryId;
173 }
174
175 public void setPrimaryKey(long primaryKey) {
176 setEntryId(primaryKey);
177 }
178
179 public Serializable getPrimaryKeyObj() {
180 return new Long(_entryId);
181 }
182
183 public void setPrimaryKeyObj(Serializable primaryKeyObj) {
184 setPrimaryKey(((Long)primaryKeyObj).longValue());
185 }
186
187 public Class<?> getModelClass() {
188 return AnnouncementsEntry.class;
189 }
190
191 public String getModelClassName() {
192 return AnnouncementsEntry.class.getName();
193 }
194
195 @Override
196 public Map<String, Object> getModelAttributes() {
197 Map<String, Object> attributes = new HashMap<String, Object>();
198
199 attributes.put("uuid", getUuid());
200 attributes.put("entryId", getEntryId());
201 attributes.put("companyId", getCompanyId());
202 attributes.put("userId", getUserId());
203 attributes.put("userName", getUserName());
204 attributes.put("createDate", getCreateDate());
205 attributes.put("modifiedDate", getModifiedDate());
206 attributes.put("classNameId", getClassNameId());
207 attributes.put("classPK", getClassPK());
208 attributes.put("title", getTitle());
209 attributes.put("content", getContent());
210 attributes.put("url", getUrl());
211 attributes.put("type", getType());
212 attributes.put("displayDate", getDisplayDate());
213 attributes.put("expirationDate", getExpirationDate());
214 attributes.put("priority", getPriority());
215 attributes.put("alert", getAlert());
216
217 return attributes;
218 }
219
220 @Override
221 public void setModelAttributes(Map<String, Object> attributes) {
222 String uuid = (String)attributes.get("uuid");
223
224 if (uuid != null) {
225 setUuid(uuid);
226 }
227
228 Long entryId = (Long)attributes.get("entryId");
229
230 if (entryId != null) {
231 setEntryId(entryId);
232 }
233
234 Long companyId = (Long)attributes.get("companyId");
235
236 if (companyId != null) {
237 setCompanyId(companyId);
238 }
239
240 Long userId = (Long)attributes.get("userId");
241
242 if (userId != null) {
243 setUserId(userId);
244 }
245
246 String userName = (String)attributes.get("userName");
247
248 if (userName != null) {
249 setUserName(userName);
250 }
251
252 Date createDate = (Date)attributes.get("createDate");
253
254 if (createDate != null) {
255 setCreateDate(createDate);
256 }
257
258 Date modifiedDate = (Date)attributes.get("modifiedDate");
259
260 if (modifiedDate != null) {
261 setModifiedDate(modifiedDate);
262 }
263
264 Long classNameId = (Long)attributes.get("classNameId");
265
266 if (classNameId != null) {
267 setClassNameId(classNameId);
268 }
269
270 Long classPK = (Long)attributes.get("classPK");
271
272 if (classPK != null) {
273 setClassPK(classPK);
274 }
275
276 String title = (String)attributes.get("title");
277
278 if (title != null) {
279 setTitle(title);
280 }
281
282 String content = (String)attributes.get("content");
283
284 if (content != null) {
285 setContent(content);
286 }
287
288 String url = (String)attributes.get("url");
289
290 if (url != null) {
291 setUrl(url);
292 }
293
294 String type = (String)attributes.get("type");
295
296 if (type != null) {
297 setType(type);
298 }
299
300 Date displayDate = (Date)attributes.get("displayDate");
301
302 if (displayDate != null) {
303 setDisplayDate(displayDate);
304 }
305
306 Date expirationDate = (Date)attributes.get("expirationDate");
307
308 if (expirationDate != null) {
309 setExpirationDate(expirationDate);
310 }
311
312 Integer priority = (Integer)attributes.get("priority");
313
314 if (priority != null) {
315 setPriority(priority);
316 }
317
318 Boolean alert = (Boolean)attributes.get("alert");
319
320 if (alert != null) {
321 setAlert(alert);
322 }
323 }
324
325 @JSON
326 public String getUuid() {
327 if (_uuid == null) {
328 return StringPool.BLANK;
329 }
330 else {
331 return _uuid;
332 }
333 }
334
335 public void setUuid(String uuid) {
336 if (_originalUuid == null) {
337 _originalUuid = _uuid;
338 }
339
340 _uuid = uuid;
341 }
342
343 public String getOriginalUuid() {
344 return GetterUtil.getString(_originalUuid);
345 }
346
347 @JSON
348 public long getEntryId() {
349 return _entryId;
350 }
351
352 public void setEntryId(long entryId) {
353 _entryId = entryId;
354 }
355
356 @JSON
357 public long getCompanyId() {
358 return _companyId;
359 }
360
361 public void setCompanyId(long companyId) {
362 _companyId = companyId;
363 }
364
365 @JSON
366 public long getUserId() {
367 return _userId;
368 }
369
370 public void setUserId(long userId) {
371 _columnBitmask |= USERID_COLUMN_BITMASK;
372
373 if (!_setOriginalUserId) {
374 _setOriginalUserId = true;
375
376 _originalUserId = _userId;
377 }
378
379 _userId = userId;
380 }
381
382 public String getUserUuid() throws SystemException {
383 return PortalUtil.getUserValue(getUserId(), "uuid", _userUuid);
384 }
385
386 public void setUserUuid(String userUuid) {
387 _userUuid = userUuid;
388 }
389
390 public long getOriginalUserId() {
391 return _originalUserId;
392 }
393
394 @JSON
395 public String getUserName() {
396 if (_userName == null) {
397 return StringPool.BLANK;
398 }
399 else {
400 return _userName;
401 }
402 }
403
404 public void setUserName(String userName) {
405 _userName = userName;
406 }
407
408 @JSON
409 public Date getCreateDate() {
410 return _createDate;
411 }
412
413 public void setCreateDate(Date createDate) {
414 _createDate = createDate;
415 }
416
417 @JSON
418 public Date getModifiedDate() {
419 return _modifiedDate;
420 }
421
422 public void setModifiedDate(Date modifiedDate) {
423 _columnBitmask = -1L;
424
425 _modifiedDate = modifiedDate;
426 }
427
428 public String getClassName() {
429 if (getClassNameId() <= 0) {
430 return StringPool.BLANK;
431 }
432
433 return PortalUtil.getClassName(getClassNameId());
434 }
435
436 public void setClassName(String className) {
437 long classNameId = 0;
438
439 if (Validator.isNotNull(className)) {
440 classNameId = PortalUtil.getClassNameId(className);
441 }
442
443 setClassNameId(classNameId);
444 }
445
446 @JSON
447 public long getClassNameId() {
448 return _classNameId;
449 }
450
451 public void setClassNameId(long classNameId) {
452 _columnBitmask |= CLASSNAMEID_COLUMN_BITMASK;
453
454 if (!_setOriginalClassNameId) {
455 _setOriginalClassNameId = true;
456
457 _originalClassNameId = _classNameId;
458 }
459
460 _classNameId = classNameId;
461 }
462
463 public long getOriginalClassNameId() {
464 return _originalClassNameId;
465 }
466
467 @JSON
468 public long getClassPK() {
469 return _classPK;
470 }
471
472 public void setClassPK(long classPK) {
473 _columnBitmask |= CLASSPK_COLUMN_BITMASK;
474
475 if (!_setOriginalClassPK) {
476 _setOriginalClassPK = true;
477
478 _originalClassPK = _classPK;
479 }
480
481 _classPK = classPK;
482 }
483
484 public long getOriginalClassPK() {
485 return _originalClassPK;
486 }
487
488 @JSON
489 public String getTitle() {
490 if (_title == null) {
491 return StringPool.BLANK;
492 }
493 else {
494 return _title;
495 }
496 }
497
498 public void setTitle(String title) {
499 _title = title;
500 }
501
502 @JSON
503 public String getContent() {
504 if (_content == null) {
505 return StringPool.BLANK;
506 }
507 else {
508 return _content;
509 }
510 }
511
512 public void setContent(String content) {
513 _content = content;
514 }
515
516 @JSON
517 public String getUrl() {
518 if (_url == null) {
519 return StringPool.BLANK;
520 }
521 else {
522 return _url;
523 }
524 }
525
526 public void setUrl(String url) {
527 _url = url;
528 }
529
530 @JSON
531 public String getType() {
532 if (_type == null) {
533 return StringPool.BLANK;
534 }
535 else {
536 return _type;
537 }
538 }
539
540 public void setType(String type) {
541 _type = type;
542 }
543
544 @JSON
545 public Date getDisplayDate() {
546 return _displayDate;
547 }
548
549 public void setDisplayDate(Date displayDate) {
550 _displayDate = displayDate;
551 }
552
553 @JSON
554 public Date getExpirationDate() {
555 return _expirationDate;
556 }
557
558 public void setExpirationDate(Date expirationDate) {
559 _expirationDate = expirationDate;
560 }
561
562 @JSON
563 public int getPriority() {
564 return _priority;
565 }
566
567 public void setPriority(int priority) {
568 _columnBitmask = -1L;
569
570 _priority = priority;
571 }
572
573 @JSON
574 public boolean getAlert() {
575 return _alert;
576 }
577
578 public boolean isAlert() {
579 return _alert;
580 }
581
582 public void setAlert(boolean alert) {
583 _columnBitmask |= ALERT_COLUMN_BITMASK;
584
585 if (!_setOriginalAlert) {
586 _setOriginalAlert = true;
587
588 _originalAlert = _alert;
589 }
590
591 _alert = alert;
592 }
593
594 public boolean getOriginalAlert() {
595 return _originalAlert;
596 }
597
598 public long getColumnBitmask() {
599 return _columnBitmask;
600 }
601
602 @Override
603 public ExpandoBridge getExpandoBridge() {
604 return ExpandoBridgeFactoryUtil.getExpandoBridge(getCompanyId(),
605 AnnouncementsEntry.class.getName(), getPrimaryKey());
606 }
607
608 @Override
609 public void setExpandoBridgeAttributes(ServiceContext serviceContext) {
610 ExpandoBridge expandoBridge = getExpandoBridge();
611
612 expandoBridge.setAttributes(serviceContext);
613 }
614
615 @Override
616 public AnnouncementsEntry toEscapedModel() {
617 if (_escapedModel == null) {
618 _escapedModel = (AnnouncementsEntry)ProxyUtil.newProxyInstance(_classLoader,
619 _escapedModelInterfaces, new AutoEscapeBeanHandler(this));
620 }
621
622 return _escapedModel;
623 }
624
625 public AnnouncementsEntry toUnescapedModel() {
626 return (AnnouncementsEntry)this;
627 }
628
629 @Override
630 public Object clone() {
631 AnnouncementsEntryImpl announcementsEntryImpl = new AnnouncementsEntryImpl();
632
633 announcementsEntryImpl.setUuid(getUuid());
634 announcementsEntryImpl.setEntryId(getEntryId());
635 announcementsEntryImpl.setCompanyId(getCompanyId());
636 announcementsEntryImpl.setUserId(getUserId());
637 announcementsEntryImpl.setUserName(getUserName());
638 announcementsEntryImpl.setCreateDate(getCreateDate());
639 announcementsEntryImpl.setModifiedDate(getModifiedDate());
640 announcementsEntryImpl.setClassNameId(getClassNameId());
641 announcementsEntryImpl.setClassPK(getClassPK());
642 announcementsEntryImpl.setTitle(getTitle());
643 announcementsEntryImpl.setContent(getContent());
644 announcementsEntryImpl.setUrl(getUrl());
645 announcementsEntryImpl.setType(getType());
646 announcementsEntryImpl.setDisplayDate(getDisplayDate());
647 announcementsEntryImpl.setExpirationDate(getExpirationDate());
648 announcementsEntryImpl.setPriority(getPriority());
649 announcementsEntryImpl.setAlert(getAlert());
650
651 announcementsEntryImpl.resetOriginalValues();
652
653 return announcementsEntryImpl;
654 }
655
656 public int compareTo(AnnouncementsEntry announcementsEntry) {
657 int value = 0;
658
659 if (getPriority() < announcementsEntry.getPriority()) {
660 value = -1;
661 }
662 else if (getPriority() > announcementsEntry.getPriority()) {
663 value = 1;
664 }
665 else {
666 value = 0;
667 }
668
669 if (value != 0) {
670 return value;
671 }
672
673 value = DateUtil.compareTo(getModifiedDate(),
674 announcementsEntry.getModifiedDate());
675
676 if (value != 0) {
677 return value;
678 }
679
680 return 0;
681 }
682
683 @Override
684 public boolean equals(Object obj) {
685 if (this == obj) {
686 return true;
687 }
688
689 if (!(obj instanceof AnnouncementsEntry)) {
690 return false;
691 }
692
693 AnnouncementsEntry announcementsEntry = (AnnouncementsEntry)obj;
694
695 long primaryKey = announcementsEntry.getPrimaryKey();
696
697 if (getPrimaryKey() == primaryKey) {
698 return true;
699 }
700 else {
701 return false;
702 }
703 }
704
705 @Override
706 public int hashCode() {
707 return (int)getPrimaryKey();
708 }
709
710 @Override
711 public void resetOriginalValues() {
712 AnnouncementsEntryModelImpl announcementsEntryModelImpl = this;
713
714 announcementsEntryModelImpl._originalUuid = announcementsEntryModelImpl._uuid;
715
716 announcementsEntryModelImpl._originalUserId = announcementsEntryModelImpl._userId;
717
718 announcementsEntryModelImpl._setOriginalUserId = false;
719
720 announcementsEntryModelImpl._originalClassNameId = announcementsEntryModelImpl._classNameId;
721
722 announcementsEntryModelImpl._setOriginalClassNameId = false;
723
724 announcementsEntryModelImpl._originalClassPK = announcementsEntryModelImpl._classPK;
725
726 announcementsEntryModelImpl._setOriginalClassPK = false;
727
728 announcementsEntryModelImpl._originalAlert = announcementsEntryModelImpl._alert;
729
730 announcementsEntryModelImpl._setOriginalAlert = false;
731
732 announcementsEntryModelImpl._columnBitmask = 0;
733 }
734
735 @Override
736 public CacheModel<AnnouncementsEntry> toCacheModel() {
737 AnnouncementsEntryCacheModel announcementsEntryCacheModel = new AnnouncementsEntryCacheModel();
738
739 announcementsEntryCacheModel.uuid = getUuid();
740
741 String uuid = announcementsEntryCacheModel.uuid;
742
743 if ((uuid != null) && (uuid.length() == 0)) {
744 announcementsEntryCacheModel.uuid = null;
745 }
746
747 announcementsEntryCacheModel.entryId = getEntryId();
748
749 announcementsEntryCacheModel.companyId = getCompanyId();
750
751 announcementsEntryCacheModel.userId = getUserId();
752
753 announcementsEntryCacheModel.userName = getUserName();
754
755 String userName = announcementsEntryCacheModel.userName;
756
757 if ((userName != null) && (userName.length() == 0)) {
758 announcementsEntryCacheModel.userName = null;
759 }
760
761 Date createDate = getCreateDate();
762
763 if (createDate != null) {
764 announcementsEntryCacheModel.createDate = createDate.getTime();
765 }
766 else {
767 announcementsEntryCacheModel.createDate = Long.MIN_VALUE;
768 }
769
770 Date modifiedDate = getModifiedDate();
771
772 if (modifiedDate != null) {
773 announcementsEntryCacheModel.modifiedDate = modifiedDate.getTime();
774 }
775 else {
776 announcementsEntryCacheModel.modifiedDate = Long.MIN_VALUE;
777 }
778
779 announcementsEntryCacheModel.classNameId = getClassNameId();
780
781 announcementsEntryCacheModel.classPK = getClassPK();
782
783 announcementsEntryCacheModel.title = getTitle();
784
785 String title = announcementsEntryCacheModel.title;
786
787 if ((title != null) && (title.length() == 0)) {
788 announcementsEntryCacheModel.title = null;
789 }
790
791 announcementsEntryCacheModel.content = getContent();
792
793 String content = announcementsEntryCacheModel.content;
794
795 if ((content != null) && (content.length() == 0)) {
796 announcementsEntryCacheModel.content = null;
797 }
798
799 announcementsEntryCacheModel.url = getUrl();
800
801 String url = announcementsEntryCacheModel.url;
802
803 if ((url != null) && (url.length() == 0)) {
804 announcementsEntryCacheModel.url = null;
805 }
806
807 announcementsEntryCacheModel.type = getType();
808
809 String type = announcementsEntryCacheModel.type;
810
811 if ((type != null) && (type.length() == 0)) {
812 announcementsEntryCacheModel.type = null;
813 }
814
815 Date displayDate = getDisplayDate();
816
817 if (displayDate != null) {
818 announcementsEntryCacheModel.displayDate = displayDate.getTime();
819 }
820 else {
821 announcementsEntryCacheModel.displayDate = Long.MIN_VALUE;
822 }
823
824 Date expirationDate = getExpirationDate();
825
826 if (expirationDate != null) {
827 announcementsEntryCacheModel.expirationDate = expirationDate.getTime();
828 }
829 else {
830 announcementsEntryCacheModel.expirationDate = Long.MIN_VALUE;
831 }
832
833 announcementsEntryCacheModel.priority = getPriority();
834
835 announcementsEntryCacheModel.alert = getAlert();
836
837 return announcementsEntryCacheModel;
838 }
839
840 @Override
841 public String toString() {
842 StringBundler sb = new StringBundler(35);
843
844 sb.append("{uuid=");
845 sb.append(getUuid());
846 sb.append(", entryId=");
847 sb.append(getEntryId());
848 sb.append(", companyId=");
849 sb.append(getCompanyId());
850 sb.append(", userId=");
851 sb.append(getUserId());
852 sb.append(", userName=");
853 sb.append(getUserName());
854 sb.append(", createDate=");
855 sb.append(getCreateDate());
856 sb.append(", modifiedDate=");
857 sb.append(getModifiedDate());
858 sb.append(", classNameId=");
859 sb.append(getClassNameId());
860 sb.append(", classPK=");
861 sb.append(getClassPK());
862 sb.append(", title=");
863 sb.append(getTitle());
864 sb.append(", content=");
865 sb.append(getContent());
866 sb.append(", url=");
867 sb.append(getUrl());
868 sb.append(", type=");
869 sb.append(getType());
870 sb.append(", displayDate=");
871 sb.append(getDisplayDate());
872 sb.append(", expirationDate=");
873 sb.append(getExpirationDate());
874 sb.append(", priority=");
875 sb.append(getPriority());
876 sb.append(", alert=");
877 sb.append(getAlert());
878 sb.append("}");
879
880 return sb.toString();
881 }
882
883 public String toXmlString() {
884 StringBundler sb = new StringBundler(55);
885
886 sb.append("<model><model-name>");
887 sb.append("com.liferay.portlet.announcements.model.AnnouncementsEntry");
888 sb.append("</model-name>");
889
890 sb.append(
891 "<column><column-name>uuid</column-name><column-value><![CDATA[");
892 sb.append(getUuid());
893 sb.append("]]></column-value></column>");
894 sb.append(
895 "<column><column-name>entryId</column-name><column-value><![CDATA[");
896 sb.append(getEntryId());
897 sb.append("]]></column-value></column>");
898 sb.append(
899 "<column><column-name>companyId</column-name><column-value><![CDATA[");
900 sb.append(getCompanyId());
901 sb.append("]]></column-value></column>");
902 sb.append(
903 "<column><column-name>userId</column-name><column-value><![CDATA[");
904 sb.append(getUserId());
905 sb.append("]]></column-value></column>");
906 sb.append(
907 "<column><column-name>userName</column-name><column-value><![CDATA[");
908 sb.append(getUserName());
909 sb.append("]]></column-value></column>");
910 sb.append(
911 "<column><column-name>createDate</column-name><column-value><![CDATA[");
912 sb.append(getCreateDate());
913 sb.append("]]></column-value></column>");
914 sb.append(
915 "<column><column-name>modifiedDate</column-name><column-value><![CDATA[");
916 sb.append(getModifiedDate());
917 sb.append("]]></column-value></column>");
918 sb.append(
919 "<column><column-name>classNameId</column-name><column-value><![CDATA[");
920 sb.append(getClassNameId());
921 sb.append("]]></column-value></column>");
922 sb.append(
923 "<column><column-name>classPK</column-name><column-value><![CDATA[");
924 sb.append(getClassPK());
925 sb.append("]]></column-value></column>");
926 sb.append(
927 "<column><column-name>title</column-name><column-value><![CDATA[");
928 sb.append(getTitle());
929 sb.append("]]></column-value></column>");
930 sb.append(
931 "<column><column-name>content</column-name><column-value><![CDATA[");
932 sb.append(getContent());
933 sb.append("]]></column-value></column>");
934 sb.append(
935 "<column><column-name>url</column-name><column-value><![CDATA[");
936 sb.append(getUrl());
937 sb.append("]]></column-value></column>");
938 sb.append(
939 "<column><column-name>type</column-name><column-value><![CDATA[");
940 sb.append(getType());
941 sb.append("]]></column-value></column>");
942 sb.append(
943 "<column><column-name>displayDate</column-name><column-value><![CDATA[");
944 sb.append(getDisplayDate());
945 sb.append("]]></column-value></column>");
946 sb.append(
947 "<column><column-name>expirationDate</column-name><column-value><![CDATA[");
948 sb.append(getExpirationDate());
949 sb.append("]]></column-value></column>");
950 sb.append(
951 "<column><column-name>priority</column-name><column-value><![CDATA[");
952 sb.append(getPriority());
953 sb.append("]]></column-value></column>");
954 sb.append(
955 "<column><column-name>alert</column-name><column-value><![CDATA[");
956 sb.append(getAlert());
957 sb.append("]]></column-value></column>");
958
959 sb.append("</model>");
960
961 return sb.toString();
962 }
963
964 private static ClassLoader _classLoader = AnnouncementsEntry.class.getClassLoader();
965 private static Class<?>[] _escapedModelInterfaces = new Class[] {
966 AnnouncementsEntry.class
967 };
968 private String _uuid;
969 private String _originalUuid;
970 private long _entryId;
971 private long _companyId;
972 private long _userId;
973 private String _userUuid;
974 private long _originalUserId;
975 private boolean _setOriginalUserId;
976 private String _userName;
977 private Date _createDate;
978 private Date _modifiedDate;
979 private long _classNameId;
980 private long _originalClassNameId;
981 private boolean _setOriginalClassNameId;
982 private long _classPK;
983 private long _originalClassPK;
984 private boolean _setOriginalClassPK;
985 private String _title;
986 private String _content;
987 private String _url;
988 private String _type;
989 private Date _displayDate;
990 private Date _expirationDate;
991 private int _priority;
992 private boolean _alert;
993 private boolean _originalAlert;
994 private boolean _setOriginalAlert;
995 private long _columnBitmask;
996 private AnnouncementsEntry _escapedModel;
997 }