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.bean.BeanReference;
022 import com.liferay.portal.kernel.bean.IdentifiableBean;
023 import com.liferay.portal.kernel.dao.jdbc.SqlUpdate;
024 import com.liferay.portal.kernel.dao.jdbc.SqlUpdateFactoryUtil;
025 import com.liferay.portal.kernel.dao.orm.DynamicQuery;
026 import com.liferay.portal.kernel.dao.orm.DynamicQueryFactoryUtil;
027 import com.liferay.portal.kernel.exception.PortalException;
028 import com.liferay.portal.kernel.exception.SystemException;
029 import com.liferay.portal.kernel.search.Indexable;
030 import com.liferay.portal.kernel.search.IndexableType;
031 import com.liferay.portal.kernel.util.OrderByComparator;
032 import com.liferay.portal.model.PersistedModel;
033 import com.liferay.portal.service.BaseLocalServiceImpl;
034 import com.liferay.portal.service.CompanyLocalService;
035 import com.liferay.portal.service.CompanyService;
036 import com.liferay.portal.service.GroupLocalService;
037 import com.liferay.portal.service.GroupService;
038 import com.liferay.portal.service.OrganizationLocalService;
039 import com.liferay.portal.service.OrganizationService;
040 import com.liferay.portal.service.PersistedModelLocalServiceRegistry;
041 import com.liferay.portal.service.ResourceLocalService;
042 import com.liferay.portal.service.ResourceService;
043 import com.liferay.portal.service.RoleLocalService;
044 import com.liferay.portal.service.RoleService;
045 import com.liferay.portal.service.UserGroupLocalService;
046 import com.liferay.portal.service.UserGroupService;
047 import com.liferay.portal.service.UserLocalService;
048 import com.liferay.portal.service.UserService;
049 import com.liferay.portal.service.persistence.CompanyPersistence;
050 import com.liferay.portal.service.persistence.GroupFinder;
051 import com.liferay.portal.service.persistence.GroupPersistence;
052 import com.liferay.portal.service.persistence.OrganizationFinder;
053 import com.liferay.portal.service.persistence.OrganizationPersistence;
054 import com.liferay.portal.service.persistence.ResourceFinder;
055 import com.liferay.portal.service.persistence.ResourcePersistence;
056 import com.liferay.portal.service.persistence.RoleFinder;
057 import com.liferay.portal.service.persistence.RolePersistence;
058 import com.liferay.portal.service.persistence.UserFinder;
059 import com.liferay.portal.service.persistence.UserGroupFinder;
060 import com.liferay.portal.service.persistence.UserGroupPersistence;
061 import com.liferay.portal.service.persistence.UserPersistence;
062
063 import com.liferay.portlet.announcements.model.AnnouncementsEntry;
064 import com.liferay.portlet.announcements.service.AnnouncementsDeliveryLocalService;
065 import com.liferay.portlet.announcements.service.AnnouncementsDeliveryService;
066 import com.liferay.portlet.announcements.service.AnnouncementsEntryLocalService;
067 import com.liferay.portlet.announcements.service.AnnouncementsEntryService;
068 import com.liferay.portlet.announcements.service.AnnouncementsFlagLocalService;
069 import com.liferay.portlet.announcements.service.AnnouncementsFlagService;
070 import com.liferay.portlet.announcements.service.persistence.AnnouncementsDeliveryPersistence;
071 import com.liferay.portlet.announcements.service.persistence.AnnouncementsEntryFinder;
072 import com.liferay.portlet.announcements.service.persistence.AnnouncementsEntryPersistence;
073 import com.liferay.portlet.announcements.service.persistence.AnnouncementsFlagPersistence;
074
075 import java.io.Serializable;
076
077 import java.util.List;
078
079 import javax.sql.DataSource;
080
081
093 public abstract class AnnouncementsEntryLocalServiceBaseImpl
094 extends BaseLocalServiceImpl implements AnnouncementsEntryLocalService,
095 IdentifiableBean {
096
101
102
109 @Indexable(type = IndexableType.REINDEX)
110 public AnnouncementsEntry addAnnouncementsEntry(
111 AnnouncementsEntry announcementsEntry) throws SystemException {
112 announcementsEntry.setNew(true);
113
114 return announcementsEntryPersistence.update(announcementsEntry, false);
115 }
116
117
123 public AnnouncementsEntry createAnnouncementsEntry(long entryId) {
124 return announcementsEntryPersistence.create(entryId);
125 }
126
127
135 @Indexable(type = IndexableType.DELETE)
136 public AnnouncementsEntry deleteAnnouncementsEntry(long entryId)
137 throws PortalException, SystemException {
138 return announcementsEntryPersistence.remove(entryId);
139 }
140
141
148 @Indexable(type = IndexableType.DELETE)
149 public AnnouncementsEntry deleteAnnouncementsEntry(
150 AnnouncementsEntry announcementsEntry) throws SystemException {
151 return announcementsEntryPersistence.remove(announcementsEntry);
152 }
153
154 public DynamicQuery dynamicQuery() {
155 Class<?> clazz = getClass();
156
157 return DynamicQueryFactoryUtil.forClass(AnnouncementsEntry.class,
158 clazz.getClassLoader());
159 }
160
161
168 @SuppressWarnings("rawtypes")
169 public List dynamicQuery(DynamicQuery dynamicQuery)
170 throws SystemException {
171 return announcementsEntryPersistence.findWithDynamicQuery(dynamicQuery);
172 }
173
174
187 @SuppressWarnings("rawtypes")
188 public List dynamicQuery(DynamicQuery dynamicQuery, int start, int end)
189 throws SystemException {
190 return announcementsEntryPersistence.findWithDynamicQuery(dynamicQuery,
191 start, end);
192 }
193
194
208 @SuppressWarnings("rawtypes")
209 public List dynamicQuery(DynamicQuery dynamicQuery, int start, int end,
210 OrderByComparator orderByComparator) throws SystemException {
211 return announcementsEntryPersistence.findWithDynamicQuery(dynamicQuery,
212 start, end, orderByComparator);
213 }
214
215
222 public long dynamicQueryCount(DynamicQuery dynamicQuery)
223 throws SystemException {
224 return announcementsEntryPersistence.countWithDynamicQuery(dynamicQuery);
225 }
226
227 public AnnouncementsEntry fetchAnnouncementsEntry(long entryId)
228 throws SystemException {
229 return announcementsEntryPersistence.fetchByPrimaryKey(entryId);
230 }
231
232
240 public AnnouncementsEntry getAnnouncementsEntry(long entryId)
241 throws PortalException, SystemException {
242 return announcementsEntryPersistence.findByPrimaryKey(entryId);
243 }
244
245 public PersistedModel getPersistedModel(Serializable primaryKeyObj)
246 throws PortalException, SystemException {
247 return announcementsEntryPersistence.findByPrimaryKey(primaryKeyObj);
248 }
249
250
262 public List<AnnouncementsEntry> getAnnouncementsEntries(int start, int end)
263 throws SystemException {
264 return announcementsEntryPersistence.findAll(start, end);
265 }
266
267
273 public int getAnnouncementsEntriesCount() throws SystemException {
274 return announcementsEntryPersistence.countAll();
275 }
276
277
284 @Indexable(type = IndexableType.REINDEX)
285 public AnnouncementsEntry updateAnnouncementsEntry(
286 AnnouncementsEntry announcementsEntry) throws SystemException {
287 return updateAnnouncementsEntry(announcementsEntry, true);
288 }
289
290
298 @Indexable(type = IndexableType.REINDEX)
299 public AnnouncementsEntry updateAnnouncementsEntry(
300 AnnouncementsEntry announcementsEntry, boolean merge)
301 throws SystemException {
302 announcementsEntry.setNew(false);
303
304 return announcementsEntryPersistence.update(announcementsEntry, merge);
305 }
306
307
312 public AnnouncementsDeliveryLocalService getAnnouncementsDeliveryLocalService() {
313 return announcementsDeliveryLocalService;
314 }
315
316
321 public void setAnnouncementsDeliveryLocalService(
322 AnnouncementsDeliveryLocalService announcementsDeliveryLocalService) {
323 this.announcementsDeliveryLocalService = announcementsDeliveryLocalService;
324 }
325
326
331 public AnnouncementsDeliveryService getAnnouncementsDeliveryService() {
332 return announcementsDeliveryService;
333 }
334
335
340 public void setAnnouncementsDeliveryService(
341 AnnouncementsDeliveryService announcementsDeliveryService) {
342 this.announcementsDeliveryService = announcementsDeliveryService;
343 }
344
345
350 public AnnouncementsDeliveryPersistence getAnnouncementsDeliveryPersistence() {
351 return announcementsDeliveryPersistence;
352 }
353
354
359 public void setAnnouncementsDeliveryPersistence(
360 AnnouncementsDeliveryPersistence announcementsDeliveryPersistence) {
361 this.announcementsDeliveryPersistence = announcementsDeliveryPersistence;
362 }
363
364
369 public AnnouncementsEntryLocalService getAnnouncementsEntryLocalService() {
370 return announcementsEntryLocalService;
371 }
372
373
378 public void setAnnouncementsEntryLocalService(
379 AnnouncementsEntryLocalService announcementsEntryLocalService) {
380 this.announcementsEntryLocalService = announcementsEntryLocalService;
381 }
382
383
388 public AnnouncementsEntryService getAnnouncementsEntryService() {
389 return announcementsEntryService;
390 }
391
392
397 public void setAnnouncementsEntryService(
398 AnnouncementsEntryService announcementsEntryService) {
399 this.announcementsEntryService = announcementsEntryService;
400 }
401
402
407 public AnnouncementsEntryPersistence getAnnouncementsEntryPersistence() {
408 return announcementsEntryPersistence;
409 }
410
411
416 public void setAnnouncementsEntryPersistence(
417 AnnouncementsEntryPersistence announcementsEntryPersistence) {
418 this.announcementsEntryPersistence = announcementsEntryPersistence;
419 }
420
421
426 public AnnouncementsEntryFinder getAnnouncementsEntryFinder() {
427 return announcementsEntryFinder;
428 }
429
430
435 public void setAnnouncementsEntryFinder(
436 AnnouncementsEntryFinder announcementsEntryFinder) {
437 this.announcementsEntryFinder = announcementsEntryFinder;
438 }
439
440
445 public AnnouncementsFlagLocalService getAnnouncementsFlagLocalService() {
446 return announcementsFlagLocalService;
447 }
448
449
454 public void setAnnouncementsFlagLocalService(
455 AnnouncementsFlagLocalService announcementsFlagLocalService) {
456 this.announcementsFlagLocalService = announcementsFlagLocalService;
457 }
458
459
464 public AnnouncementsFlagService getAnnouncementsFlagService() {
465 return announcementsFlagService;
466 }
467
468
473 public void setAnnouncementsFlagService(
474 AnnouncementsFlagService announcementsFlagService) {
475 this.announcementsFlagService = announcementsFlagService;
476 }
477
478
483 public AnnouncementsFlagPersistence getAnnouncementsFlagPersistence() {
484 return announcementsFlagPersistence;
485 }
486
487
492 public void setAnnouncementsFlagPersistence(
493 AnnouncementsFlagPersistence announcementsFlagPersistence) {
494 this.announcementsFlagPersistence = announcementsFlagPersistence;
495 }
496
497
502 public CounterLocalService getCounterLocalService() {
503 return counterLocalService;
504 }
505
506
511 public void setCounterLocalService(CounterLocalService counterLocalService) {
512 this.counterLocalService = counterLocalService;
513 }
514
515
520 public MailService getMailService() {
521 return mailService;
522 }
523
524
529 public void setMailService(MailService mailService) {
530 this.mailService = mailService;
531 }
532
533
538 public CompanyLocalService getCompanyLocalService() {
539 return companyLocalService;
540 }
541
542
547 public void setCompanyLocalService(CompanyLocalService companyLocalService) {
548 this.companyLocalService = companyLocalService;
549 }
550
551
556 public CompanyService getCompanyService() {
557 return companyService;
558 }
559
560
565 public void setCompanyService(CompanyService companyService) {
566 this.companyService = companyService;
567 }
568
569
574 public CompanyPersistence getCompanyPersistence() {
575 return companyPersistence;
576 }
577
578
583 public void setCompanyPersistence(CompanyPersistence companyPersistence) {
584 this.companyPersistence = companyPersistence;
585 }
586
587
592 public GroupLocalService getGroupLocalService() {
593 return groupLocalService;
594 }
595
596
601 public void setGroupLocalService(GroupLocalService groupLocalService) {
602 this.groupLocalService = groupLocalService;
603 }
604
605
610 public GroupService getGroupService() {
611 return groupService;
612 }
613
614
619 public void setGroupService(GroupService groupService) {
620 this.groupService = groupService;
621 }
622
623
628 public GroupPersistence getGroupPersistence() {
629 return groupPersistence;
630 }
631
632
637 public void setGroupPersistence(GroupPersistence groupPersistence) {
638 this.groupPersistence = groupPersistence;
639 }
640
641
646 public GroupFinder getGroupFinder() {
647 return groupFinder;
648 }
649
650
655 public void setGroupFinder(GroupFinder groupFinder) {
656 this.groupFinder = groupFinder;
657 }
658
659
664 public OrganizationLocalService getOrganizationLocalService() {
665 return organizationLocalService;
666 }
667
668
673 public void setOrganizationLocalService(
674 OrganizationLocalService organizationLocalService) {
675 this.organizationLocalService = organizationLocalService;
676 }
677
678
683 public OrganizationService getOrganizationService() {
684 return organizationService;
685 }
686
687
692 public void setOrganizationService(OrganizationService organizationService) {
693 this.organizationService = organizationService;
694 }
695
696
701 public OrganizationPersistence getOrganizationPersistence() {
702 return organizationPersistence;
703 }
704
705
710 public void setOrganizationPersistence(
711 OrganizationPersistence organizationPersistence) {
712 this.organizationPersistence = organizationPersistence;
713 }
714
715
720 public OrganizationFinder getOrganizationFinder() {
721 return organizationFinder;
722 }
723
724
729 public void setOrganizationFinder(OrganizationFinder organizationFinder) {
730 this.organizationFinder = organizationFinder;
731 }
732
733
738 public ResourceLocalService getResourceLocalService() {
739 return resourceLocalService;
740 }
741
742
747 public void setResourceLocalService(
748 ResourceLocalService resourceLocalService) {
749 this.resourceLocalService = resourceLocalService;
750 }
751
752
757 public ResourceService getResourceService() {
758 return resourceService;
759 }
760
761
766 public void setResourceService(ResourceService resourceService) {
767 this.resourceService = resourceService;
768 }
769
770
775 public ResourcePersistence getResourcePersistence() {
776 return resourcePersistence;
777 }
778
779
784 public void setResourcePersistence(ResourcePersistence resourcePersistence) {
785 this.resourcePersistence = resourcePersistence;
786 }
787
788
793 public ResourceFinder getResourceFinder() {
794 return resourceFinder;
795 }
796
797
802 public void setResourceFinder(ResourceFinder resourceFinder) {
803 this.resourceFinder = resourceFinder;
804 }
805
806
811 public RoleLocalService getRoleLocalService() {
812 return roleLocalService;
813 }
814
815
820 public void setRoleLocalService(RoleLocalService roleLocalService) {
821 this.roleLocalService = roleLocalService;
822 }
823
824
829 public RoleService getRoleService() {
830 return roleService;
831 }
832
833
838 public void setRoleService(RoleService roleService) {
839 this.roleService = roleService;
840 }
841
842
847 public RolePersistence getRolePersistence() {
848 return rolePersistence;
849 }
850
851
856 public void setRolePersistence(RolePersistence rolePersistence) {
857 this.rolePersistence = rolePersistence;
858 }
859
860
865 public RoleFinder getRoleFinder() {
866 return roleFinder;
867 }
868
869
874 public void setRoleFinder(RoleFinder roleFinder) {
875 this.roleFinder = roleFinder;
876 }
877
878
883 public UserLocalService getUserLocalService() {
884 return userLocalService;
885 }
886
887
892 public void setUserLocalService(UserLocalService userLocalService) {
893 this.userLocalService = userLocalService;
894 }
895
896
901 public UserService getUserService() {
902 return userService;
903 }
904
905
910 public void setUserService(UserService userService) {
911 this.userService = userService;
912 }
913
914
919 public UserPersistence getUserPersistence() {
920 return userPersistence;
921 }
922
923
928 public void setUserPersistence(UserPersistence userPersistence) {
929 this.userPersistence = userPersistence;
930 }
931
932
937 public UserFinder getUserFinder() {
938 return userFinder;
939 }
940
941
946 public void setUserFinder(UserFinder userFinder) {
947 this.userFinder = userFinder;
948 }
949
950
955 public UserGroupLocalService getUserGroupLocalService() {
956 return userGroupLocalService;
957 }
958
959
964 public void setUserGroupLocalService(
965 UserGroupLocalService userGroupLocalService) {
966 this.userGroupLocalService = userGroupLocalService;
967 }
968
969
974 public UserGroupService getUserGroupService() {
975 return userGroupService;
976 }
977
978
983 public void setUserGroupService(UserGroupService userGroupService) {
984 this.userGroupService = userGroupService;
985 }
986
987
992 public UserGroupPersistence getUserGroupPersistence() {
993 return userGroupPersistence;
994 }
995
996
1001 public void setUserGroupPersistence(
1002 UserGroupPersistence userGroupPersistence) {
1003 this.userGroupPersistence = userGroupPersistence;
1004 }
1005
1006
1011 public UserGroupFinder getUserGroupFinder() {
1012 return userGroupFinder;
1013 }
1014
1015
1020 public void setUserGroupFinder(UserGroupFinder userGroupFinder) {
1021 this.userGroupFinder = userGroupFinder;
1022 }
1023
1024 public void afterPropertiesSet() {
1025 persistedModelLocalServiceRegistry.register("com.liferay.portlet.announcements.model.AnnouncementsEntry",
1026 announcementsEntryLocalService);
1027 }
1028
1029 public void destroy() {
1030 persistedModelLocalServiceRegistry.unregister(
1031 "com.liferay.portlet.announcements.model.AnnouncementsEntry");
1032 }
1033
1034
1039 public String getBeanIdentifier() {
1040 return _beanIdentifier;
1041 }
1042
1043
1048 public void setBeanIdentifier(String beanIdentifier) {
1049 _beanIdentifier = beanIdentifier;
1050 }
1051
1052 protected Class<?> getModelClass() {
1053 return AnnouncementsEntry.class;
1054 }
1055
1056 protected String getModelClassName() {
1057 return AnnouncementsEntry.class.getName();
1058 }
1059
1060
1065 protected void runSQL(String sql) throws SystemException {
1066 try {
1067 DataSource dataSource = announcementsEntryPersistence.getDataSource();
1068
1069 SqlUpdate sqlUpdate = SqlUpdateFactoryUtil.getSqlUpdate(dataSource,
1070 sql, new int[0]);
1071
1072 sqlUpdate.update();
1073 }
1074 catch (Exception e) {
1075 throw new SystemException(e);
1076 }
1077 }
1078
1079 @BeanReference(type = AnnouncementsDeliveryLocalService.class)
1080 protected AnnouncementsDeliveryLocalService announcementsDeliveryLocalService;
1081 @BeanReference(type = AnnouncementsDeliveryService.class)
1082 protected AnnouncementsDeliveryService announcementsDeliveryService;
1083 @BeanReference(type = AnnouncementsDeliveryPersistence.class)
1084 protected AnnouncementsDeliveryPersistence announcementsDeliveryPersistence;
1085 @BeanReference(type = AnnouncementsEntryLocalService.class)
1086 protected AnnouncementsEntryLocalService announcementsEntryLocalService;
1087 @BeanReference(type = AnnouncementsEntryService.class)
1088 protected AnnouncementsEntryService announcementsEntryService;
1089 @BeanReference(type = AnnouncementsEntryPersistence.class)
1090 protected AnnouncementsEntryPersistence announcementsEntryPersistence;
1091 @BeanReference(type = AnnouncementsEntryFinder.class)
1092 protected AnnouncementsEntryFinder announcementsEntryFinder;
1093 @BeanReference(type = AnnouncementsFlagLocalService.class)
1094 protected AnnouncementsFlagLocalService announcementsFlagLocalService;
1095 @BeanReference(type = AnnouncementsFlagService.class)
1096 protected AnnouncementsFlagService announcementsFlagService;
1097 @BeanReference(type = AnnouncementsFlagPersistence.class)
1098 protected AnnouncementsFlagPersistence announcementsFlagPersistence;
1099 @BeanReference(type = CounterLocalService.class)
1100 protected CounterLocalService counterLocalService;
1101 @BeanReference(type = MailService.class)
1102 protected MailService mailService;
1103 @BeanReference(type = CompanyLocalService.class)
1104 protected CompanyLocalService companyLocalService;
1105 @BeanReference(type = CompanyService.class)
1106 protected CompanyService companyService;
1107 @BeanReference(type = CompanyPersistence.class)
1108 protected CompanyPersistence companyPersistence;
1109 @BeanReference(type = GroupLocalService.class)
1110 protected GroupLocalService groupLocalService;
1111 @BeanReference(type = GroupService.class)
1112 protected GroupService groupService;
1113 @BeanReference(type = GroupPersistence.class)
1114 protected GroupPersistence groupPersistence;
1115 @BeanReference(type = GroupFinder.class)
1116 protected GroupFinder groupFinder;
1117 @BeanReference(type = OrganizationLocalService.class)
1118 protected OrganizationLocalService organizationLocalService;
1119 @BeanReference(type = OrganizationService.class)
1120 protected OrganizationService organizationService;
1121 @BeanReference(type = OrganizationPersistence.class)
1122 protected OrganizationPersistence organizationPersistence;
1123 @BeanReference(type = OrganizationFinder.class)
1124 protected OrganizationFinder organizationFinder;
1125 @BeanReference(type = ResourceLocalService.class)
1126 protected ResourceLocalService resourceLocalService;
1127 @BeanReference(type = ResourceService.class)
1128 protected ResourceService resourceService;
1129 @BeanReference(type = ResourcePersistence.class)
1130 protected ResourcePersistence resourcePersistence;
1131 @BeanReference(type = ResourceFinder.class)
1132 protected ResourceFinder resourceFinder;
1133 @BeanReference(type = RoleLocalService.class)
1134 protected RoleLocalService roleLocalService;
1135 @BeanReference(type = RoleService.class)
1136 protected RoleService roleService;
1137 @BeanReference(type = RolePersistence.class)
1138 protected RolePersistence rolePersistence;
1139 @BeanReference(type = RoleFinder.class)
1140 protected RoleFinder roleFinder;
1141 @BeanReference(type = UserLocalService.class)
1142 protected UserLocalService userLocalService;
1143 @BeanReference(type = UserService.class)
1144 protected UserService userService;
1145 @BeanReference(type = UserPersistence.class)
1146 protected UserPersistence userPersistence;
1147 @BeanReference(type = UserFinder.class)
1148 protected UserFinder userFinder;
1149 @BeanReference(type = UserGroupLocalService.class)
1150 protected UserGroupLocalService userGroupLocalService;
1151 @BeanReference(type = UserGroupService.class)
1152 protected UserGroupService userGroupService;
1153 @BeanReference(type = UserGroupPersistence.class)
1154 protected UserGroupPersistence userGroupPersistence;
1155 @BeanReference(type = UserGroupFinder.class)
1156 protected UserGroupFinder userGroupFinder;
1157 @BeanReference(type = PersistedModelLocalServiceRegistry.class)
1158 protected PersistedModelLocalServiceRegistry persistedModelLocalServiceRegistry;
1159 private String _beanIdentifier;
1160 }