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