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.ResourceService;
035 import com.liferay.portal.service.UserLocalService;
036 import com.liferay.portal.service.UserService;
037 import com.liferay.portal.service.persistence.ResourceFinder;
038 import com.liferay.portal.service.persistence.ResourcePersistence;
039 import com.liferay.portal.service.persistence.UserFinder;
040 import com.liferay.portal.service.persistence.UserPersistence;
041
042 import com.liferay.portlet.softwarecatalog.model.SCLicense;
043 import com.liferay.portlet.softwarecatalog.service.SCFrameworkVersionLocalService;
044 import com.liferay.portlet.softwarecatalog.service.SCFrameworkVersionService;
045 import com.liferay.portlet.softwarecatalog.service.SCLicenseLocalService;
046 import com.liferay.portlet.softwarecatalog.service.SCLicenseService;
047 import com.liferay.portlet.softwarecatalog.service.SCProductEntryLocalService;
048 import com.liferay.portlet.softwarecatalog.service.SCProductEntryService;
049 import com.liferay.portlet.softwarecatalog.service.SCProductScreenshotLocalService;
050 import com.liferay.portlet.softwarecatalog.service.SCProductVersionLocalService;
051 import com.liferay.portlet.softwarecatalog.service.SCProductVersionService;
052 import com.liferay.portlet.softwarecatalog.service.persistence.SCFrameworkVersionPersistence;
053 import com.liferay.portlet.softwarecatalog.service.persistence.SCLicensePersistence;
054 import com.liferay.portlet.softwarecatalog.service.persistence.SCProductEntryPersistence;
055 import com.liferay.portlet.softwarecatalog.service.persistence.SCProductScreenshotPersistence;
056 import com.liferay.portlet.softwarecatalog.service.persistence.SCProductVersionPersistence;
057
058 import java.io.Serializable;
059
060 import java.util.List;
061
062 import javax.sql.DataSource;
063
064
076 public abstract class SCLicenseLocalServiceBaseImpl extends BaseLocalServiceImpl
077 implements SCLicenseLocalService, IdentifiableBean {
078
083
084
091 @Indexable(type = IndexableType.REINDEX)
092 public SCLicense addSCLicense(SCLicense scLicense)
093 throws SystemException {
094 scLicense.setNew(true);
095
096 return scLicensePersistence.update(scLicense, false);
097 }
098
099
105 public SCLicense createSCLicense(long licenseId) {
106 return scLicensePersistence.create(licenseId);
107 }
108
109
117 @Indexable(type = IndexableType.DELETE)
118 public SCLicense deleteSCLicense(long licenseId)
119 throws PortalException, SystemException {
120 return scLicensePersistence.remove(licenseId);
121 }
122
123
130 @Indexable(type = IndexableType.DELETE)
131 public SCLicense deleteSCLicense(SCLicense scLicense)
132 throws SystemException {
133 return scLicensePersistence.remove(scLicense);
134 }
135
136 public DynamicQuery dynamicQuery() {
137 Class<?> clazz = getClass();
138
139 return DynamicQueryFactoryUtil.forClass(SCLicense.class,
140 clazz.getClassLoader());
141 }
142
143
150 @SuppressWarnings("rawtypes")
151 public List dynamicQuery(DynamicQuery dynamicQuery)
152 throws SystemException {
153 return scLicensePersistence.findWithDynamicQuery(dynamicQuery);
154 }
155
156
169 @SuppressWarnings("rawtypes")
170 public List dynamicQuery(DynamicQuery dynamicQuery, int start, int end)
171 throws SystemException {
172 return scLicensePersistence.findWithDynamicQuery(dynamicQuery, start,
173 end);
174 }
175
176
190 @SuppressWarnings("rawtypes")
191 public List dynamicQuery(DynamicQuery dynamicQuery, int start, int end,
192 OrderByComparator orderByComparator) throws SystemException {
193 return scLicensePersistence.findWithDynamicQuery(dynamicQuery, start,
194 end, orderByComparator);
195 }
196
197
204 public long dynamicQueryCount(DynamicQuery dynamicQuery)
205 throws SystemException {
206 return scLicensePersistence.countWithDynamicQuery(dynamicQuery);
207 }
208
209 public SCLicense fetchSCLicense(long licenseId) throws SystemException {
210 return scLicensePersistence.fetchByPrimaryKey(licenseId);
211 }
212
213
221 public SCLicense getSCLicense(long licenseId)
222 throws PortalException, SystemException {
223 return scLicensePersistence.findByPrimaryKey(licenseId);
224 }
225
226 public PersistedModel getPersistedModel(Serializable primaryKeyObj)
227 throws PortalException, SystemException {
228 return scLicensePersistence.findByPrimaryKey(primaryKeyObj);
229 }
230
231
243 public List<SCLicense> getSCLicenses(int start, int end)
244 throws SystemException {
245 return scLicensePersistence.findAll(start, end);
246 }
247
248
254 public int getSCLicensesCount() throws SystemException {
255 return scLicensePersistence.countAll();
256 }
257
258
265 @Indexable(type = IndexableType.REINDEX)
266 public SCLicense updateSCLicense(SCLicense scLicense)
267 throws SystemException {
268 return updateSCLicense(scLicense, true);
269 }
270
271
279 @Indexable(type = IndexableType.REINDEX)
280 public SCLicense updateSCLicense(SCLicense scLicense, boolean merge)
281 throws SystemException {
282 scLicense.setNew(false);
283
284 return scLicensePersistence.update(scLicense, merge);
285 }
286
287
290 public void addSCProductEntrySCLicense(long productEntryId, long licenseId)
291 throws SystemException {
292 scProductEntryPersistence.addSCLicense(productEntryId, licenseId);
293 }
294
295
298 public void addSCProductEntrySCLicense(long productEntryId,
299 SCLicense scLicense) throws SystemException {
300 scProductEntryPersistence.addSCLicense(productEntryId, scLicense);
301 }
302
303
306 public void addSCProductEntrySCLicenses(long productEntryId,
307 long[] licenseIds) throws SystemException {
308 scProductEntryPersistence.addSCLicenses(productEntryId, licenseIds);
309 }
310
311
314 public void addSCProductEntrySCLicenses(long productEntryId,
315 List<SCLicense> SCLicenses) throws SystemException {
316 scProductEntryPersistence.addSCLicenses(productEntryId, SCLicenses);
317 }
318
319
322 public void clearSCProductEntrySCLicenses(long productEntryId)
323 throws SystemException {
324 scProductEntryPersistence.clearSCLicenses(productEntryId);
325 }
326
327
330 public void deleteSCProductEntrySCLicense(long productEntryId,
331 long licenseId) throws SystemException {
332 scProductEntryPersistence.removeSCLicense(productEntryId, licenseId);
333 }
334
335
338 public void deleteSCProductEntrySCLicense(long productEntryId,
339 SCLicense scLicense) throws SystemException {
340 scProductEntryPersistence.removeSCLicense(productEntryId, scLicense);
341 }
342
343
346 public void deleteSCProductEntrySCLicenses(long productEntryId,
347 long[] licenseIds) throws SystemException {
348 scProductEntryPersistence.removeSCLicenses(productEntryId, licenseIds);
349 }
350
351
354 public void deleteSCProductEntrySCLicenses(long productEntryId,
355 List<SCLicense> SCLicenses) throws SystemException {
356 scProductEntryPersistence.removeSCLicenses(productEntryId, SCLicenses);
357 }
358
359
362 public List<SCLicense> getSCProductEntrySCLicenses(long productEntryId)
363 throws SystemException {
364 return scProductEntryPersistence.getSCLicenses(productEntryId);
365 }
366
367
370 public List<SCLicense> getSCProductEntrySCLicenses(long productEntryId,
371 int start, int end) throws SystemException {
372 return scProductEntryPersistence.getSCLicenses(productEntryId, start,
373 end);
374 }
375
376
379 public List<SCLicense> getSCProductEntrySCLicenses(long productEntryId,
380 int start, int end, OrderByComparator orderByComparator)
381 throws SystemException {
382 return scProductEntryPersistence.getSCLicenses(productEntryId, start,
383 end, orderByComparator);
384 }
385
386
389 public int getSCProductEntrySCLicensesCount(long productEntryId)
390 throws SystemException {
391 return scProductEntryPersistence.getSCLicensesSize(productEntryId);
392 }
393
394
397 public boolean hasSCProductEntrySCLicense(long productEntryId,
398 long licenseId) throws SystemException {
399 return scProductEntryPersistence.containsSCLicense(productEntryId,
400 licenseId);
401 }
402
403
406 public boolean hasSCProductEntrySCLicenses(long productEntryId)
407 throws SystemException {
408 return scProductEntryPersistence.containsSCLicenses(productEntryId);
409 }
410
411
414 public void setSCProductEntrySCLicenses(long productEntryId,
415 long[] licenseIds) throws SystemException {
416 scProductEntryPersistence.setSCLicenses(productEntryId, licenseIds);
417 }
418
419
424 public SCFrameworkVersionLocalService getSCFrameworkVersionLocalService() {
425 return scFrameworkVersionLocalService;
426 }
427
428
433 public void setSCFrameworkVersionLocalService(
434 SCFrameworkVersionLocalService scFrameworkVersionLocalService) {
435 this.scFrameworkVersionLocalService = scFrameworkVersionLocalService;
436 }
437
438
443 public SCFrameworkVersionService getSCFrameworkVersionService() {
444 return scFrameworkVersionService;
445 }
446
447
452 public void setSCFrameworkVersionService(
453 SCFrameworkVersionService scFrameworkVersionService) {
454 this.scFrameworkVersionService = scFrameworkVersionService;
455 }
456
457
462 public SCFrameworkVersionPersistence getSCFrameworkVersionPersistence() {
463 return scFrameworkVersionPersistence;
464 }
465
466
471 public void setSCFrameworkVersionPersistence(
472 SCFrameworkVersionPersistence scFrameworkVersionPersistence) {
473 this.scFrameworkVersionPersistence = scFrameworkVersionPersistence;
474 }
475
476
481 public SCLicenseLocalService getSCLicenseLocalService() {
482 return scLicenseLocalService;
483 }
484
485
490 public void setSCLicenseLocalService(
491 SCLicenseLocalService scLicenseLocalService) {
492 this.scLicenseLocalService = scLicenseLocalService;
493 }
494
495
500 public SCLicenseService getSCLicenseService() {
501 return scLicenseService;
502 }
503
504
509 public void setSCLicenseService(SCLicenseService scLicenseService) {
510 this.scLicenseService = scLicenseService;
511 }
512
513
518 public SCLicensePersistence getSCLicensePersistence() {
519 return scLicensePersistence;
520 }
521
522
527 public void setSCLicensePersistence(
528 SCLicensePersistence scLicensePersistence) {
529 this.scLicensePersistence = scLicensePersistence;
530 }
531
532
537 public SCProductEntryLocalService getSCProductEntryLocalService() {
538 return scProductEntryLocalService;
539 }
540
541
546 public void setSCProductEntryLocalService(
547 SCProductEntryLocalService scProductEntryLocalService) {
548 this.scProductEntryLocalService = scProductEntryLocalService;
549 }
550
551
556 public SCProductEntryService getSCProductEntryService() {
557 return scProductEntryService;
558 }
559
560
565 public void setSCProductEntryService(
566 SCProductEntryService scProductEntryService) {
567 this.scProductEntryService = scProductEntryService;
568 }
569
570
575 public SCProductEntryPersistence getSCProductEntryPersistence() {
576 return scProductEntryPersistence;
577 }
578
579
584 public void setSCProductEntryPersistence(
585 SCProductEntryPersistence scProductEntryPersistence) {
586 this.scProductEntryPersistence = scProductEntryPersistence;
587 }
588
589
594 public SCProductScreenshotLocalService getSCProductScreenshotLocalService() {
595 return scProductScreenshotLocalService;
596 }
597
598
603 public void setSCProductScreenshotLocalService(
604 SCProductScreenshotLocalService scProductScreenshotLocalService) {
605 this.scProductScreenshotLocalService = scProductScreenshotLocalService;
606 }
607
608
613 public SCProductScreenshotPersistence getSCProductScreenshotPersistence() {
614 return scProductScreenshotPersistence;
615 }
616
617
622 public void setSCProductScreenshotPersistence(
623 SCProductScreenshotPersistence scProductScreenshotPersistence) {
624 this.scProductScreenshotPersistence = scProductScreenshotPersistence;
625 }
626
627
632 public SCProductVersionLocalService getSCProductVersionLocalService() {
633 return scProductVersionLocalService;
634 }
635
636
641 public void setSCProductVersionLocalService(
642 SCProductVersionLocalService scProductVersionLocalService) {
643 this.scProductVersionLocalService = scProductVersionLocalService;
644 }
645
646
651 public SCProductVersionService getSCProductVersionService() {
652 return scProductVersionService;
653 }
654
655
660 public void setSCProductVersionService(
661 SCProductVersionService scProductVersionService) {
662 this.scProductVersionService = scProductVersionService;
663 }
664
665
670 public SCProductVersionPersistence getSCProductVersionPersistence() {
671 return scProductVersionPersistence;
672 }
673
674
679 public void setSCProductVersionPersistence(
680 SCProductVersionPersistence scProductVersionPersistence) {
681 this.scProductVersionPersistence = scProductVersionPersistence;
682 }
683
684
689 public CounterLocalService getCounterLocalService() {
690 return counterLocalService;
691 }
692
693
698 public void setCounterLocalService(CounterLocalService counterLocalService) {
699 this.counterLocalService = counterLocalService;
700 }
701
702
707 public ResourceLocalService getResourceLocalService() {
708 return resourceLocalService;
709 }
710
711
716 public void setResourceLocalService(
717 ResourceLocalService resourceLocalService) {
718 this.resourceLocalService = resourceLocalService;
719 }
720
721
726 public ResourceService getResourceService() {
727 return resourceService;
728 }
729
730
735 public void setResourceService(ResourceService resourceService) {
736 this.resourceService = resourceService;
737 }
738
739
744 public ResourcePersistence getResourcePersistence() {
745 return resourcePersistence;
746 }
747
748
753 public void setResourcePersistence(ResourcePersistence resourcePersistence) {
754 this.resourcePersistence = resourcePersistence;
755 }
756
757
762 public ResourceFinder getResourceFinder() {
763 return resourceFinder;
764 }
765
766
771 public void setResourceFinder(ResourceFinder resourceFinder) {
772 this.resourceFinder = resourceFinder;
773 }
774
775
780 public UserLocalService getUserLocalService() {
781 return userLocalService;
782 }
783
784
789 public void setUserLocalService(UserLocalService userLocalService) {
790 this.userLocalService = userLocalService;
791 }
792
793
798 public UserService getUserService() {
799 return userService;
800 }
801
802
807 public void setUserService(UserService userService) {
808 this.userService = userService;
809 }
810
811
816 public UserPersistence getUserPersistence() {
817 return userPersistence;
818 }
819
820
825 public void setUserPersistence(UserPersistence userPersistence) {
826 this.userPersistence = userPersistence;
827 }
828
829
834 public UserFinder getUserFinder() {
835 return userFinder;
836 }
837
838
843 public void setUserFinder(UserFinder userFinder) {
844 this.userFinder = userFinder;
845 }
846
847 public void afterPropertiesSet() {
848 persistedModelLocalServiceRegistry.register("com.liferay.portlet.softwarecatalog.model.SCLicense",
849 scLicenseLocalService);
850 }
851
852 public void destroy() {
853 persistedModelLocalServiceRegistry.unregister(
854 "com.liferay.portlet.softwarecatalog.model.SCLicense");
855 }
856
857
862 public String getBeanIdentifier() {
863 return _beanIdentifier;
864 }
865
866
871 public void setBeanIdentifier(String beanIdentifier) {
872 _beanIdentifier = beanIdentifier;
873 }
874
875 protected Class<?> getModelClass() {
876 return SCLicense.class;
877 }
878
879 protected String getModelClassName() {
880 return SCLicense.class.getName();
881 }
882
883
888 protected void runSQL(String sql) throws SystemException {
889 try {
890 DataSource dataSource = scLicensePersistence.getDataSource();
891
892 SqlUpdate sqlUpdate = SqlUpdateFactoryUtil.getSqlUpdate(dataSource,
893 sql, new int[0]);
894
895 sqlUpdate.update();
896 }
897 catch (Exception e) {
898 throw new SystemException(e);
899 }
900 }
901
902 @BeanReference(type = SCFrameworkVersionLocalService.class)
903 protected SCFrameworkVersionLocalService scFrameworkVersionLocalService;
904 @BeanReference(type = SCFrameworkVersionService.class)
905 protected SCFrameworkVersionService scFrameworkVersionService;
906 @BeanReference(type = SCFrameworkVersionPersistence.class)
907 protected SCFrameworkVersionPersistence scFrameworkVersionPersistence;
908 @BeanReference(type = SCLicenseLocalService.class)
909 protected SCLicenseLocalService scLicenseLocalService;
910 @BeanReference(type = SCLicenseService.class)
911 protected SCLicenseService scLicenseService;
912 @BeanReference(type = SCLicensePersistence.class)
913 protected SCLicensePersistence scLicensePersistence;
914 @BeanReference(type = SCProductEntryLocalService.class)
915 protected SCProductEntryLocalService scProductEntryLocalService;
916 @BeanReference(type = SCProductEntryService.class)
917 protected SCProductEntryService scProductEntryService;
918 @BeanReference(type = SCProductEntryPersistence.class)
919 protected SCProductEntryPersistence scProductEntryPersistence;
920 @BeanReference(type = SCProductScreenshotLocalService.class)
921 protected SCProductScreenshotLocalService scProductScreenshotLocalService;
922 @BeanReference(type = SCProductScreenshotPersistence.class)
923 protected SCProductScreenshotPersistence scProductScreenshotPersistence;
924 @BeanReference(type = SCProductVersionLocalService.class)
925 protected SCProductVersionLocalService scProductVersionLocalService;
926 @BeanReference(type = SCProductVersionService.class)
927 protected SCProductVersionService scProductVersionService;
928 @BeanReference(type = SCProductVersionPersistence.class)
929 protected SCProductVersionPersistence scProductVersionPersistence;
930 @BeanReference(type = CounterLocalService.class)
931 protected CounterLocalService counterLocalService;
932 @BeanReference(type = ResourceLocalService.class)
933 protected ResourceLocalService resourceLocalService;
934 @BeanReference(type = ResourceService.class)
935 protected ResourceService resourceService;
936 @BeanReference(type = ResourcePersistence.class)
937 protected ResourcePersistence resourcePersistence;
938 @BeanReference(type = ResourceFinder.class)
939 protected ResourceFinder resourceFinder;
940 @BeanReference(type = UserLocalService.class)
941 protected UserLocalService userLocalService;
942 @BeanReference(type = UserService.class)
943 protected UserService userService;
944 @BeanReference(type = UserPersistence.class)
945 protected UserPersistence userPersistence;
946 @BeanReference(type = UserFinder.class)
947 protected UserFinder userFinder;
948 @BeanReference(type = PersistedModelLocalServiceRegistry.class)
949 protected PersistedModelLocalServiceRegistry persistedModelLocalServiceRegistry;
950 private String _beanIdentifier;
951 }