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