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