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