001
014
015 package com.liferay.portlet.asset.model.impl;
016
017 import aQute.bnd.annotation.ProviderType;
018
019 import com.liferay.portal.LocaleException;
020 import com.liferay.portal.kernel.bean.AutoEscapeBeanHandler;
021 import com.liferay.portal.kernel.exception.PortalException;
022 import com.liferay.portal.kernel.json.JSON;
023 import com.liferay.portal.kernel.util.GetterUtil;
024 import com.liferay.portal.kernel.util.LocaleUtil;
025 import com.liferay.portal.kernel.util.LocalizationUtil;
026 import com.liferay.portal.kernel.util.ProxyUtil;
027 import com.liferay.portal.kernel.util.StringBundler;
028 import com.liferay.portal.kernel.util.StringPool;
029 import com.liferay.portal.kernel.util.Validator;
030 import com.liferay.portal.model.CacheModel;
031 import com.liferay.portal.model.User;
032 import com.liferay.portal.model.impl.BaseModelImpl;
033 import com.liferay.portal.service.ServiceContext;
034 import com.liferay.portal.service.UserLocalServiceUtil;
035 import com.liferay.portal.util.PortalUtil;
036
037 import com.liferay.portlet.asset.model.AssetEntry;
038 import com.liferay.portlet.asset.model.AssetEntryModel;
039 import com.liferay.portlet.asset.model.AssetEntrySoap;
040 import com.liferay.portlet.expando.model.ExpandoBridge;
041 import com.liferay.portlet.expando.util.ExpandoBridgeFactoryUtil;
042
043 import java.io.Serializable;
044
045 import java.sql.Types;
046
047 import java.util.ArrayList;
048 import java.util.Date;
049 import java.util.HashMap;
050 import java.util.List;
051 import java.util.Locale;
052 import java.util.Map;
053 import java.util.Set;
054 import java.util.TreeSet;
055
056
069 @JSON(strict = true)
070 @ProviderType
071 public class AssetEntryModelImpl extends BaseModelImpl<AssetEntry>
072 implements AssetEntryModel {
073
078 public static final String TABLE_NAME = "AssetEntry";
079 public static final Object[][] TABLE_COLUMNS = {
080 { "entryId", Types.BIGINT },
081 { "groupId", Types.BIGINT },
082 { "companyId", Types.BIGINT },
083 { "userId", Types.BIGINT },
084 { "userName", Types.VARCHAR },
085 { "createDate", Types.TIMESTAMP },
086 { "modifiedDate", Types.TIMESTAMP },
087 { "classNameId", Types.BIGINT },
088 { "classPK", Types.BIGINT },
089 { "classUuid", Types.VARCHAR },
090 { "classTypeId", Types.BIGINT },
091 { "listable", Types.BOOLEAN },
092 { "visible", Types.BOOLEAN },
093 { "startDate", Types.TIMESTAMP },
094 { "endDate", Types.TIMESTAMP },
095 { "publishDate", Types.TIMESTAMP },
096 { "expirationDate", Types.TIMESTAMP },
097 { "mimeType", Types.VARCHAR },
098 { "title", Types.VARCHAR },
099 { "description", Types.CLOB },
100 { "summary", Types.CLOB },
101 { "url", Types.VARCHAR },
102 { "layoutUuid", Types.VARCHAR },
103 { "height", Types.INTEGER },
104 { "width", Types.INTEGER },
105 { "priority", Types.DOUBLE },
106 { "viewCount", Types.INTEGER }
107 };
108 public static final String TABLE_SQL_CREATE = "create table AssetEntry (entryId LONG not null primary key,groupId LONG,companyId LONG,userId LONG,userName VARCHAR(75) null,createDate DATE null,modifiedDate DATE null,classNameId LONG,classPK LONG,classUuid VARCHAR(75) null,classTypeId LONG,listable BOOLEAN,visible BOOLEAN,startDate DATE null,endDate DATE null,publishDate DATE null,expirationDate DATE null,mimeType VARCHAR(75) null,title STRING null,description TEXT null,summary TEXT null,url STRING null,layoutUuid VARCHAR(75) null,height INTEGER,width INTEGER,priority DOUBLE,viewCount INTEGER)";
109 public static final String TABLE_SQL_DROP = "drop table AssetEntry";
110 public static final String ORDER_BY_JPQL = " ORDER BY assetEntry.entryId ASC";
111 public static final String ORDER_BY_SQL = " ORDER BY AssetEntry.entryId ASC";
112 public static final String DATA_SOURCE = "liferayDataSource";
113 public static final String SESSION_FACTORY = "liferaySessionFactory";
114 public static final String TX_MANAGER = "liferayTransactionManager";
115 public static final boolean ENTITY_CACHE_ENABLED = GetterUtil.getBoolean(com.liferay.portal.util.PropsUtil.get(
116 "value.object.entity.cache.enabled.com.liferay.portlet.asset.model.AssetEntry"),
117 true);
118 public static final boolean FINDER_CACHE_ENABLED = GetterUtil.getBoolean(com.liferay.portal.util.PropsUtil.get(
119 "value.object.finder.cache.enabled.com.liferay.portlet.asset.model.AssetEntry"),
120 true);
121 public static final boolean COLUMN_BITMASK_ENABLED = GetterUtil.getBoolean(com.liferay.portal.util.PropsUtil.get(
122 "value.object.column.bitmask.enabled.com.liferay.portlet.asset.model.AssetEntry"),
123 true);
124 public static final long CLASSNAMEID_COLUMN_BITMASK = 1L;
125 public static final long CLASSPK_COLUMN_BITMASK = 2L;
126 public static final long CLASSUUID_COLUMN_BITMASK = 4L;
127 public static final long COMPANYID_COLUMN_BITMASK = 8L;
128 public static final long EXPIRATIONDATE_COLUMN_BITMASK = 16L;
129 public static final long GROUPID_COLUMN_BITMASK = 32L;
130 public static final long LAYOUTUUID_COLUMN_BITMASK = 64L;
131 public static final long PUBLISHDATE_COLUMN_BITMASK = 128L;
132 public static final long VISIBLE_COLUMN_BITMASK = 256L;
133 public static final long ENTRYID_COLUMN_BITMASK = 512L;
134
135
141 public static AssetEntry toModel(AssetEntrySoap soapModel) {
142 if (soapModel == null) {
143 return null;
144 }
145
146 AssetEntry model = new AssetEntryImpl();
147
148 model.setEntryId(soapModel.getEntryId());
149 model.setGroupId(soapModel.getGroupId());
150 model.setCompanyId(soapModel.getCompanyId());
151 model.setUserId(soapModel.getUserId());
152 model.setUserName(soapModel.getUserName());
153 model.setCreateDate(soapModel.getCreateDate());
154 model.setModifiedDate(soapModel.getModifiedDate());
155 model.setClassNameId(soapModel.getClassNameId());
156 model.setClassPK(soapModel.getClassPK());
157 model.setClassUuid(soapModel.getClassUuid());
158 model.setClassTypeId(soapModel.getClassTypeId());
159 model.setListable(soapModel.getListable());
160 model.setVisible(soapModel.getVisible());
161 model.setStartDate(soapModel.getStartDate());
162 model.setEndDate(soapModel.getEndDate());
163 model.setPublishDate(soapModel.getPublishDate());
164 model.setExpirationDate(soapModel.getExpirationDate());
165 model.setMimeType(soapModel.getMimeType());
166 model.setTitle(soapModel.getTitle());
167 model.setDescription(soapModel.getDescription());
168 model.setSummary(soapModel.getSummary());
169 model.setUrl(soapModel.getUrl());
170 model.setLayoutUuid(soapModel.getLayoutUuid());
171 model.setHeight(soapModel.getHeight());
172 model.setWidth(soapModel.getWidth());
173 model.setPriority(soapModel.getPriority());
174 model.setViewCount(soapModel.getViewCount());
175
176 return model;
177 }
178
179
185 public static List<AssetEntry> toModels(AssetEntrySoap[] soapModels) {
186 if (soapModels == null) {
187 return null;
188 }
189
190 List<AssetEntry> models = new ArrayList<AssetEntry>(soapModels.length);
191
192 for (AssetEntrySoap soapModel : soapModels) {
193 models.add(toModel(soapModel));
194 }
195
196 return models;
197 }
198
199 public static final String MAPPING_TABLE_ASSETENTRIES_ASSETCATEGORIES_NAME = "AssetEntries_AssetCategories";
200 public static final Object[][] MAPPING_TABLE_ASSETENTRIES_ASSETCATEGORIES_COLUMNS =
201 {
202 { "categoryId", Types.BIGINT },
203 { "entryId", Types.BIGINT }
204 };
205 public static final String MAPPING_TABLE_ASSETENTRIES_ASSETCATEGORIES_SQL_CREATE =
206 "create table AssetEntries_AssetCategories (categoryId LONG not null,entryId LONG not null,primary key (categoryId, entryId))";
207 public static final boolean FINDER_CACHE_ENABLED_ASSETENTRIES_ASSETCATEGORIES =
208 GetterUtil.getBoolean(com.liferay.portal.util.PropsUtil.get(
209 "value.object.finder.cache.enabled.AssetEntries_AssetCategories"),
210 true);
211 public static final String MAPPING_TABLE_ASSETENTRIES_ASSETTAGS_NAME = "AssetEntries_AssetTags";
212 public static final Object[][] MAPPING_TABLE_ASSETENTRIES_ASSETTAGS_COLUMNS = {
213 { "entryId", Types.BIGINT },
214 { "tagId", Types.BIGINT }
215 };
216 public static final String MAPPING_TABLE_ASSETENTRIES_ASSETTAGS_SQL_CREATE = "create table AssetEntries_AssetTags (entryId LONG not null,tagId LONG not null,primary key (entryId, tagId))";
217 public static final boolean FINDER_CACHE_ENABLED_ASSETENTRIES_ASSETTAGS = GetterUtil.getBoolean(com.liferay.portal.util.PropsUtil.get(
218 "value.object.finder.cache.enabled.AssetEntries_AssetTags"),
219 true);
220 public static final long LOCK_EXPIRATION_TIME = GetterUtil.getLong(com.liferay.portal.util.PropsUtil.get(
221 "lock.expiration.time.com.liferay.portlet.asset.model.AssetEntry"));
222
223 public AssetEntryModelImpl() {
224 }
225
226 @Override
227 public long getPrimaryKey() {
228 return _entryId;
229 }
230
231 @Override
232 public void setPrimaryKey(long primaryKey) {
233 setEntryId(primaryKey);
234 }
235
236 @Override
237 public Serializable getPrimaryKeyObj() {
238 return _entryId;
239 }
240
241 @Override
242 public void setPrimaryKeyObj(Serializable primaryKeyObj) {
243 setPrimaryKey(((Long)primaryKeyObj).longValue());
244 }
245
246 @Override
247 public Class<?> getModelClass() {
248 return AssetEntry.class;
249 }
250
251 @Override
252 public String getModelClassName() {
253 return AssetEntry.class.getName();
254 }
255
256 @Override
257 public Map<String, Object> getModelAttributes() {
258 Map<String, Object> attributes = new HashMap<String, Object>();
259
260 attributes.put("entryId", getEntryId());
261 attributes.put("groupId", getGroupId());
262 attributes.put("companyId", getCompanyId());
263 attributes.put("userId", getUserId());
264 attributes.put("userName", getUserName());
265 attributes.put("createDate", getCreateDate());
266 attributes.put("modifiedDate", getModifiedDate());
267 attributes.put("classNameId", getClassNameId());
268 attributes.put("classPK", getClassPK());
269 attributes.put("classUuid", getClassUuid());
270 attributes.put("classTypeId", getClassTypeId());
271 attributes.put("listable", getListable());
272 attributes.put("visible", getVisible());
273 attributes.put("startDate", getStartDate());
274 attributes.put("endDate", getEndDate());
275 attributes.put("publishDate", getPublishDate());
276 attributes.put("expirationDate", getExpirationDate());
277 attributes.put("mimeType", getMimeType());
278 attributes.put("title", getTitle());
279 attributes.put("description", getDescription());
280 attributes.put("summary", getSummary());
281 attributes.put("url", getUrl());
282 attributes.put("layoutUuid", getLayoutUuid());
283 attributes.put("height", getHeight());
284 attributes.put("width", getWidth());
285 attributes.put("priority", getPriority());
286 attributes.put("viewCount", getViewCount());
287
288 attributes.put("entityCacheEnabled", isEntityCacheEnabled());
289 attributes.put("finderCacheEnabled", isFinderCacheEnabled());
290
291 return attributes;
292 }
293
294 @Override
295 public void setModelAttributes(Map<String, Object> attributes) {
296 Long entryId = (Long)attributes.get("entryId");
297
298 if (entryId != null) {
299 setEntryId(entryId);
300 }
301
302 Long groupId = (Long)attributes.get("groupId");
303
304 if (groupId != null) {
305 setGroupId(groupId);
306 }
307
308 Long companyId = (Long)attributes.get("companyId");
309
310 if (companyId != null) {
311 setCompanyId(companyId);
312 }
313
314 Long userId = (Long)attributes.get("userId");
315
316 if (userId != null) {
317 setUserId(userId);
318 }
319
320 String userName = (String)attributes.get("userName");
321
322 if (userName != null) {
323 setUserName(userName);
324 }
325
326 Date createDate = (Date)attributes.get("createDate");
327
328 if (createDate != null) {
329 setCreateDate(createDate);
330 }
331
332 Date modifiedDate = (Date)attributes.get("modifiedDate");
333
334 if (modifiedDate != null) {
335 setModifiedDate(modifiedDate);
336 }
337
338 Long classNameId = (Long)attributes.get("classNameId");
339
340 if (classNameId != null) {
341 setClassNameId(classNameId);
342 }
343
344 Long classPK = (Long)attributes.get("classPK");
345
346 if (classPK != null) {
347 setClassPK(classPK);
348 }
349
350 String classUuid = (String)attributes.get("classUuid");
351
352 if (classUuid != null) {
353 setClassUuid(classUuid);
354 }
355
356 Long classTypeId = (Long)attributes.get("classTypeId");
357
358 if (classTypeId != null) {
359 setClassTypeId(classTypeId);
360 }
361
362 Boolean listable = (Boolean)attributes.get("listable");
363
364 if (listable != null) {
365 setListable(listable);
366 }
367
368 Boolean visible = (Boolean)attributes.get("visible");
369
370 if (visible != null) {
371 setVisible(visible);
372 }
373
374 Date startDate = (Date)attributes.get("startDate");
375
376 if (startDate != null) {
377 setStartDate(startDate);
378 }
379
380 Date endDate = (Date)attributes.get("endDate");
381
382 if (endDate != null) {
383 setEndDate(endDate);
384 }
385
386 Date publishDate = (Date)attributes.get("publishDate");
387
388 if (publishDate != null) {
389 setPublishDate(publishDate);
390 }
391
392 Date expirationDate = (Date)attributes.get("expirationDate");
393
394 if (expirationDate != null) {
395 setExpirationDate(expirationDate);
396 }
397
398 String mimeType = (String)attributes.get("mimeType");
399
400 if (mimeType != null) {
401 setMimeType(mimeType);
402 }
403
404 String title = (String)attributes.get("title");
405
406 if (title != null) {
407 setTitle(title);
408 }
409
410 String description = (String)attributes.get("description");
411
412 if (description != null) {
413 setDescription(description);
414 }
415
416 String summary = (String)attributes.get("summary");
417
418 if (summary != null) {
419 setSummary(summary);
420 }
421
422 String url = (String)attributes.get("url");
423
424 if (url != null) {
425 setUrl(url);
426 }
427
428 String layoutUuid = (String)attributes.get("layoutUuid");
429
430 if (layoutUuid != null) {
431 setLayoutUuid(layoutUuid);
432 }
433
434 Integer height = (Integer)attributes.get("height");
435
436 if (height != null) {
437 setHeight(height);
438 }
439
440 Integer width = (Integer)attributes.get("width");
441
442 if (width != null) {
443 setWidth(width);
444 }
445
446 Double priority = (Double)attributes.get("priority");
447
448 if (priority != null) {
449 setPriority(priority);
450 }
451
452 Integer viewCount = (Integer)attributes.get("viewCount");
453
454 if (viewCount != null) {
455 setViewCount(viewCount);
456 }
457 }
458
459 @JSON
460 @Override
461 public long getEntryId() {
462 return _entryId;
463 }
464
465 @Override
466 public void setEntryId(long entryId) {
467 _entryId = entryId;
468 }
469
470 @JSON
471 @Override
472 public long getGroupId() {
473 return _groupId;
474 }
475
476 @Override
477 public void setGroupId(long groupId) {
478 _columnBitmask |= GROUPID_COLUMN_BITMASK;
479
480 if (!_setOriginalGroupId) {
481 _setOriginalGroupId = true;
482
483 _originalGroupId = _groupId;
484 }
485
486 _groupId = groupId;
487 }
488
489 public long getOriginalGroupId() {
490 return _originalGroupId;
491 }
492
493 @JSON
494 @Override
495 public long getCompanyId() {
496 return _companyId;
497 }
498
499 @Override
500 public void setCompanyId(long companyId) {
501 _columnBitmask |= COMPANYID_COLUMN_BITMASK;
502
503 if (!_setOriginalCompanyId) {
504 _setOriginalCompanyId = true;
505
506 _originalCompanyId = _companyId;
507 }
508
509 _companyId = companyId;
510 }
511
512 public long getOriginalCompanyId() {
513 return _originalCompanyId;
514 }
515
516 @JSON
517 @Override
518 public long getUserId() {
519 return _userId;
520 }
521
522 @Override
523 public void setUserId(long userId) {
524 _userId = userId;
525 }
526
527 @Override
528 public String getUserUuid() {
529 try {
530 User user = UserLocalServiceUtil.getUserById(getUserId());
531
532 return user.getUuid();
533 }
534 catch (PortalException pe) {
535 return StringPool.BLANK;
536 }
537 }
538
539 @Override
540 public void setUserUuid(String userUuid) {
541 }
542
543 @JSON
544 @Override
545 public String getUserName() {
546 if (_userName == null) {
547 return StringPool.BLANK;
548 }
549 else {
550 return _userName;
551 }
552 }
553
554 @Override
555 public void setUserName(String userName) {
556 _userName = userName;
557 }
558
559 @JSON
560 @Override
561 public Date getCreateDate() {
562 return _createDate;
563 }
564
565 @Override
566 public void setCreateDate(Date createDate) {
567 _createDate = createDate;
568 }
569
570 @JSON
571 @Override
572 public Date getModifiedDate() {
573 return _modifiedDate;
574 }
575
576 public boolean hasSetModifiedDate() {
577 return _setModifiedDate;
578 }
579
580 @Override
581 public void setModifiedDate(Date modifiedDate) {
582 _setModifiedDate = true;
583
584 _modifiedDate = modifiedDate;
585 }
586
587 @Override
588 public String getClassName() {
589 if (getClassNameId() <= 0) {
590 return StringPool.BLANK;
591 }
592
593 return PortalUtil.getClassName(getClassNameId());
594 }
595
596 @Override
597 public void setClassName(String className) {
598 long classNameId = 0;
599
600 if (Validator.isNotNull(className)) {
601 classNameId = PortalUtil.getClassNameId(className);
602 }
603
604 setClassNameId(classNameId);
605 }
606
607 @JSON
608 @Override
609 public long getClassNameId() {
610 return _classNameId;
611 }
612
613 @Override
614 public void setClassNameId(long classNameId) {
615 _columnBitmask |= CLASSNAMEID_COLUMN_BITMASK;
616
617 if (!_setOriginalClassNameId) {
618 _setOriginalClassNameId = true;
619
620 _originalClassNameId = _classNameId;
621 }
622
623 _classNameId = classNameId;
624 }
625
626 public long getOriginalClassNameId() {
627 return _originalClassNameId;
628 }
629
630 @JSON
631 @Override
632 public long getClassPK() {
633 return _classPK;
634 }
635
636 @Override
637 public void setClassPK(long classPK) {
638 _columnBitmask |= CLASSPK_COLUMN_BITMASK;
639
640 if (!_setOriginalClassPK) {
641 _setOriginalClassPK = true;
642
643 _originalClassPK = _classPK;
644 }
645
646 _classPK = classPK;
647 }
648
649 public long getOriginalClassPK() {
650 return _originalClassPK;
651 }
652
653 @JSON
654 @Override
655 public String getClassUuid() {
656 if (_classUuid == null) {
657 return StringPool.BLANK;
658 }
659 else {
660 return _classUuid;
661 }
662 }
663
664 @Override
665 public void setClassUuid(String classUuid) {
666 _columnBitmask |= CLASSUUID_COLUMN_BITMASK;
667
668 if (_originalClassUuid == null) {
669 _originalClassUuid = _classUuid;
670 }
671
672 _classUuid = classUuid;
673 }
674
675 public String getOriginalClassUuid() {
676 return GetterUtil.getString(_originalClassUuid);
677 }
678
679 @JSON
680 @Override
681 public long getClassTypeId() {
682 return _classTypeId;
683 }
684
685 @Override
686 public void setClassTypeId(long classTypeId) {
687 _classTypeId = classTypeId;
688 }
689
690 @JSON
691 @Override
692 public boolean getListable() {
693 return _listable;
694 }
695
696 @Override
697 public boolean isListable() {
698 return _listable;
699 }
700
701 @Override
702 public void setListable(boolean listable) {
703 _listable = listable;
704 }
705
706 @JSON
707 @Override
708 public boolean getVisible() {
709 return _visible;
710 }
711
712 @Override
713 public boolean isVisible() {
714 return _visible;
715 }
716
717 @Override
718 public void setVisible(boolean visible) {
719 _columnBitmask |= VISIBLE_COLUMN_BITMASK;
720
721 if (!_setOriginalVisible) {
722 _setOriginalVisible = true;
723
724 _originalVisible = _visible;
725 }
726
727 _visible = visible;
728 }
729
730 public boolean getOriginalVisible() {
731 return _originalVisible;
732 }
733
734 @JSON
735 @Override
736 public Date getStartDate() {
737 return _startDate;
738 }
739
740 @Override
741 public void setStartDate(Date startDate) {
742 _startDate = startDate;
743 }
744
745 @JSON
746 @Override
747 public Date getEndDate() {
748 return _endDate;
749 }
750
751 @Override
752 public void setEndDate(Date endDate) {
753 _endDate = endDate;
754 }
755
756 @JSON
757 @Override
758 public Date getPublishDate() {
759 return _publishDate;
760 }
761
762 @Override
763 public void setPublishDate(Date publishDate) {
764 _columnBitmask |= PUBLISHDATE_COLUMN_BITMASK;
765
766 if (_originalPublishDate == null) {
767 _originalPublishDate = _publishDate;
768 }
769
770 _publishDate = publishDate;
771 }
772
773 public Date getOriginalPublishDate() {
774 return _originalPublishDate;
775 }
776
777 @JSON
778 @Override
779 public Date getExpirationDate() {
780 return _expirationDate;
781 }
782
783 @Override
784 public void setExpirationDate(Date expirationDate) {
785 _columnBitmask |= EXPIRATIONDATE_COLUMN_BITMASK;
786
787 if (_originalExpirationDate == null) {
788 _originalExpirationDate = _expirationDate;
789 }
790
791 _expirationDate = expirationDate;
792 }
793
794 public Date getOriginalExpirationDate() {
795 return _originalExpirationDate;
796 }
797
798 @JSON
799 @Override
800 public String getMimeType() {
801 if (_mimeType == null) {
802 return StringPool.BLANK;
803 }
804 else {
805 return _mimeType;
806 }
807 }
808
809 @Override
810 public void setMimeType(String mimeType) {
811 _mimeType = mimeType;
812 }
813
814 @JSON
815 @Override
816 public String getTitle() {
817 if (_title == null) {
818 return StringPool.BLANK;
819 }
820 else {
821 return _title;
822 }
823 }
824
825 @Override
826 public String getTitle(Locale locale) {
827 String languageId = LocaleUtil.toLanguageId(locale);
828
829 return getTitle(languageId);
830 }
831
832 @Override
833 public String getTitle(Locale locale, boolean useDefault) {
834 String languageId = LocaleUtil.toLanguageId(locale);
835
836 return getTitle(languageId, useDefault);
837 }
838
839 @Override
840 public String getTitle(String languageId) {
841 return LocalizationUtil.getLocalization(getTitle(), languageId);
842 }
843
844 @Override
845 public String getTitle(String languageId, boolean useDefault) {
846 return LocalizationUtil.getLocalization(getTitle(), languageId,
847 useDefault);
848 }
849
850 @Override
851 public String getTitleCurrentLanguageId() {
852 return _titleCurrentLanguageId;
853 }
854
855 @JSON
856 @Override
857 public String getTitleCurrentValue() {
858 Locale locale = getLocale(_titleCurrentLanguageId);
859
860 return getTitle(locale);
861 }
862
863 @Override
864 public Map<Locale, String> getTitleMap() {
865 return LocalizationUtil.getLocalizationMap(getTitle());
866 }
867
868 @Override
869 public void setTitle(String title) {
870 _title = title;
871 }
872
873 @Override
874 public void setTitle(String title, Locale locale) {
875 setTitle(title, locale, LocaleUtil.getSiteDefault());
876 }
877
878 @Override
879 public void setTitle(String title, Locale locale, Locale defaultLocale) {
880 String languageId = LocaleUtil.toLanguageId(locale);
881 String defaultLanguageId = LocaleUtil.toLanguageId(defaultLocale);
882
883 if (Validator.isNotNull(title)) {
884 setTitle(LocalizationUtil.updateLocalization(getTitle(), "Title",
885 title, languageId, defaultLanguageId));
886 }
887 else {
888 setTitle(LocalizationUtil.removeLocalization(getTitle(), "Title",
889 languageId));
890 }
891 }
892
893 @Override
894 public void setTitleCurrentLanguageId(String languageId) {
895 _titleCurrentLanguageId = languageId;
896 }
897
898 @Override
899 public void setTitleMap(Map<Locale, String> titleMap) {
900 setTitleMap(titleMap, LocaleUtil.getSiteDefault());
901 }
902
903 @Override
904 public void setTitleMap(Map<Locale, String> titleMap, Locale defaultLocale) {
905 if (titleMap == null) {
906 return;
907 }
908
909 setTitle(LocalizationUtil.updateLocalization(titleMap, getTitle(),
910 "Title", LocaleUtil.toLanguageId(defaultLocale)));
911 }
912
913 @JSON
914 @Override
915 public String getDescription() {
916 if (_description == null) {
917 return StringPool.BLANK;
918 }
919 else {
920 return _description;
921 }
922 }
923
924 @Override
925 public String getDescription(Locale locale) {
926 String languageId = LocaleUtil.toLanguageId(locale);
927
928 return getDescription(languageId);
929 }
930
931 @Override
932 public String getDescription(Locale locale, boolean useDefault) {
933 String languageId = LocaleUtil.toLanguageId(locale);
934
935 return getDescription(languageId, useDefault);
936 }
937
938 @Override
939 public String getDescription(String languageId) {
940 return LocalizationUtil.getLocalization(getDescription(), languageId);
941 }
942
943 @Override
944 public String getDescription(String languageId, boolean useDefault) {
945 return LocalizationUtil.getLocalization(getDescription(), languageId,
946 useDefault);
947 }
948
949 @Override
950 public String getDescriptionCurrentLanguageId() {
951 return _descriptionCurrentLanguageId;
952 }
953
954 @JSON
955 @Override
956 public String getDescriptionCurrentValue() {
957 Locale locale = getLocale(_descriptionCurrentLanguageId);
958
959 return getDescription(locale);
960 }
961
962 @Override
963 public Map<Locale, String> getDescriptionMap() {
964 return LocalizationUtil.getLocalizationMap(getDescription());
965 }
966
967 @Override
968 public void setDescription(String description) {
969 _description = description;
970 }
971
972 @Override
973 public void setDescription(String description, Locale locale) {
974 setDescription(description, locale, LocaleUtil.getSiteDefault());
975 }
976
977 @Override
978 public void setDescription(String description, Locale locale,
979 Locale defaultLocale) {
980 String languageId = LocaleUtil.toLanguageId(locale);
981 String defaultLanguageId = LocaleUtil.toLanguageId(defaultLocale);
982
983 if (Validator.isNotNull(description)) {
984 setDescription(LocalizationUtil.updateLocalization(
985 getDescription(), "Description", description, languageId,
986 defaultLanguageId));
987 }
988 else {
989 setDescription(LocalizationUtil.removeLocalization(
990 getDescription(), "Description", languageId));
991 }
992 }
993
994 @Override
995 public void setDescriptionCurrentLanguageId(String languageId) {
996 _descriptionCurrentLanguageId = languageId;
997 }
998
999 @Override
1000 public void setDescriptionMap(Map<Locale, String> descriptionMap) {
1001 setDescriptionMap(descriptionMap, LocaleUtil.getSiteDefault());
1002 }
1003
1004 @Override
1005 public void setDescriptionMap(Map<Locale, String> descriptionMap,
1006 Locale defaultLocale) {
1007 if (descriptionMap == null) {
1008 return;
1009 }
1010
1011 setDescription(LocalizationUtil.updateLocalization(descriptionMap,
1012 getDescription(), "Description",
1013 LocaleUtil.toLanguageId(defaultLocale)));
1014 }
1015
1016 @JSON
1017 @Override
1018 public String getSummary() {
1019 if (_summary == null) {
1020 return StringPool.BLANK;
1021 }
1022 else {
1023 return _summary;
1024 }
1025 }
1026
1027 @Override
1028 public String getSummary(Locale locale) {
1029 String languageId = LocaleUtil.toLanguageId(locale);
1030
1031 return getSummary(languageId);
1032 }
1033
1034 @Override
1035 public String getSummary(Locale locale, boolean useDefault) {
1036 String languageId = LocaleUtil.toLanguageId(locale);
1037
1038 return getSummary(languageId, useDefault);
1039 }
1040
1041 @Override
1042 public String getSummary(String languageId) {
1043 return LocalizationUtil.getLocalization(getSummary(), languageId);
1044 }
1045
1046 @Override
1047 public String getSummary(String languageId, boolean useDefault) {
1048 return LocalizationUtil.getLocalization(getSummary(), languageId,
1049 useDefault);
1050 }
1051
1052 @Override
1053 public String getSummaryCurrentLanguageId() {
1054 return _summaryCurrentLanguageId;
1055 }
1056
1057 @JSON
1058 @Override
1059 public String getSummaryCurrentValue() {
1060 Locale locale = getLocale(_summaryCurrentLanguageId);
1061
1062 return getSummary(locale);
1063 }
1064
1065 @Override
1066 public Map<Locale, String> getSummaryMap() {
1067 return LocalizationUtil.getLocalizationMap(getSummary());
1068 }
1069
1070 @Override
1071 public void setSummary(String summary) {
1072 _summary = summary;
1073 }
1074
1075 @Override
1076 public void setSummary(String summary, Locale locale) {
1077 setSummary(summary, locale, LocaleUtil.getSiteDefault());
1078 }
1079
1080 @Override
1081 public void setSummary(String summary, Locale locale, Locale defaultLocale) {
1082 String languageId = LocaleUtil.toLanguageId(locale);
1083 String defaultLanguageId = LocaleUtil.toLanguageId(defaultLocale);
1084
1085 if (Validator.isNotNull(summary)) {
1086 setSummary(LocalizationUtil.updateLocalization(getSummary(),
1087 "Summary", summary, languageId, defaultLanguageId));
1088 }
1089 else {
1090 setSummary(LocalizationUtil.removeLocalization(getSummary(),
1091 "Summary", languageId));
1092 }
1093 }
1094
1095 @Override
1096 public void setSummaryCurrentLanguageId(String languageId) {
1097 _summaryCurrentLanguageId = languageId;
1098 }
1099
1100 @Override
1101 public void setSummaryMap(Map<Locale, String> summaryMap) {
1102 setSummaryMap(summaryMap, LocaleUtil.getSiteDefault());
1103 }
1104
1105 @Override
1106 public void setSummaryMap(Map<Locale, String> summaryMap,
1107 Locale defaultLocale) {
1108 if (summaryMap == null) {
1109 return;
1110 }
1111
1112 setSummary(LocalizationUtil.updateLocalization(summaryMap,
1113 getSummary(), "Summary", LocaleUtil.toLanguageId(defaultLocale)));
1114 }
1115
1116 @JSON
1117 @Override
1118 public String getUrl() {
1119 if (_url == null) {
1120 return StringPool.BLANK;
1121 }
1122 else {
1123 return _url;
1124 }
1125 }
1126
1127 @Override
1128 public void setUrl(String url) {
1129 _url = url;
1130 }
1131
1132 @JSON
1133 @Override
1134 public String getLayoutUuid() {
1135 if (_layoutUuid == null) {
1136 return StringPool.BLANK;
1137 }
1138 else {
1139 return _layoutUuid;
1140 }
1141 }
1142
1143 @Override
1144 public void setLayoutUuid(String layoutUuid) {
1145 _columnBitmask |= LAYOUTUUID_COLUMN_BITMASK;
1146
1147 if (_originalLayoutUuid == null) {
1148 _originalLayoutUuid = _layoutUuid;
1149 }
1150
1151 _layoutUuid = layoutUuid;
1152 }
1153
1154 public String getOriginalLayoutUuid() {
1155 return GetterUtil.getString(_originalLayoutUuid);
1156 }
1157
1158 @JSON
1159 @Override
1160 public int getHeight() {
1161 return _height;
1162 }
1163
1164 @Override
1165 public void setHeight(int height) {
1166 _height = height;
1167 }
1168
1169 @JSON
1170 @Override
1171 public int getWidth() {
1172 return _width;
1173 }
1174
1175 @Override
1176 public void setWidth(int width) {
1177 _width = width;
1178 }
1179
1180 @JSON
1181 @Override
1182 public double getPriority() {
1183 return _priority;
1184 }
1185
1186 @Override
1187 public void setPriority(double priority) {
1188 _priority = priority;
1189 }
1190
1191 @JSON
1192 @Override
1193 public int getViewCount() {
1194 return _viewCount;
1195 }
1196
1197 @Override
1198 public void setViewCount(int viewCount) {
1199 _viewCount = viewCount;
1200 }
1201
1202 public long getColumnBitmask() {
1203 return _columnBitmask;
1204 }
1205
1206 @Override
1207 public ExpandoBridge getExpandoBridge() {
1208 return ExpandoBridgeFactoryUtil.getExpandoBridge(getCompanyId(),
1209 AssetEntry.class.getName(), getPrimaryKey());
1210 }
1211
1212 @Override
1213 public void setExpandoBridgeAttributes(ServiceContext serviceContext) {
1214 ExpandoBridge expandoBridge = getExpandoBridge();
1215
1216 expandoBridge.setAttributes(serviceContext);
1217 }
1218
1219 @Override
1220 public String[] getAvailableLanguageIds() {
1221 Set<String> availableLanguageIds = new TreeSet<String>();
1222
1223 Map<Locale, String> titleMap = getTitleMap();
1224
1225 for (Map.Entry<Locale, String> entry : titleMap.entrySet()) {
1226 Locale locale = entry.getKey();
1227 String value = entry.getValue();
1228
1229 if (Validator.isNotNull(value)) {
1230 availableLanguageIds.add(LocaleUtil.toLanguageId(locale));
1231 }
1232 }
1233
1234 Map<Locale, String> descriptionMap = getDescriptionMap();
1235
1236 for (Map.Entry<Locale, String> entry : descriptionMap.entrySet()) {
1237 Locale locale = entry.getKey();
1238 String value = entry.getValue();
1239
1240 if (Validator.isNotNull(value)) {
1241 availableLanguageIds.add(LocaleUtil.toLanguageId(locale));
1242 }
1243 }
1244
1245 Map<Locale, String> summaryMap = getSummaryMap();
1246
1247 for (Map.Entry<Locale, String> entry : summaryMap.entrySet()) {
1248 Locale locale = entry.getKey();
1249 String value = entry.getValue();
1250
1251 if (Validator.isNotNull(value)) {
1252 availableLanguageIds.add(LocaleUtil.toLanguageId(locale));
1253 }
1254 }
1255
1256 return availableLanguageIds.toArray(new String[availableLanguageIds.size()]);
1257 }
1258
1259 @Override
1260 public String getDefaultLanguageId() {
1261 String xml = getTitle();
1262
1263 if (xml == null) {
1264 return StringPool.BLANK;
1265 }
1266
1267 Locale defaultLocale = LocaleUtil.getSiteDefault();
1268
1269 return LocalizationUtil.getDefaultLanguageId(xml, defaultLocale);
1270 }
1271
1272 @Override
1273 public void prepareLocalizedFieldsForImport() throws LocaleException {
1274 Locale defaultLocale = LocaleUtil.fromLanguageId(getDefaultLanguageId());
1275
1276 Locale[] availableLocales = LocaleUtil.fromLanguageIds(getAvailableLanguageIds());
1277
1278 Locale defaultImportLocale = LocalizationUtil.getDefaultImportLocale(AssetEntry.class.getName(),
1279 getPrimaryKey(), defaultLocale, availableLocales);
1280
1281 prepareLocalizedFieldsForImport(defaultImportLocale);
1282 }
1283
1284 @Override
1285 @SuppressWarnings("unused")
1286 public void prepareLocalizedFieldsForImport(Locale defaultImportLocale)
1287 throws LocaleException {
1288 Locale defaultLocale = LocaleUtil.getSiteDefault();
1289
1290 String modelDefaultLanguageId = getDefaultLanguageId();
1291
1292 String title = getTitle(defaultLocale);
1293
1294 if (Validator.isNull(title)) {
1295 setTitle(getTitle(modelDefaultLanguageId), defaultLocale);
1296 }
1297 else {
1298 setTitle(getTitle(defaultLocale), defaultLocale, defaultLocale);
1299 }
1300
1301 String description = getDescription(defaultLocale);
1302
1303 if (Validator.isNull(description)) {
1304 setDescription(getDescription(modelDefaultLanguageId), defaultLocale);
1305 }
1306 else {
1307 setDescription(getDescription(defaultLocale), defaultLocale,
1308 defaultLocale);
1309 }
1310
1311 String summary = getSummary(defaultLocale);
1312
1313 if (Validator.isNull(summary)) {
1314 setSummary(getSummary(modelDefaultLanguageId), defaultLocale);
1315 }
1316 else {
1317 setSummary(getSummary(defaultLocale), defaultLocale, defaultLocale);
1318 }
1319 }
1320
1321 @Override
1322 public AssetEntry toEscapedModel() {
1323 if (_escapedModel == null) {
1324 _escapedModel = (AssetEntry)ProxyUtil.newProxyInstance(_classLoader,
1325 _escapedModelInterfaces, new AutoEscapeBeanHandler(this));
1326 }
1327
1328 return _escapedModel;
1329 }
1330
1331 @Override
1332 public Object clone() {
1333 AssetEntryImpl assetEntryImpl = new AssetEntryImpl();
1334
1335 assetEntryImpl.setEntryId(getEntryId());
1336 assetEntryImpl.setGroupId(getGroupId());
1337 assetEntryImpl.setCompanyId(getCompanyId());
1338 assetEntryImpl.setUserId(getUserId());
1339 assetEntryImpl.setUserName(getUserName());
1340 assetEntryImpl.setCreateDate(getCreateDate());
1341 assetEntryImpl.setModifiedDate(getModifiedDate());
1342 assetEntryImpl.setClassNameId(getClassNameId());
1343 assetEntryImpl.setClassPK(getClassPK());
1344 assetEntryImpl.setClassUuid(getClassUuid());
1345 assetEntryImpl.setClassTypeId(getClassTypeId());
1346 assetEntryImpl.setListable(getListable());
1347 assetEntryImpl.setVisible(getVisible());
1348 assetEntryImpl.setStartDate(getStartDate());
1349 assetEntryImpl.setEndDate(getEndDate());
1350 assetEntryImpl.setPublishDate(getPublishDate());
1351 assetEntryImpl.setExpirationDate(getExpirationDate());
1352 assetEntryImpl.setMimeType(getMimeType());
1353 assetEntryImpl.setTitle(getTitle());
1354 assetEntryImpl.setDescription(getDescription());
1355 assetEntryImpl.setSummary(getSummary());
1356 assetEntryImpl.setUrl(getUrl());
1357 assetEntryImpl.setLayoutUuid(getLayoutUuid());
1358 assetEntryImpl.setHeight(getHeight());
1359 assetEntryImpl.setWidth(getWidth());
1360 assetEntryImpl.setPriority(getPriority());
1361 assetEntryImpl.setViewCount(getViewCount());
1362
1363 assetEntryImpl.resetOriginalValues();
1364
1365 return assetEntryImpl;
1366 }
1367
1368 @Override
1369 public int compareTo(AssetEntry assetEntry) {
1370 long primaryKey = assetEntry.getPrimaryKey();
1371
1372 if (getPrimaryKey() < primaryKey) {
1373 return -1;
1374 }
1375 else if (getPrimaryKey() > primaryKey) {
1376 return 1;
1377 }
1378 else {
1379 return 0;
1380 }
1381 }
1382
1383 @Override
1384 public boolean equals(Object obj) {
1385 if (this == obj) {
1386 return true;
1387 }
1388
1389 if (!(obj instanceof AssetEntry)) {
1390 return false;
1391 }
1392
1393 AssetEntry assetEntry = (AssetEntry)obj;
1394
1395 long primaryKey = assetEntry.getPrimaryKey();
1396
1397 if (getPrimaryKey() == primaryKey) {
1398 return true;
1399 }
1400 else {
1401 return false;
1402 }
1403 }
1404
1405 @Override
1406 public int hashCode() {
1407 return (int)getPrimaryKey();
1408 }
1409
1410 @Override
1411 public boolean isEntityCacheEnabled() {
1412 return ENTITY_CACHE_ENABLED;
1413 }
1414
1415 @Override
1416 public boolean isFinderCacheEnabled() {
1417 return FINDER_CACHE_ENABLED;
1418 }
1419
1420 @Override
1421 public void resetOriginalValues() {
1422 AssetEntryModelImpl assetEntryModelImpl = this;
1423
1424 assetEntryModelImpl._originalGroupId = assetEntryModelImpl._groupId;
1425
1426 assetEntryModelImpl._setOriginalGroupId = false;
1427
1428 assetEntryModelImpl._originalCompanyId = assetEntryModelImpl._companyId;
1429
1430 assetEntryModelImpl._setOriginalCompanyId = false;
1431
1432 assetEntryModelImpl._setModifiedDate = false;
1433
1434 assetEntryModelImpl._originalClassNameId = assetEntryModelImpl._classNameId;
1435
1436 assetEntryModelImpl._setOriginalClassNameId = false;
1437
1438 assetEntryModelImpl._originalClassPK = assetEntryModelImpl._classPK;
1439
1440 assetEntryModelImpl._setOriginalClassPK = false;
1441
1442 assetEntryModelImpl._originalClassUuid = assetEntryModelImpl._classUuid;
1443
1444 assetEntryModelImpl._originalVisible = assetEntryModelImpl._visible;
1445
1446 assetEntryModelImpl._setOriginalVisible = false;
1447
1448 assetEntryModelImpl._originalPublishDate = assetEntryModelImpl._publishDate;
1449
1450 assetEntryModelImpl._originalExpirationDate = assetEntryModelImpl._expirationDate;
1451
1452 assetEntryModelImpl._originalLayoutUuid = assetEntryModelImpl._layoutUuid;
1453
1454 assetEntryModelImpl._columnBitmask = 0;
1455 }
1456
1457 @Override
1458 public CacheModel<AssetEntry> toCacheModel() {
1459 AssetEntryCacheModel assetEntryCacheModel = new AssetEntryCacheModel();
1460
1461 assetEntryCacheModel.entryId = getEntryId();
1462
1463 assetEntryCacheModel.groupId = getGroupId();
1464
1465 assetEntryCacheModel.companyId = getCompanyId();
1466
1467 assetEntryCacheModel.userId = getUserId();
1468
1469 assetEntryCacheModel.userName = getUserName();
1470
1471 String userName = assetEntryCacheModel.userName;
1472
1473 if ((userName != null) && (userName.length() == 0)) {
1474 assetEntryCacheModel.userName = null;
1475 }
1476
1477 Date createDate = getCreateDate();
1478
1479 if (createDate != null) {
1480 assetEntryCacheModel.createDate = createDate.getTime();
1481 }
1482 else {
1483 assetEntryCacheModel.createDate = Long.MIN_VALUE;
1484 }
1485
1486 Date modifiedDate = getModifiedDate();
1487
1488 if (modifiedDate != null) {
1489 assetEntryCacheModel.modifiedDate = modifiedDate.getTime();
1490 }
1491 else {
1492 assetEntryCacheModel.modifiedDate = Long.MIN_VALUE;
1493 }
1494
1495 assetEntryCacheModel.classNameId = getClassNameId();
1496
1497 assetEntryCacheModel.classPK = getClassPK();
1498
1499 assetEntryCacheModel.classUuid = getClassUuid();
1500
1501 String classUuid = assetEntryCacheModel.classUuid;
1502
1503 if ((classUuid != null) && (classUuid.length() == 0)) {
1504 assetEntryCacheModel.classUuid = null;
1505 }
1506
1507 assetEntryCacheModel.classTypeId = getClassTypeId();
1508
1509 assetEntryCacheModel.listable = getListable();
1510
1511 assetEntryCacheModel.visible = getVisible();
1512
1513 Date startDate = getStartDate();
1514
1515 if (startDate != null) {
1516 assetEntryCacheModel.startDate = startDate.getTime();
1517 }
1518 else {
1519 assetEntryCacheModel.startDate = Long.MIN_VALUE;
1520 }
1521
1522 Date endDate = getEndDate();
1523
1524 if (endDate != null) {
1525 assetEntryCacheModel.endDate = endDate.getTime();
1526 }
1527 else {
1528 assetEntryCacheModel.endDate = Long.MIN_VALUE;
1529 }
1530
1531 Date publishDate = getPublishDate();
1532
1533 if (publishDate != null) {
1534 assetEntryCacheModel.publishDate = publishDate.getTime();
1535 }
1536 else {
1537 assetEntryCacheModel.publishDate = Long.MIN_VALUE;
1538 }
1539
1540 Date expirationDate = getExpirationDate();
1541
1542 if (expirationDate != null) {
1543 assetEntryCacheModel.expirationDate = expirationDate.getTime();
1544 }
1545 else {
1546 assetEntryCacheModel.expirationDate = Long.MIN_VALUE;
1547 }
1548
1549 assetEntryCacheModel.mimeType = getMimeType();
1550
1551 String mimeType = assetEntryCacheModel.mimeType;
1552
1553 if ((mimeType != null) && (mimeType.length() == 0)) {
1554 assetEntryCacheModel.mimeType = null;
1555 }
1556
1557 assetEntryCacheModel.title = getTitle();
1558
1559 String title = assetEntryCacheModel.title;
1560
1561 if ((title != null) && (title.length() == 0)) {
1562 assetEntryCacheModel.title = null;
1563 }
1564
1565 assetEntryCacheModel.description = getDescription();
1566
1567 String description = assetEntryCacheModel.description;
1568
1569 if ((description != null) && (description.length() == 0)) {
1570 assetEntryCacheModel.description = null;
1571 }
1572
1573 assetEntryCacheModel.summary = getSummary();
1574
1575 String summary = assetEntryCacheModel.summary;
1576
1577 if ((summary != null) && (summary.length() == 0)) {
1578 assetEntryCacheModel.summary = null;
1579 }
1580
1581 assetEntryCacheModel.url = getUrl();
1582
1583 String url = assetEntryCacheModel.url;
1584
1585 if ((url != null) && (url.length() == 0)) {
1586 assetEntryCacheModel.url = null;
1587 }
1588
1589 assetEntryCacheModel.layoutUuid = getLayoutUuid();
1590
1591 String layoutUuid = assetEntryCacheModel.layoutUuid;
1592
1593 if ((layoutUuid != null) && (layoutUuid.length() == 0)) {
1594 assetEntryCacheModel.layoutUuid = null;
1595 }
1596
1597 assetEntryCacheModel.height = getHeight();
1598
1599 assetEntryCacheModel.width = getWidth();
1600
1601 assetEntryCacheModel.priority = getPriority();
1602
1603 assetEntryCacheModel.viewCount = getViewCount();
1604
1605 return assetEntryCacheModel;
1606 }
1607
1608 @Override
1609 public String toString() {
1610 StringBundler sb = new StringBundler(55);
1611
1612 sb.append("{entryId=");
1613 sb.append(getEntryId());
1614 sb.append(", groupId=");
1615 sb.append(getGroupId());
1616 sb.append(", companyId=");
1617 sb.append(getCompanyId());
1618 sb.append(", userId=");
1619 sb.append(getUserId());
1620 sb.append(", userName=");
1621 sb.append(getUserName());
1622 sb.append(", createDate=");
1623 sb.append(getCreateDate());
1624 sb.append(", modifiedDate=");
1625 sb.append(getModifiedDate());
1626 sb.append(", classNameId=");
1627 sb.append(getClassNameId());
1628 sb.append(", classPK=");
1629 sb.append(getClassPK());
1630 sb.append(", classUuid=");
1631 sb.append(getClassUuid());
1632 sb.append(", classTypeId=");
1633 sb.append(getClassTypeId());
1634 sb.append(", listable=");
1635 sb.append(getListable());
1636 sb.append(", visible=");
1637 sb.append(getVisible());
1638 sb.append(", startDate=");
1639 sb.append(getStartDate());
1640 sb.append(", endDate=");
1641 sb.append(getEndDate());
1642 sb.append(", publishDate=");
1643 sb.append(getPublishDate());
1644 sb.append(", expirationDate=");
1645 sb.append(getExpirationDate());
1646 sb.append(", mimeType=");
1647 sb.append(getMimeType());
1648 sb.append(", title=");
1649 sb.append(getTitle());
1650 sb.append(", description=");
1651 sb.append(getDescription());
1652 sb.append(", summary=");
1653 sb.append(getSummary());
1654 sb.append(", url=");
1655 sb.append(getUrl());
1656 sb.append(", layoutUuid=");
1657 sb.append(getLayoutUuid());
1658 sb.append(", height=");
1659 sb.append(getHeight());
1660 sb.append(", width=");
1661 sb.append(getWidth());
1662 sb.append(", priority=");
1663 sb.append(getPriority());
1664 sb.append(", viewCount=");
1665 sb.append(getViewCount());
1666 sb.append("}");
1667
1668 return sb.toString();
1669 }
1670
1671 @Override
1672 public String toXmlString() {
1673 StringBundler sb = new StringBundler(85);
1674
1675 sb.append("<model><model-name>");
1676 sb.append("com.liferay.portlet.asset.model.AssetEntry");
1677 sb.append("</model-name>");
1678
1679 sb.append(
1680 "<column><column-name>entryId</column-name><column-value><![CDATA[");
1681 sb.append(getEntryId());
1682 sb.append("]]></column-value></column>");
1683 sb.append(
1684 "<column><column-name>groupId</column-name><column-value><![CDATA[");
1685 sb.append(getGroupId());
1686 sb.append("]]></column-value></column>");
1687 sb.append(
1688 "<column><column-name>companyId</column-name><column-value><![CDATA[");
1689 sb.append(getCompanyId());
1690 sb.append("]]></column-value></column>");
1691 sb.append(
1692 "<column><column-name>userId</column-name><column-value><![CDATA[");
1693 sb.append(getUserId());
1694 sb.append("]]></column-value></column>");
1695 sb.append(
1696 "<column><column-name>userName</column-name><column-value><![CDATA[");
1697 sb.append(getUserName());
1698 sb.append("]]></column-value></column>");
1699 sb.append(
1700 "<column><column-name>createDate</column-name><column-value><![CDATA[");
1701 sb.append(getCreateDate());
1702 sb.append("]]></column-value></column>");
1703 sb.append(
1704 "<column><column-name>modifiedDate</column-name><column-value><![CDATA[");
1705 sb.append(getModifiedDate());
1706 sb.append("]]></column-value></column>");
1707 sb.append(
1708 "<column><column-name>classNameId</column-name><column-value><![CDATA[");
1709 sb.append(getClassNameId());
1710 sb.append("]]></column-value></column>");
1711 sb.append(
1712 "<column><column-name>classPK</column-name><column-value><![CDATA[");
1713 sb.append(getClassPK());
1714 sb.append("]]></column-value></column>");
1715 sb.append(
1716 "<column><column-name>classUuid</column-name><column-value><![CDATA[");
1717 sb.append(getClassUuid());
1718 sb.append("]]></column-value></column>");
1719 sb.append(
1720 "<column><column-name>classTypeId</column-name><column-value><![CDATA[");
1721 sb.append(getClassTypeId());
1722 sb.append("]]></column-value></column>");
1723 sb.append(
1724 "<column><column-name>listable</column-name><column-value><![CDATA[");
1725 sb.append(getListable());
1726 sb.append("]]></column-value></column>");
1727 sb.append(
1728 "<column><column-name>visible</column-name><column-value><![CDATA[");
1729 sb.append(getVisible());
1730 sb.append("]]></column-value></column>");
1731 sb.append(
1732 "<column><column-name>startDate</column-name><column-value><![CDATA[");
1733 sb.append(getStartDate());
1734 sb.append("]]></column-value></column>");
1735 sb.append(
1736 "<column><column-name>endDate</column-name><column-value><![CDATA[");
1737 sb.append(getEndDate());
1738 sb.append("]]></column-value></column>");
1739 sb.append(
1740 "<column><column-name>publishDate</column-name><column-value><![CDATA[");
1741 sb.append(getPublishDate());
1742 sb.append("]]></column-value></column>");
1743 sb.append(
1744 "<column><column-name>expirationDate</column-name><column-value><![CDATA[");
1745 sb.append(getExpirationDate());
1746 sb.append("]]></column-value></column>");
1747 sb.append(
1748 "<column><column-name>mimeType</column-name><column-value><![CDATA[");
1749 sb.append(getMimeType());
1750 sb.append("]]></column-value></column>");
1751 sb.append(
1752 "<column><column-name>title</column-name><column-value><![CDATA[");
1753 sb.append(getTitle());
1754 sb.append("]]></column-value></column>");
1755 sb.append(
1756 "<column><column-name>description</column-name><column-value><![CDATA[");
1757 sb.append(getDescription());
1758 sb.append("]]></column-value></column>");
1759 sb.append(
1760 "<column><column-name>summary</column-name><column-value><![CDATA[");
1761 sb.append(getSummary());
1762 sb.append("]]></column-value></column>");
1763 sb.append(
1764 "<column><column-name>url</column-name><column-value><![CDATA[");
1765 sb.append(getUrl());
1766 sb.append("]]></column-value></column>");
1767 sb.append(
1768 "<column><column-name>layoutUuid</column-name><column-value><![CDATA[");
1769 sb.append(getLayoutUuid());
1770 sb.append("]]></column-value></column>");
1771 sb.append(
1772 "<column><column-name>height</column-name><column-value><![CDATA[");
1773 sb.append(getHeight());
1774 sb.append("]]></column-value></column>");
1775 sb.append(
1776 "<column><column-name>width</column-name><column-value><![CDATA[");
1777 sb.append(getWidth());
1778 sb.append("]]></column-value></column>");
1779 sb.append(
1780 "<column><column-name>priority</column-name><column-value><![CDATA[");
1781 sb.append(getPriority());
1782 sb.append("]]></column-value></column>");
1783 sb.append(
1784 "<column><column-name>viewCount</column-name><column-value><![CDATA[");
1785 sb.append(getViewCount());
1786 sb.append("]]></column-value></column>");
1787
1788 sb.append("</model>");
1789
1790 return sb.toString();
1791 }
1792
1793 private static final ClassLoader _classLoader = AssetEntry.class.getClassLoader();
1794 private static final Class<?>[] _escapedModelInterfaces = new Class[] {
1795 AssetEntry.class
1796 };
1797 private long _entryId;
1798 private long _groupId;
1799 private long _originalGroupId;
1800 private boolean _setOriginalGroupId;
1801 private long _companyId;
1802 private long _originalCompanyId;
1803 private boolean _setOriginalCompanyId;
1804 private long _userId;
1805 private String _userName;
1806 private Date _createDate;
1807 private Date _modifiedDate;
1808 private boolean _setModifiedDate;
1809 private long _classNameId;
1810 private long _originalClassNameId;
1811 private boolean _setOriginalClassNameId;
1812 private long _classPK;
1813 private long _originalClassPK;
1814 private boolean _setOriginalClassPK;
1815 private String _classUuid;
1816 private String _originalClassUuid;
1817 private long _classTypeId;
1818 private boolean _listable;
1819 private boolean _visible;
1820 private boolean _originalVisible;
1821 private boolean _setOriginalVisible;
1822 private Date _startDate;
1823 private Date _endDate;
1824 private Date _publishDate;
1825 private Date _originalPublishDate;
1826 private Date _expirationDate;
1827 private Date _originalExpirationDate;
1828 private String _mimeType;
1829 private String _title;
1830 private String _titleCurrentLanguageId;
1831 private String _description;
1832 private String _descriptionCurrentLanguageId;
1833 private String _summary;
1834 private String _summaryCurrentLanguageId;
1835 private String _url;
1836 private String _layoutUuid;
1837 private String _originalLayoutUuid;
1838 private int _height;
1839 private int _width;
1840 private double _priority;
1841 private int _viewCount;
1842 private long _columnBitmask;
1843 private AssetEntry _escapedModel;
1844 }