001
014
015 package com.liferay.portlet.softwarecatalog.service.base;
016
017 import com.liferay.counter.service.CounterLocalService;
018
019 import com.liferay.portal.kernel.bean.BeanReference;
020 import com.liferay.portal.kernel.bean.IdentifiableBean;
021 import com.liferay.portal.kernel.dao.jdbc.SqlUpdate;
022 import com.liferay.portal.kernel.dao.jdbc.SqlUpdateFactoryUtil;
023 import com.liferay.portal.kernel.dao.orm.DynamicQuery;
024 import com.liferay.portal.kernel.dao.orm.DynamicQueryFactoryUtil;
025 import com.liferay.portal.kernel.exception.PortalException;
026 import com.liferay.portal.kernel.exception.SystemException;
027 import com.liferay.portal.kernel.search.Indexable;
028 import com.liferay.portal.kernel.search.IndexableType;
029 import com.liferay.portal.kernel.util.OrderByComparator;
030 import com.liferay.portal.model.PersistedModel;
031 import com.liferay.portal.service.BaseLocalServiceImpl;
032 import com.liferay.portal.service.PersistedModelLocalServiceRegistry;
033 import com.liferay.portal.service.ResourceLocalService;
034 import com.liferay.portal.service.UserLocalService;
035 import com.liferay.portal.service.UserService;
036 import com.liferay.portal.service.persistence.UserFinder;
037 import com.liferay.portal.service.persistence.UserPersistence;
038
039 import com.liferay.portlet.softwarecatalog.model.SCLicense;
040 import com.liferay.portlet.softwarecatalog.service.SCFrameworkVersionLocalService;
041 import com.liferay.portlet.softwarecatalog.service.SCFrameworkVersionService;
042 import com.liferay.portlet.softwarecatalog.service.SCLicenseLocalService;
043 import com.liferay.portlet.softwarecatalog.service.SCLicenseService;
044 import com.liferay.portlet.softwarecatalog.service.SCProductEntryLocalService;
045 import com.liferay.portlet.softwarecatalog.service.SCProductEntryService;
046 import com.liferay.portlet.softwarecatalog.service.SCProductScreenshotLocalService;
047 import com.liferay.portlet.softwarecatalog.service.SCProductVersionLocalService;
048 import com.liferay.portlet.softwarecatalog.service.SCProductVersionService;
049 import com.liferay.portlet.softwarecatalog.service.persistence.SCFrameworkVersionPersistence;
050 import com.liferay.portlet.softwarecatalog.service.persistence.SCLicensePersistence;
051 import com.liferay.portlet.softwarecatalog.service.persistence.SCProductEntryPersistence;
052 import com.liferay.portlet.softwarecatalog.service.persistence.SCProductScreenshotPersistence;
053 import com.liferay.portlet.softwarecatalog.service.persistence.SCProductVersionPersistence;
054
055 import java.io.Serializable;
056
057 import java.util.List;
058
059 import javax.sql.DataSource;
060
061
073 public abstract class SCLicenseLocalServiceBaseImpl extends BaseLocalServiceImpl
074 implements SCLicenseLocalService, IdentifiableBean {
075
080
081
088 @Indexable(type = IndexableType.REINDEX)
089 public SCLicense addSCLicense(SCLicense scLicense)
090 throws SystemException {
091 scLicense.setNew(true);
092
093 return scLicensePersistence.update(scLicense);
094 }
095
096
102 public SCLicense createSCLicense(long licenseId) {
103 return scLicensePersistence.create(licenseId);
104 }
105
106
114 @Indexable(type = IndexableType.DELETE)
115 public SCLicense deleteSCLicense(long licenseId)
116 throws PortalException, SystemException {
117 return scLicensePersistence.remove(licenseId);
118 }
119
120
127 @Indexable(type = IndexableType.DELETE)
128 public SCLicense deleteSCLicense(SCLicense scLicense)
129 throws SystemException {
130 return scLicensePersistence.remove(scLicense);
131 }
132
133 public DynamicQuery dynamicQuery() {
134 Class<?> clazz = getClass();
135
136 return DynamicQueryFactoryUtil.forClass(SCLicense.class,
137 clazz.getClassLoader());
138 }
139
140
147 @SuppressWarnings("rawtypes")
148 public List dynamicQuery(DynamicQuery dynamicQuery)
149 throws SystemException {
150 return scLicensePersistence.findWithDynamicQuery(dynamicQuery);
151 }
152
153
166 @SuppressWarnings("rawtypes")
167 public List dynamicQuery(DynamicQuery dynamicQuery, int start, int end)
168 throws SystemException {
169 return scLicensePersistence.findWithDynamicQuery(dynamicQuery, start,
170 end);
171 }
172
173
187 @SuppressWarnings("rawtypes")
188 public List dynamicQuery(DynamicQuery dynamicQuery, int start, int end,
189 OrderByComparator orderByComparator) throws SystemException {
190 return scLicensePersistence.findWithDynamicQuery(dynamicQuery, start,
191 end, orderByComparator);
192 }
193
194
201 public long dynamicQueryCount(DynamicQuery dynamicQuery)
202 throws SystemException {
203 return scLicensePersistence.countWithDynamicQuery(dynamicQuery);
204 }
205
206 public SCLicense fetchSCLicense(long licenseId) throws SystemException {
207 return scLicensePersistence.fetchByPrimaryKey(licenseId);
208 }
209
210
218 public SCLicense getSCLicense(long licenseId)
219 throws PortalException, SystemException {
220 return scLicensePersistence.findByPrimaryKey(licenseId);
221 }
222
223 public PersistedModel getPersistedModel(Serializable primaryKeyObj)
224 throws PortalException, SystemException {
225 return scLicensePersistence.findByPrimaryKey(primaryKeyObj);
226 }
227
228
240 public List<SCLicense> getSCLicenses(int start, int end)
241 throws SystemException {
242 return scLicensePersistence.findAll(start, end);
243 }
244
245
251 public int getSCLicensesCount() throws SystemException {
252 return scLicensePersistence.countAll();
253 }
254
255
262 @Indexable(type = IndexableType.REINDEX)
263 public SCLicense updateSCLicense(SCLicense scLicense)
264 throws SystemException {
265 return scLicensePersistence.update(scLicense);
266 }
267
268
271 public void addSCProductEntrySCLicense(long productEntryId, long licenseId)
272 throws SystemException {
273 scProductEntryPersistence.addSCLicense(productEntryId, licenseId);
274 }
275
276
279 public void addSCProductEntrySCLicense(long productEntryId,
280 SCLicense scLicense) throws SystemException {
281 scProductEntryPersistence.addSCLicense(productEntryId, scLicense);
282 }
283
284
287 public void addSCProductEntrySCLicenses(long productEntryId,
288 long[] licenseIds) throws SystemException {
289 scProductEntryPersistence.addSCLicenses(productEntryId, licenseIds);
290 }
291
292
295 public void addSCProductEntrySCLicenses(long productEntryId,
296 List<SCLicense> SCLicenses) throws SystemException {
297 scProductEntryPersistence.addSCLicenses(productEntryId, SCLicenses);
298 }
299
300
303 public void clearSCProductEntrySCLicenses(long productEntryId)
304 throws SystemException {
305 scProductEntryPersistence.clearSCLicenses(productEntryId);
306 }
307
308
311 public void deleteSCProductEntrySCLicense(long productEntryId,
312 long licenseId) throws SystemException {
313 scProductEntryPersistence.removeSCLicense(productEntryId, licenseId);
314 }
315
316
319 public void deleteSCProductEntrySCLicense(long productEntryId,
320 SCLicense scLicense) throws SystemException {
321 scProductEntryPersistence.removeSCLicense(productEntryId, scLicense);
322 }
323
324
327 public void deleteSCProductEntrySCLicenses(long productEntryId,
328 long[] licenseIds) throws SystemException {
329 scProductEntryPersistence.removeSCLicenses(productEntryId, licenseIds);
330 }
331
332
335 public void deleteSCProductEntrySCLicenses(long productEntryId,
336 List<SCLicense> SCLicenses) throws SystemException {
337 scProductEntryPersistence.removeSCLicenses(productEntryId, SCLicenses);
338 }
339
340
343 public List<SCLicense> getSCProductEntrySCLicenses(long productEntryId)
344 throws SystemException {
345 return scProductEntryPersistence.getSCLicenses(productEntryId);
346 }
347
348
351 public List<SCLicense> getSCProductEntrySCLicenses(long productEntryId,
352 int start, int end) throws SystemException {
353 return scProductEntryPersistence.getSCLicenses(productEntryId, start,
354 end);
355 }
356
357
360 public List<SCLicense> getSCProductEntrySCLicenses(long productEntryId,
361 int start, int end, OrderByComparator orderByComparator)
362 throws SystemException {
363 return scProductEntryPersistence.getSCLicenses(productEntryId, start,
364 end, orderByComparator);
365 }
366
367
370 public int getSCProductEntrySCLicensesCount(long productEntryId)
371 throws SystemException {
372 return scProductEntryPersistence.getSCLicensesSize(productEntryId);
373 }
374
375
378 public boolean hasSCProductEntrySCLicense(long productEntryId,
379 long licenseId) throws SystemException {
380 return scProductEntryPersistence.containsSCLicense(productEntryId,
381 licenseId);
382 }
383
384
387 public boolean hasSCProductEntrySCLicenses(long productEntryId)
388 throws SystemException {
389 return scProductEntryPersistence.containsSCLicenses(productEntryId);
390 }
391
392
395 public void setSCProductEntrySCLicenses(long productEntryId,
396 long[] licenseIds) throws SystemException {
397 scProductEntryPersistence.setSCLicenses(productEntryId, licenseIds);
398 }
399
400
405 public SCFrameworkVersionLocalService getSCFrameworkVersionLocalService() {
406 return scFrameworkVersionLocalService;
407 }
408
409
414 public void setSCFrameworkVersionLocalService(
415 SCFrameworkVersionLocalService scFrameworkVersionLocalService) {
416 this.scFrameworkVersionLocalService = scFrameworkVersionLocalService;
417 }
418
419
424 public SCFrameworkVersionService getSCFrameworkVersionService() {
425 return scFrameworkVersionService;
426 }
427
428
433 public void setSCFrameworkVersionService(
434 SCFrameworkVersionService scFrameworkVersionService) {
435 this.scFrameworkVersionService = scFrameworkVersionService;
436 }
437
438
443 public SCFrameworkVersionPersistence getSCFrameworkVersionPersistence() {
444 return scFrameworkVersionPersistence;
445 }
446
447
452 public void setSCFrameworkVersionPersistence(
453 SCFrameworkVersionPersistence scFrameworkVersionPersistence) {
454 this.scFrameworkVersionPersistence = scFrameworkVersionPersistence;
455 }
456
457
462 public SCLicenseLocalService getSCLicenseLocalService() {
463 return scLicenseLocalService;
464 }
465
466
471 public void setSCLicenseLocalService(
472 SCLicenseLocalService scLicenseLocalService) {
473 this.scLicenseLocalService = scLicenseLocalService;
474 }
475
476
481 public SCLicenseService getSCLicenseService() {
482 return scLicenseService;
483 }
484
485
490 public void setSCLicenseService(SCLicenseService scLicenseService) {
491 this.scLicenseService = scLicenseService;
492 }
493
494
499 public SCLicensePersistence getSCLicensePersistence() {
500 return scLicensePersistence;
501 }
502
503
508 public void setSCLicensePersistence(
509 SCLicensePersistence scLicensePersistence) {
510 this.scLicensePersistence = scLicensePersistence;
511 }
512
513
518 public SCProductEntryLocalService getSCProductEntryLocalService() {
519 return scProductEntryLocalService;
520 }
521
522
527 public void setSCProductEntryLocalService(
528 SCProductEntryLocalService scProductEntryLocalService) {
529 this.scProductEntryLocalService = scProductEntryLocalService;
530 }
531
532
537 public SCProductEntryService getSCProductEntryService() {
538 return scProductEntryService;
539 }
540
541
546 public void setSCProductEntryService(
547 SCProductEntryService scProductEntryService) {
548 this.scProductEntryService = scProductEntryService;
549 }
550
551
556 public SCProductEntryPersistence getSCProductEntryPersistence() {
557 return scProductEntryPersistence;
558 }
559
560
565 public void setSCProductEntryPersistence(
566 SCProductEntryPersistence scProductEntryPersistence) {
567 this.scProductEntryPersistence = scProductEntryPersistence;
568 }
569
570
575 public SCProductScreenshotLocalService getSCProductScreenshotLocalService() {
576 return scProductScreenshotLocalService;
577 }
578
579
584 public void setSCProductScreenshotLocalService(
585 SCProductScreenshotLocalService scProductScreenshotLocalService) {
586 this.scProductScreenshotLocalService = scProductScreenshotLocalService;
587 }
588
589
594 public SCProductScreenshotPersistence getSCProductScreenshotPersistence() {
595 return scProductScreenshotPersistence;
596 }
597
598
603 public void setSCProductScreenshotPersistence(
604 SCProductScreenshotPersistence scProductScreenshotPersistence) {
605 this.scProductScreenshotPersistence = scProductScreenshotPersistence;
606 }
607
608
613 public SCProductVersionLocalService getSCProductVersionLocalService() {
614 return scProductVersionLocalService;
615 }
616
617
622 public void setSCProductVersionLocalService(
623 SCProductVersionLocalService scProductVersionLocalService) {
624 this.scProductVersionLocalService = scProductVersionLocalService;
625 }
626
627
632 public SCProductVersionService getSCProductVersionService() {
633 return scProductVersionService;
634 }
635
636
641 public void setSCProductVersionService(
642 SCProductVersionService scProductVersionService) {
643 this.scProductVersionService = scProductVersionService;
644 }
645
646
651 public SCProductVersionPersistence getSCProductVersionPersistence() {
652 return scProductVersionPersistence;
653 }
654
655
660 public void setSCProductVersionPersistence(
661 SCProductVersionPersistence scProductVersionPersistence) {
662 this.scProductVersionPersistence = scProductVersionPersistence;
663 }
664
665
670 public CounterLocalService getCounterLocalService() {
671 return counterLocalService;
672 }
673
674
679 public void setCounterLocalService(CounterLocalService counterLocalService) {
680 this.counterLocalService = counterLocalService;
681 }
682
683
688 public ResourceLocalService getResourceLocalService() {
689 return resourceLocalService;
690 }
691
692
697 public void setResourceLocalService(
698 ResourceLocalService resourceLocalService) {
699 this.resourceLocalService = resourceLocalService;
700 }
701
702
707 public UserLocalService getUserLocalService() {
708 return userLocalService;
709 }
710
711
716 public void setUserLocalService(UserLocalService userLocalService) {
717 this.userLocalService = userLocalService;
718 }
719
720
725 public UserService getUserService() {
726 return userService;
727 }
728
729
734 public void setUserService(UserService userService) {
735 this.userService = userService;
736 }
737
738
743 public UserPersistence getUserPersistence() {
744 return userPersistence;
745 }
746
747
752 public void setUserPersistence(UserPersistence userPersistence) {
753 this.userPersistence = userPersistence;
754 }
755
756
761 public UserFinder getUserFinder() {
762 return userFinder;
763 }
764
765
770 public void setUserFinder(UserFinder userFinder) {
771 this.userFinder = userFinder;
772 }
773
774 public void afterPropertiesSet() {
775 persistedModelLocalServiceRegistry.register("com.liferay.portlet.softwarecatalog.model.SCLicense",
776 scLicenseLocalService);
777 }
778
779 public void destroy() {
780 persistedModelLocalServiceRegistry.unregister(
781 "com.liferay.portlet.softwarecatalog.model.SCLicense");
782 }
783
784
789 public String getBeanIdentifier() {
790 return _beanIdentifier;
791 }
792
793
798 public void setBeanIdentifier(String beanIdentifier) {
799 _beanIdentifier = beanIdentifier;
800 }
801
802 protected Class<?> getModelClass() {
803 return SCLicense.class;
804 }
805
806 protected String getModelClassName() {
807 return SCLicense.class.getName();
808 }
809
810
815 protected void runSQL(String sql) throws SystemException {
816 try {
817 DataSource dataSource = scLicensePersistence.getDataSource();
818
819 SqlUpdate sqlUpdate = SqlUpdateFactoryUtil.getSqlUpdate(dataSource,
820 sql, new int[0]);
821
822 sqlUpdate.update();
823 }
824 catch (Exception e) {
825 throw new SystemException(e);
826 }
827 }
828
829 @BeanReference(type = SCFrameworkVersionLocalService.class)
830 protected SCFrameworkVersionLocalService scFrameworkVersionLocalService;
831 @BeanReference(type = SCFrameworkVersionService.class)
832 protected SCFrameworkVersionService scFrameworkVersionService;
833 @BeanReference(type = SCFrameworkVersionPersistence.class)
834 protected SCFrameworkVersionPersistence scFrameworkVersionPersistence;
835 @BeanReference(type = SCLicenseLocalService.class)
836 protected SCLicenseLocalService scLicenseLocalService;
837 @BeanReference(type = SCLicenseService.class)
838 protected SCLicenseService scLicenseService;
839 @BeanReference(type = SCLicensePersistence.class)
840 protected SCLicensePersistence scLicensePersistence;
841 @BeanReference(type = SCProductEntryLocalService.class)
842 protected SCProductEntryLocalService scProductEntryLocalService;
843 @BeanReference(type = SCProductEntryService.class)
844 protected SCProductEntryService scProductEntryService;
845 @BeanReference(type = SCProductEntryPersistence.class)
846 protected SCProductEntryPersistence scProductEntryPersistence;
847 @BeanReference(type = SCProductScreenshotLocalService.class)
848 protected SCProductScreenshotLocalService scProductScreenshotLocalService;
849 @BeanReference(type = SCProductScreenshotPersistence.class)
850 protected SCProductScreenshotPersistence scProductScreenshotPersistence;
851 @BeanReference(type = SCProductVersionLocalService.class)
852 protected SCProductVersionLocalService scProductVersionLocalService;
853 @BeanReference(type = SCProductVersionService.class)
854 protected SCProductVersionService scProductVersionService;
855 @BeanReference(type = SCProductVersionPersistence.class)
856 protected SCProductVersionPersistence scProductVersionPersistence;
857 @BeanReference(type = CounterLocalService.class)
858 protected CounterLocalService counterLocalService;
859 @BeanReference(type = ResourceLocalService.class)
860 protected ResourceLocalService resourceLocalService;
861 @BeanReference(type = UserLocalService.class)
862 protected UserLocalService userLocalService;
863 @BeanReference(type = UserService.class)
864 protected UserService userService;
865 @BeanReference(type = UserPersistence.class)
866 protected UserPersistence userPersistence;
867 @BeanReference(type = UserFinder.class)
868 protected UserFinder userFinder;
869 @BeanReference(type = PersistedModelLocalServiceRegistry.class)
870 protected PersistedModelLocalServiceRegistry persistedModelLocalServiceRegistry;
871 private String _beanIdentifier;
872 }