001
014
015 package com.liferay.portlet.announcements.service.base;
016
017 import com.liferay.counter.service.CounterLocalService;
018
019 import com.liferay.mail.service.MailService;
020
021 import com.liferay.portal.kernel.annotation.BeanReference;
022 import com.liferay.portal.kernel.dao.jdbc.SqlUpdate;
023 import com.liferay.portal.kernel.dao.jdbc.SqlUpdateFactoryUtil;
024 import com.liferay.portal.kernel.dao.orm.DynamicQuery;
025 import com.liferay.portal.kernel.exception.PortalException;
026 import com.liferay.portal.kernel.exception.SystemException;
027 import com.liferay.portal.kernel.util.OrderByComparator;
028 import com.liferay.portal.service.CompanyLocalService;
029 import com.liferay.portal.service.CompanyService;
030 import com.liferay.portal.service.GroupLocalService;
031 import com.liferay.portal.service.GroupService;
032 import com.liferay.portal.service.OrganizationLocalService;
033 import com.liferay.portal.service.OrganizationService;
034 import com.liferay.portal.service.ResourceLocalService;
035 import com.liferay.portal.service.ResourceService;
036 import com.liferay.portal.service.RoleLocalService;
037 import com.liferay.portal.service.RoleService;
038 import com.liferay.portal.service.UserGroupLocalService;
039 import com.liferay.portal.service.UserGroupService;
040 import com.liferay.portal.service.UserLocalService;
041 import com.liferay.portal.service.UserService;
042 import com.liferay.portal.service.persistence.CompanyPersistence;
043 import com.liferay.portal.service.persistence.GroupFinder;
044 import com.liferay.portal.service.persistence.GroupPersistence;
045 import com.liferay.portal.service.persistence.OrganizationFinder;
046 import com.liferay.portal.service.persistence.OrganizationPersistence;
047 import com.liferay.portal.service.persistence.ResourceFinder;
048 import com.liferay.portal.service.persistence.ResourcePersistence;
049 import com.liferay.portal.service.persistence.RoleFinder;
050 import com.liferay.portal.service.persistence.RolePersistence;
051 import com.liferay.portal.service.persistence.UserFinder;
052 import com.liferay.portal.service.persistence.UserGroupFinder;
053 import com.liferay.portal.service.persistence.UserGroupPersistence;
054 import com.liferay.portal.service.persistence.UserPersistence;
055
056 import com.liferay.portlet.announcements.model.AnnouncementsEntry;
057 import com.liferay.portlet.announcements.service.AnnouncementsDeliveryLocalService;
058 import com.liferay.portlet.announcements.service.AnnouncementsDeliveryService;
059 import com.liferay.portlet.announcements.service.AnnouncementsEntryLocalService;
060 import com.liferay.portlet.announcements.service.AnnouncementsEntryService;
061 import com.liferay.portlet.announcements.service.AnnouncementsFlagLocalService;
062 import com.liferay.portlet.announcements.service.AnnouncementsFlagService;
063 import com.liferay.portlet.announcements.service.persistence.AnnouncementsDeliveryPersistence;
064 import com.liferay.portlet.announcements.service.persistence.AnnouncementsEntryFinder;
065 import com.liferay.portlet.announcements.service.persistence.AnnouncementsEntryPersistence;
066 import com.liferay.portlet.announcements.service.persistence.AnnouncementsFlagPersistence;
067
068 import java.util.List;
069
070 import javax.sql.DataSource;
071
072
088 public abstract class AnnouncementsEntryLocalServiceBaseImpl
089 implements AnnouncementsEntryLocalService {
090
097 public AnnouncementsEntry addAnnouncementsEntry(
098 AnnouncementsEntry announcementsEntry) throws SystemException {
099 announcementsEntry.setNew(true);
100
101 return announcementsEntryPersistence.update(announcementsEntry, false);
102 }
103
104
110 public AnnouncementsEntry createAnnouncementsEntry(long entryId) {
111 return announcementsEntryPersistence.create(entryId);
112 }
113
114
121 public void deleteAnnouncementsEntry(long entryId)
122 throws PortalException, SystemException {
123 announcementsEntryPersistence.remove(entryId);
124 }
125
126
132 public void deleteAnnouncementsEntry(AnnouncementsEntry announcementsEntry)
133 throws SystemException {
134 announcementsEntryPersistence.remove(announcementsEntry);
135 }
136
137
144 @SuppressWarnings("rawtypes")
145 public List dynamicQuery(DynamicQuery dynamicQuery)
146 throws SystemException {
147 return announcementsEntryPersistence.findWithDynamicQuery(dynamicQuery);
148 }
149
150
163 @SuppressWarnings("rawtypes")
164 public List dynamicQuery(DynamicQuery dynamicQuery, int start, int end)
165 throws SystemException {
166 return announcementsEntryPersistence.findWithDynamicQuery(dynamicQuery,
167 start, end);
168 }
169
170
184 @SuppressWarnings("rawtypes")
185 public List dynamicQuery(DynamicQuery dynamicQuery, int start, int end,
186 OrderByComparator orderByComparator) throws SystemException {
187 return announcementsEntryPersistence.findWithDynamicQuery(dynamicQuery,
188 start, end, orderByComparator);
189 }
190
191
198 public long dynamicQueryCount(DynamicQuery dynamicQuery)
199 throws SystemException {
200 return announcementsEntryPersistence.countWithDynamicQuery(dynamicQuery);
201 }
202
203
211 public AnnouncementsEntry getAnnouncementsEntry(long entryId)
212 throws PortalException, SystemException {
213 return announcementsEntryPersistence.findByPrimaryKey(entryId);
214 }
215
216
228 public List<AnnouncementsEntry> getAnnouncementsEntries(int start, int end)
229 throws SystemException {
230 return announcementsEntryPersistence.findAll(start, end);
231 }
232
233
239 public int getAnnouncementsEntriesCount() throws SystemException {
240 return announcementsEntryPersistence.countAll();
241 }
242
243
250 public AnnouncementsEntry updateAnnouncementsEntry(
251 AnnouncementsEntry announcementsEntry) throws SystemException {
252 announcementsEntry.setNew(false);
253
254 return announcementsEntryPersistence.update(announcementsEntry, true);
255 }
256
257
265 public AnnouncementsEntry updateAnnouncementsEntry(
266 AnnouncementsEntry announcementsEntry, boolean merge)
267 throws SystemException {
268 announcementsEntry.setNew(false);
269
270 return announcementsEntryPersistence.update(announcementsEntry, merge);
271 }
272
273
278 public AnnouncementsDeliveryLocalService getAnnouncementsDeliveryLocalService() {
279 return announcementsDeliveryLocalService;
280 }
281
282
287 public void setAnnouncementsDeliveryLocalService(
288 AnnouncementsDeliveryLocalService announcementsDeliveryLocalService) {
289 this.announcementsDeliveryLocalService = announcementsDeliveryLocalService;
290 }
291
292
297 public AnnouncementsDeliveryService getAnnouncementsDeliveryService() {
298 return announcementsDeliveryService;
299 }
300
301
306 public void setAnnouncementsDeliveryService(
307 AnnouncementsDeliveryService announcementsDeliveryService) {
308 this.announcementsDeliveryService = announcementsDeliveryService;
309 }
310
311
316 public AnnouncementsDeliveryPersistence getAnnouncementsDeliveryPersistence() {
317 return announcementsDeliveryPersistence;
318 }
319
320
325 public void setAnnouncementsDeliveryPersistence(
326 AnnouncementsDeliveryPersistence announcementsDeliveryPersistence) {
327 this.announcementsDeliveryPersistence = announcementsDeliveryPersistence;
328 }
329
330
335 public AnnouncementsEntryLocalService getAnnouncementsEntryLocalService() {
336 return announcementsEntryLocalService;
337 }
338
339
344 public void setAnnouncementsEntryLocalService(
345 AnnouncementsEntryLocalService announcementsEntryLocalService) {
346 this.announcementsEntryLocalService = announcementsEntryLocalService;
347 }
348
349
354 public AnnouncementsEntryService getAnnouncementsEntryService() {
355 return announcementsEntryService;
356 }
357
358
363 public void setAnnouncementsEntryService(
364 AnnouncementsEntryService announcementsEntryService) {
365 this.announcementsEntryService = announcementsEntryService;
366 }
367
368
373 public AnnouncementsEntryPersistence getAnnouncementsEntryPersistence() {
374 return announcementsEntryPersistence;
375 }
376
377
382 public void setAnnouncementsEntryPersistence(
383 AnnouncementsEntryPersistence announcementsEntryPersistence) {
384 this.announcementsEntryPersistence = announcementsEntryPersistence;
385 }
386
387
392 public AnnouncementsEntryFinder getAnnouncementsEntryFinder() {
393 return announcementsEntryFinder;
394 }
395
396
401 public void setAnnouncementsEntryFinder(
402 AnnouncementsEntryFinder announcementsEntryFinder) {
403 this.announcementsEntryFinder = announcementsEntryFinder;
404 }
405
406
411 public AnnouncementsFlagLocalService getAnnouncementsFlagLocalService() {
412 return announcementsFlagLocalService;
413 }
414
415
420 public void setAnnouncementsFlagLocalService(
421 AnnouncementsFlagLocalService announcementsFlagLocalService) {
422 this.announcementsFlagLocalService = announcementsFlagLocalService;
423 }
424
425
430 public AnnouncementsFlagService getAnnouncementsFlagService() {
431 return announcementsFlagService;
432 }
433
434
439 public void setAnnouncementsFlagService(
440 AnnouncementsFlagService announcementsFlagService) {
441 this.announcementsFlagService = announcementsFlagService;
442 }
443
444
449 public AnnouncementsFlagPersistence getAnnouncementsFlagPersistence() {
450 return announcementsFlagPersistence;
451 }
452
453
458 public void setAnnouncementsFlagPersistence(
459 AnnouncementsFlagPersistence announcementsFlagPersistence) {
460 this.announcementsFlagPersistence = announcementsFlagPersistence;
461 }
462
463
468 public CounterLocalService getCounterLocalService() {
469 return counterLocalService;
470 }
471
472
477 public void setCounterLocalService(CounterLocalService counterLocalService) {
478 this.counterLocalService = counterLocalService;
479 }
480
481
486 public MailService getMailService() {
487 return mailService;
488 }
489
490
495 public void setMailService(MailService mailService) {
496 this.mailService = mailService;
497 }
498
499
504 public CompanyLocalService getCompanyLocalService() {
505 return companyLocalService;
506 }
507
508
513 public void setCompanyLocalService(CompanyLocalService companyLocalService) {
514 this.companyLocalService = companyLocalService;
515 }
516
517
522 public CompanyService getCompanyService() {
523 return companyService;
524 }
525
526
531 public void setCompanyService(CompanyService companyService) {
532 this.companyService = companyService;
533 }
534
535
540 public CompanyPersistence getCompanyPersistence() {
541 return companyPersistence;
542 }
543
544
549 public void setCompanyPersistence(CompanyPersistence companyPersistence) {
550 this.companyPersistence = companyPersistence;
551 }
552
553
558 public GroupLocalService getGroupLocalService() {
559 return groupLocalService;
560 }
561
562
567 public void setGroupLocalService(GroupLocalService groupLocalService) {
568 this.groupLocalService = groupLocalService;
569 }
570
571
576 public GroupService getGroupService() {
577 return groupService;
578 }
579
580
585 public void setGroupService(GroupService groupService) {
586 this.groupService = groupService;
587 }
588
589
594 public GroupPersistence getGroupPersistence() {
595 return groupPersistence;
596 }
597
598
603 public void setGroupPersistence(GroupPersistence groupPersistence) {
604 this.groupPersistence = groupPersistence;
605 }
606
607
612 public GroupFinder getGroupFinder() {
613 return groupFinder;
614 }
615
616
621 public void setGroupFinder(GroupFinder groupFinder) {
622 this.groupFinder = groupFinder;
623 }
624
625
630 public OrganizationLocalService getOrganizationLocalService() {
631 return organizationLocalService;
632 }
633
634
639 public void setOrganizationLocalService(
640 OrganizationLocalService organizationLocalService) {
641 this.organizationLocalService = organizationLocalService;
642 }
643
644
649 public OrganizationService getOrganizationService() {
650 return organizationService;
651 }
652
653
658 public void setOrganizationService(OrganizationService organizationService) {
659 this.organizationService = organizationService;
660 }
661
662
667 public OrganizationPersistence getOrganizationPersistence() {
668 return organizationPersistence;
669 }
670
671
676 public void setOrganizationPersistence(
677 OrganizationPersistence organizationPersistence) {
678 this.organizationPersistence = organizationPersistence;
679 }
680
681
686 public OrganizationFinder getOrganizationFinder() {
687 return organizationFinder;
688 }
689
690
695 public void setOrganizationFinder(OrganizationFinder organizationFinder) {
696 this.organizationFinder = organizationFinder;
697 }
698
699
704 public ResourceLocalService getResourceLocalService() {
705 return resourceLocalService;
706 }
707
708
713 public void setResourceLocalService(
714 ResourceLocalService resourceLocalService) {
715 this.resourceLocalService = resourceLocalService;
716 }
717
718
723 public ResourceService getResourceService() {
724 return resourceService;
725 }
726
727
732 public void setResourceService(ResourceService resourceService) {
733 this.resourceService = resourceService;
734 }
735
736
741 public ResourcePersistence getResourcePersistence() {
742 return resourcePersistence;
743 }
744
745
750 public void setResourcePersistence(ResourcePersistence resourcePersistence) {
751 this.resourcePersistence = resourcePersistence;
752 }
753
754
759 public ResourceFinder getResourceFinder() {
760 return resourceFinder;
761 }
762
763
768 public void setResourceFinder(ResourceFinder resourceFinder) {
769 this.resourceFinder = resourceFinder;
770 }
771
772
777 public RoleLocalService getRoleLocalService() {
778 return roleLocalService;
779 }
780
781
786 public void setRoleLocalService(RoleLocalService roleLocalService) {
787 this.roleLocalService = roleLocalService;
788 }
789
790
795 public RoleService getRoleService() {
796 return roleService;
797 }
798
799
804 public void setRoleService(RoleService roleService) {
805 this.roleService = roleService;
806 }
807
808
813 public RolePersistence getRolePersistence() {
814 return rolePersistence;
815 }
816
817
822 public void setRolePersistence(RolePersistence rolePersistence) {
823 this.rolePersistence = rolePersistence;
824 }
825
826
831 public RoleFinder getRoleFinder() {
832 return roleFinder;
833 }
834
835
840 public void setRoleFinder(RoleFinder roleFinder) {
841 this.roleFinder = roleFinder;
842 }
843
844
849 public UserLocalService getUserLocalService() {
850 return userLocalService;
851 }
852
853
858 public void setUserLocalService(UserLocalService userLocalService) {
859 this.userLocalService = userLocalService;
860 }
861
862
867 public UserService getUserService() {
868 return userService;
869 }
870
871
876 public void setUserService(UserService userService) {
877 this.userService = userService;
878 }
879
880
885 public UserPersistence getUserPersistence() {
886 return userPersistence;
887 }
888
889
894 public void setUserPersistence(UserPersistence userPersistence) {
895 this.userPersistence = userPersistence;
896 }
897
898
903 public UserFinder getUserFinder() {
904 return userFinder;
905 }
906
907
912 public void setUserFinder(UserFinder userFinder) {
913 this.userFinder = userFinder;
914 }
915
916
921 public UserGroupLocalService getUserGroupLocalService() {
922 return userGroupLocalService;
923 }
924
925
930 public void setUserGroupLocalService(
931 UserGroupLocalService userGroupLocalService) {
932 this.userGroupLocalService = userGroupLocalService;
933 }
934
935
940 public UserGroupService getUserGroupService() {
941 return userGroupService;
942 }
943
944
949 public void setUserGroupService(UserGroupService userGroupService) {
950 this.userGroupService = userGroupService;
951 }
952
953
958 public UserGroupPersistence getUserGroupPersistence() {
959 return userGroupPersistence;
960 }
961
962
967 public void setUserGroupPersistence(
968 UserGroupPersistence userGroupPersistence) {
969 this.userGroupPersistence = userGroupPersistence;
970 }
971
972
977 public UserGroupFinder getUserGroupFinder() {
978 return userGroupFinder;
979 }
980
981
986 public void setUserGroupFinder(UserGroupFinder userGroupFinder) {
987 this.userGroupFinder = userGroupFinder;
988 }
989
990
995 protected void runSQL(String sql) throws SystemException {
996 try {
997 DataSource dataSource = announcementsEntryPersistence.getDataSource();
998
999 SqlUpdate sqlUpdate = SqlUpdateFactoryUtil.getSqlUpdate(dataSource,
1000 sql, new int[0]);
1001
1002 sqlUpdate.update();
1003 }
1004 catch (Exception e) {
1005 throw new SystemException(e);
1006 }
1007 }
1008
1009 @BeanReference(type = AnnouncementsDeliveryLocalService.class)
1010 protected AnnouncementsDeliveryLocalService announcementsDeliveryLocalService;
1011 @BeanReference(type = AnnouncementsDeliveryService.class)
1012 protected AnnouncementsDeliveryService announcementsDeliveryService;
1013 @BeanReference(type = AnnouncementsDeliveryPersistence.class)
1014 protected AnnouncementsDeliveryPersistence announcementsDeliveryPersistence;
1015 @BeanReference(type = AnnouncementsEntryLocalService.class)
1016 protected AnnouncementsEntryLocalService announcementsEntryLocalService;
1017 @BeanReference(type = AnnouncementsEntryService.class)
1018 protected AnnouncementsEntryService announcementsEntryService;
1019 @BeanReference(type = AnnouncementsEntryPersistence.class)
1020 protected AnnouncementsEntryPersistence announcementsEntryPersistence;
1021 @BeanReference(type = AnnouncementsEntryFinder.class)
1022 protected AnnouncementsEntryFinder announcementsEntryFinder;
1023 @BeanReference(type = AnnouncementsFlagLocalService.class)
1024 protected AnnouncementsFlagLocalService announcementsFlagLocalService;
1025 @BeanReference(type = AnnouncementsFlagService.class)
1026 protected AnnouncementsFlagService announcementsFlagService;
1027 @BeanReference(type = AnnouncementsFlagPersistence.class)
1028 protected AnnouncementsFlagPersistence announcementsFlagPersistence;
1029 @BeanReference(type = CounterLocalService.class)
1030 protected CounterLocalService counterLocalService;
1031 @BeanReference(type = MailService.class)
1032 protected MailService mailService;
1033 @BeanReference(type = CompanyLocalService.class)
1034 protected CompanyLocalService companyLocalService;
1035 @BeanReference(type = CompanyService.class)
1036 protected CompanyService companyService;
1037 @BeanReference(type = CompanyPersistence.class)
1038 protected CompanyPersistence companyPersistence;
1039 @BeanReference(type = GroupLocalService.class)
1040 protected GroupLocalService groupLocalService;
1041 @BeanReference(type = GroupService.class)
1042 protected GroupService groupService;
1043 @BeanReference(type = GroupPersistence.class)
1044 protected GroupPersistence groupPersistence;
1045 @BeanReference(type = GroupFinder.class)
1046 protected GroupFinder groupFinder;
1047 @BeanReference(type = OrganizationLocalService.class)
1048 protected OrganizationLocalService organizationLocalService;
1049 @BeanReference(type = OrganizationService.class)
1050 protected OrganizationService organizationService;
1051 @BeanReference(type = OrganizationPersistence.class)
1052 protected OrganizationPersistence organizationPersistence;
1053 @BeanReference(type = OrganizationFinder.class)
1054 protected OrganizationFinder organizationFinder;
1055 @BeanReference(type = ResourceLocalService.class)
1056 protected ResourceLocalService resourceLocalService;
1057 @BeanReference(type = ResourceService.class)
1058 protected ResourceService resourceService;
1059 @BeanReference(type = ResourcePersistence.class)
1060 protected ResourcePersistence resourcePersistence;
1061 @BeanReference(type = ResourceFinder.class)
1062 protected ResourceFinder resourceFinder;
1063 @BeanReference(type = RoleLocalService.class)
1064 protected RoleLocalService roleLocalService;
1065 @BeanReference(type = RoleService.class)
1066 protected RoleService roleService;
1067 @BeanReference(type = RolePersistence.class)
1068 protected RolePersistence rolePersistence;
1069 @BeanReference(type = RoleFinder.class)
1070 protected RoleFinder roleFinder;
1071 @BeanReference(type = UserLocalService.class)
1072 protected UserLocalService userLocalService;
1073 @BeanReference(type = UserService.class)
1074 protected UserService userService;
1075 @BeanReference(type = UserPersistence.class)
1076 protected UserPersistence userPersistence;
1077 @BeanReference(type = UserFinder.class)
1078 protected UserFinder userFinder;
1079 @BeanReference(type = UserGroupLocalService.class)
1080 protected UserGroupLocalService userGroupLocalService;
1081 @BeanReference(type = UserGroupService.class)
1082 protected UserGroupService userGroupService;
1083 @BeanReference(type = UserGroupPersistence.class)
1084 protected UserGroupPersistence userGroupPersistence;
1085 @BeanReference(type = UserGroupFinder.class)
1086 protected UserGroupFinder userGroupFinder;
1087 }