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