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.SCProductVersion;
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 SCProductVersionLocalServiceBaseImpl
077 extends BaseLocalServiceImpl implements SCProductVersionLocalService,
078 IdentifiableBean {
079
084
085
092 @Indexable(type = IndexableType.REINDEX)
093 public SCProductVersion addSCProductVersion(
094 SCProductVersion scProductVersion) throws SystemException {
095 scProductVersion.setNew(true);
096
097 return scProductVersionPersistence.update(scProductVersion, false);
098 }
099
100
106 public SCProductVersion createSCProductVersion(long productVersionId) {
107 return scProductVersionPersistence.create(productVersionId);
108 }
109
110
118 @Indexable(type = IndexableType.DELETE)
119 public SCProductVersion deleteSCProductVersion(long productVersionId)
120 throws PortalException, SystemException {
121 return scProductVersionPersistence.remove(productVersionId);
122 }
123
124
131 @Indexable(type = IndexableType.DELETE)
132 public SCProductVersion deleteSCProductVersion(
133 SCProductVersion scProductVersion) throws SystemException {
134 return scProductVersionPersistence.remove(scProductVersion);
135 }
136
137 public DynamicQuery dynamicQuery() {
138 Class<?> clazz = getClass();
139
140 return DynamicQueryFactoryUtil.forClass(SCProductVersion.class,
141 clazz.getClassLoader());
142 }
143
144
151 @SuppressWarnings("rawtypes")
152 public List dynamicQuery(DynamicQuery dynamicQuery)
153 throws SystemException {
154 return scProductVersionPersistence.findWithDynamicQuery(dynamicQuery);
155 }
156
157
170 @SuppressWarnings("rawtypes")
171 public List dynamicQuery(DynamicQuery dynamicQuery, int start, int end)
172 throws SystemException {
173 return scProductVersionPersistence.findWithDynamicQuery(dynamicQuery,
174 start, end);
175 }
176
177
191 @SuppressWarnings("rawtypes")
192 public List dynamicQuery(DynamicQuery dynamicQuery, int start, int end,
193 OrderByComparator orderByComparator) throws SystemException {
194 return scProductVersionPersistence.findWithDynamicQuery(dynamicQuery,
195 start, end, orderByComparator);
196 }
197
198
205 public long dynamicQueryCount(DynamicQuery dynamicQuery)
206 throws SystemException {
207 return scProductVersionPersistence.countWithDynamicQuery(dynamicQuery);
208 }
209
210 public SCProductVersion fetchSCProductVersion(long productVersionId)
211 throws SystemException {
212 return scProductVersionPersistence.fetchByPrimaryKey(productVersionId);
213 }
214
215
223 public SCProductVersion getSCProductVersion(long productVersionId)
224 throws PortalException, SystemException {
225 return scProductVersionPersistence.findByPrimaryKey(productVersionId);
226 }
227
228 public PersistedModel getPersistedModel(Serializable primaryKeyObj)
229 throws PortalException, SystemException {
230 return scProductVersionPersistence.findByPrimaryKey(primaryKeyObj);
231 }
232
233
245 public List<SCProductVersion> getSCProductVersions(int start, int end)
246 throws SystemException {
247 return scProductVersionPersistence.findAll(start, end);
248 }
249
250
256 public int getSCProductVersionsCount() throws SystemException {
257 return scProductVersionPersistence.countAll();
258 }
259
260
267 @Indexable(type = IndexableType.REINDEX)
268 public SCProductVersion updateSCProductVersion(
269 SCProductVersion scProductVersion) throws SystemException {
270 return updateSCProductVersion(scProductVersion, true);
271 }
272
273
281 @Indexable(type = IndexableType.REINDEX)
282 public SCProductVersion updateSCProductVersion(
283 SCProductVersion scProductVersion, boolean merge)
284 throws SystemException {
285 scProductVersion.setNew(false);
286
287 return scProductVersionPersistence.update(scProductVersion, merge);
288 }
289
290
293 public void addSCFrameworkVersionSCProductVersion(long frameworkVersionId,
294 long productVersionId) throws SystemException {
295 scFrameworkVersionPersistence.addSCProductVersion(frameworkVersionId,
296 productVersionId);
297 }
298
299
302 public void addSCFrameworkVersionSCProductVersion(long frameworkVersionId,
303 SCProductVersion scProductVersion) throws SystemException {
304 scFrameworkVersionPersistence.addSCProductVersion(frameworkVersionId,
305 scProductVersion);
306 }
307
308
311 public void addSCFrameworkVersionSCProductVersions(
312 long frameworkVersionId, long[] productVersionIds)
313 throws SystemException {
314 scFrameworkVersionPersistence.addSCProductVersions(frameworkVersionId,
315 productVersionIds);
316 }
317
318
321 public void addSCFrameworkVersionSCProductVersions(
322 long frameworkVersionId, List<SCProductVersion> SCProductVersions)
323 throws SystemException {
324 scFrameworkVersionPersistence.addSCProductVersions(frameworkVersionId,
325 SCProductVersions);
326 }
327
328
331 public void clearSCFrameworkVersionSCProductVersions(
332 long frameworkVersionId) throws SystemException {
333 scFrameworkVersionPersistence.clearSCProductVersions(frameworkVersionId);
334 }
335
336
339 public void deleteSCFrameworkVersionSCProductVersion(
340 long frameworkVersionId, long productVersionId)
341 throws SystemException {
342 scFrameworkVersionPersistence.removeSCProductVersion(frameworkVersionId,
343 productVersionId);
344 }
345
346
349 public void deleteSCFrameworkVersionSCProductVersion(
350 long frameworkVersionId, SCProductVersion scProductVersion)
351 throws SystemException {
352 scFrameworkVersionPersistence.removeSCProductVersion(frameworkVersionId,
353 scProductVersion);
354 }
355
356
359 public void deleteSCFrameworkVersionSCProductVersions(
360 long frameworkVersionId, long[] productVersionIds)
361 throws SystemException {
362 scFrameworkVersionPersistence.removeSCProductVersions(frameworkVersionId,
363 productVersionIds);
364 }
365
366
369 public void deleteSCFrameworkVersionSCProductVersions(
370 long frameworkVersionId, List<SCProductVersion> SCProductVersions)
371 throws SystemException {
372 scFrameworkVersionPersistence.removeSCProductVersions(frameworkVersionId,
373 SCProductVersions);
374 }
375
376
379 public List<SCProductVersion> getSCFrameworkVersionSCProductVersions(
380 long frameworkVersionId) throws SystemException {
381 return scFrameworkVersionPersistence.getSCProductVersions(frameworkVersionId);
382 }
383
384
387 public List<SCProductVersion> getSCFrameworkVersionSCProductVersions(
388 long frameworkVersionId, int start, int end) throws SystemException {
389 return scFrameworkVersionPersistence.getSCProductVersions(frameworkVersionId,
390 start, end);
391 }
392
393
396 public List<SCProductVersion> getSCFrameworkVersionSCProductVersions(
397 long frameworkVersionId, int start, int end,
398 OrderByComparator orderByComparator) throws SystemException {
399 return scFrameworkVersionPersistence.getSCProductVersions(frameworkVersionId,
400 start, end, orderByComparator);
401 }
402
403
406 public int getSCFrameworkVersionSCProductVersionsCount(
407 long frameworkVersionId) throws SystemException {
408 return scFrameworkVersionPersistence.getSCProductVersionsSize(frameworkVersionId);
409 }
410
411
414 public boolean hasSCFrameworkVersionSCProductVersion(
415 long frameworkVersionId, long productVersionId)
416 throws SystemException {
417 return scFrameworkVersionPersistence.containsSCProductVersion(frameworkVersionId,
418 productVersionId);
419 }
420
421
424 public boolean hasSCFrameworkVersionSCProductVersions(
425 long frameworkVersionId) throws SystemException {
426 return scFrameworkVersionPersistence.containsSCProductVersions(frameworkVersionId);
427 }
428
429
432 public void setSCFrameworkVersionSCProductVersions(
433 long frameworkVersionId, long[] productVersionIds)
434 throws SystemException {
435 scFrameworkVersionPersistence.setSCProductVersions(frameworkVersionId,
436 productVersionIds);
437 }
438
439
444 public SCFrameworkVersionLocalService getSCFrameworkVersionLocalService() {
445 return scFrameworkVersionLocalService;
446 }
447
448
453 public void setSCFrameworkVersionLocalService(
454 SCFrameworkVersionLocalService scFrameworkVersionLocalService) {
455 this.scFrameworkVersionLocalService = scFrameworkVersionLocalService;
456 }
457
458
463 public SCFrameworkVersionService getSCFrameworkVersionService() {
464 return scFrameworkVersionService;
465 }
466
467
472 public void setSCFrameworkVersionService(
473 SCFrameworkVersionService scFrameworkVersionService) {
474 this.scFrameworkVersionService = scFrameworkVersionService;
475 }
476
477
482 public SCFrameworkVersionPersistence getSCFrameworkVersionPersistence() {
483 return scFrameworkVersionPersistence;
484 }
485
486
491 public void setSCFrameworkVersionPersistence(
492 SCFrameworkVersionPersistence scFrameworkVersionPersistence) {
493 this.scFrameworkVersionPersistence = scFrameworkVersionPersistence;
494 }
495
496
501 public SCLicenseLocalService getSCLicenseLocalService() {
502 return scLicenseLocalService;
503 }
504
505
510 public void setSCLicenseLocalService(
511 SCLicenseLocalService scLicenseLocalService) {
512 this.scLicenseLocalService = scLicenseLocalService;
513 }
514
515
520 public SCLicenseService getSCLicenseService() {
521 return scLicenseService;
522 }
523
524
529 public void setSCLicenseService(SCLicenseService scLicenseService) {
530 this.scLicenseService = scLicenseService;
531 }
532
533
538 public SCLicensePersistence getSCLicensePersistence() {
539 return scLicensePersistence;
540 }
541
542
547 public void setSCLicensePersistence(
548 SCLicensePersistence scLicensePersistence) {
549 this.scLicensePersistence = scLicensePersistence;
550 }
551
552
557 public SCProductEntryLocalService getSCProductEntryLocalService() {
558 return scProductEntryLocalService;
559 }
560
561
566 public void setSCProductEntryLocalService(
567 SCProductEntryLocalService scProductEntryLocalService) {
568 this.scProductEntryLocalService = scProductEntryLocalService;
569 }
570
571
576 public SCProductEntryService getSCProductEntryService() {
577 return scProductEntryService;
578 }
579
580
585 public void setSCProductEntryService(
586 SCProductEntryService scProductEntryService) {
587 this.scProductEntryService = scProductEntryService;
588 }
589
590
595 public SCProductEntryPersistence getSCProductEntryPersistence() {
596 return scProductEntryPersistence;
597 }
598
599
604 public void setSCProductEntryPersistence(
605 SCProductEntryPersistence scProductEntryPersistence) {
606 this.scProductEntryPersistence = scProductEntryPersistence;
607 }
608
609
614 public SCProductScreenshotLocalService getSCProductScreenshotLocalService() {
615 return scProductScreenshotLocalService;
616 }
617
618
623 public void setSCProductScreenshotLocalService(
624 SCProductScreenshotLocalService scProductScreenshotLocalService) {
625 this.scProductScreenshotLocalService = scProductScreenshotLocalService;
626 }
627
628
633 public SCProductScreenshotPersistence getSCProductScreenshotPersistence() {
634 return scProductScreenshotPersistence;
635 }
636
637
642 public void setSCProductScreenshotPersistence(
643 SCProductScreenshotPersistence scProductScreenshotPersistence) {
644 this.scProductScreenshotPersistence = scProductScreenshotPersistence;
645 }
646
647
652 public SCProductVersionLocalService getSCProductVersionLocalService() {
653 return scProductVersionLocalService;
654 }
655
656
661 public void setSCProductVersionLocalService(
662 SCProductVersionLocalService scProductVersionLocalService) {
663 this.scProductVersionLocalService = scProductVersionLocalService;
664 }
665
666
671 public SCProductVersionService getSCProductVersionService() {
672 return scProductVersionService;
673 }
674
675
680 public void setSCProductVersionService(
681 SCProductVersionService scProductVersionService) {
682 this.scProductVersionService = scProductVersionService;
683 }
684
685
690 public SCProductVersionPersistence getSCProductVersionPersistence() {
691 return scProductVersionPersistence;
692 }
693
694
699 public void setSCProductVersionPersistence(
700 SCProductVersionPersistence scProductVersionPersistence) {
701 this.scProductVersionPersistence = scProductVersionPersistence;
702 }
703
704
709 public CounterLocalService getCounterLocalService() {
710 return counterLocalService;
711 }
712
713
718 public void setCounterLocalService(CounterLocalService counterLocalService) {
719 this.counterLocalService = counterLocalService;
720 }
721
722
727 public ResourceLocalService getResourceLocalService() {
728 return resourceLocalService;
729 }
730
731
736 public void setResourceLocalService(
737 ResourceLocalService resourceLocalService) {
738 this.resourceLocalService = resourceLocalService;
739 }
740
741
746 public ResourceService getResourceService() {
747 return resourceService;
748 }
749
750
755 public void setResourceService(ResourceService resourceService) {
756 this.resourceService = resourceService;
757 }
758
759
764 public ResourcePersistence getResourcePersistence() {
765 return resourcePersistence;
766 }
767
768
773 public void setResourcePersistence(ResourcePersistence resourcePersistence) {
774 this.resourcePersistence = resourcePersistence;
775 }
776
777
782 public ResourceFinder getResourceFinder() {
783 return resourceFinder;
784 }
785
786
791 public void setResourceFinder(ResourceFinder resourceFinder) {
792 this.resourceFinder = resourceFinder;
793 }
794
795
800 public UserLocalService getUserLocalService() {
801 return userLocalService;
802 }
803
804
809 public void setUserLocalService(UserLocalService userLocalService) {
810 this.userLocalService = userLocalService;
811 }
812
813
818 public UserService getUserService() {
819 return userService;
820 }
821
822
827 public void setUserService(UserService userService) {
828 this.userService = userService;
829 }
830
831
836 public UserPersistence getUserPersistence() {
837 return userPersistence;
838 }
839
840
845 public void setUserPersistence(UserPersistence userPersistence) {
846 this.userPersistence = userPersistence;
847 }
848
849
854 public UserFinder getUserFinder() {
855 return userFinder;
856 }
857
858
863 public void setUserFinder(UserFinder userFinder) {
864 this.userFinder = userFinder;
865 }
866
867 public void afterPropertiesSet() {
868 persistedModelLocalServiceRegistry.register("com.liferay.portlet.softwarecatalog.model.SCProductVersion",
869 scProductVersionLocalService);
870 }
871
872 public void destroy() {
873 persistedModelLocalServiceRegistry.unregister(
874 "com.liferay.portlet.softwarecatalog.model.SCProductVersion");
875 }
876
877
882 public String getBeanIdentifier() {
883 return _beanIdentifier;
884 }
885
886
891 public void setBeanIdentifier(String beanIdentifier) {
892 _beanIdentifier = beanIdentifier;
893 }
894
895 protected Class<?> getModelClass() {
896 return SCProductVersion.class;
897 }
898
899 protected String getModelClassName() {
900 return SCProductVersion.class.getName();
901 }
902
903
908 protected void runSQL(String sql) throws SystemException {
909 try {
910 DataSource dataSource = scProductVersionPersistence.getDataSource();
911
912 SqlUpdate sqlUpdate = SqlUpdateFactoryUtil.getSqlUpdate(dataSource,
913 sql, new int[0]);
914
915 sqlUpdate.update();
916 }
917 catch (Exception e) {
918 throw new SystemException(e);
919 }
920 }
921
922 @BeanReference(type = SCFrameworkVersionLocalService.class)
923 protected SCFrameworkVersionLocalService scFrameworkVersionLocalService;
924 @BeanReference(type = SCFrameworkVersionService.class)
925 protected SCFrameworkVersionService scFrameworkVersionService;
926 @BeanReference(type = SCFrameworkVersionPersistence.class)
927 protected SCFrameworkVersionPersistence scFrameworkVersionPersistence;
928 @BeanReference(type = SCLicenseLocalService.class)
929 protected SCLicenseLocalService scLicenseLocalService;
930 @BeanReference(type = SCLicenseService.class)
931 protected SCLicenseService scLicenseService;
932 @BeanReference(type = SCLicensePersistence.class)
933 protected SCLicensePersistence scLicensePersistence;
934 @BeanReference(type = SCProductEntryLocalService.class)
935 protected SCProductEntryLocalService scProductEntryLocalService;
936 @BeanReference(type = SCProductEntryService.class)
937 protected SCProductEntryService scProductEntryService;
938 @BeanReference(type = SCProductEntryPersistence.class)
939 protected SCProductEntryPersistence scProductEntryPersistence;
940 @BeanReference(type = SCProductScreenshotLocalService.class)
941 protected SCProductScreenshotLocalService scProductScreenshotLocalService;
942 @BeanReference(type = SCProductScreenshotPersistence.class)
943 protected SCProductScreenshotPersistence scProductScreenshotPersistence;
944 @BeanReference(type = SCProductVersionLocalService.class)
945 protected SCProductVersionLocalService scProductVersionLocalService;
946 @BeanReference(type = SCProductVersionService.class)
947 protected SCProductVersionService scProductVersionService;
948 @BeanReference(type = SCProductVersionPersistence.class)
949 protected SCProductVersionPersistence scProductVersionPersistence;
950 @BeanReference(type = CounterLocalService.class)
951 protected CounterLocalService counterLocalService;
952 @BeanReference(type = ResourceLocalService.class)
953 protected ResourceLocalService resourceLocalService;
954 @BeanReference(type = ResourceService.class)
955 protected ResourceService resourceService;
956 @BeanReference(type = ResourcePersistence.class)
957 protected ResourcePersistence resourcePersistence;
958 @BeanReference(type = ResourceFinder.class)
959 protected ResourceFinder resourceFinder;
960 @BeanReference(type = UserLocalService.class)
961 protected UserLocalService userLocalService;
962 @BeanReference(type = UserService.class)
963 protected UserService userService;
964 @BeanReference(type = UserPersistence.class)
965 protected UserPersistence userPersistence;
966 @BeanReference(type = UserFinder.class)
967 protected UserFinder userFinder;
968 @BeanReference(type = PersistedModelLocalServiceRegistry.class)
969 protected PersistedModelLocalServiceRegistry persistedModelLocalServiceRegistry;
970 private String _beanIdentifier;
971 }