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