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