001
014
015 package com.liferay.portlet.announcements.service.base;
016
017 import com.liferay.counter.service.CounterLocalService;
018
019 import com.liferay.portal.kernel.annotation.BeanReference;
020 import com.liferay.portal.kernel.dao.jdbc.SqlUpdate;
021 import com.liferay.portal.kernel.dao.jdbc.SqlUpdateFactoryUtil;
022 import com.liferay.portal.kernel.dao.orm.DynamicQuery;
023 import com.liferay.portal.kernel.exception.PortalException;
024 import com.liferay.portal.kernel.exception.SystemException;
025 import com.liferay.portal.kernel.util.OrderByComparator;
026 import com.liferay.portal.service.ResourceLocalService;
027 import com.liferay.portal.service.ResourceService;
028 import com.liferay.portal.service.UserLocalService;
029 import com.liferay.portal.service.UserService;
030 import com.liferay.portal.service.persistence.ResourceFinder;
031 import com.liferay.portal.service.persistence.ResourcePersistence;
032 import com.liferay.portal.service.persistence.UserFinder;
033 import com.liferay.portal.service.persistence.UserPersistence;
034
035 import com.liferay.portlet.announcements.model.AnnouncementsDelivery;
036 import com.liferay.portlet.announcements.service.AnnouncementsDeliveryLocalService;
037 import com.liferay.portlet.announcements.service.AnnouncementsDeliveryService;
038 import com.liferay.portlet.announcements.service.AnnouncementsEntryLocalService;
039 import com.liferay.portlet.announcements.service.AnnouncementsEntryService;
040 import com.liferay.portlet.announcements.service.AnnouncementsFlagLocalService;
041 import com.liferay.portlet.announcements.service.AnnouncementsFlagService;
042 import com.liferay.portlet.announcements.service.persistence.AnnouncementsDeliveryPersistence;
043 import com.liferay.portlet.announcements.service.persistence.AnnouncementsEntryFinder;
044 import com.liferay.portlet.announcements.service.persistence.AnnouncementsEntryPersistence;
045 import com.liferay.portlet.announcements.service.persistence.AnnouncementsFlagPersistence;
046
047 import java.util.List;
048
049 import javax.sql.DataSource;
050
051
067 public abstract class AnnouncementsDeliveryLocalServiceBaseImpl
068 implements AnnouncementsDeliveryLocalService {
069
076 public AnnouncementsDelivery addAnnouncementsDelivery(
077 AnnouncementsDelivery announcementsDelivery) throws SystemException {
078 announcementsDelivery.setNew(true);
079
080 return announcementsDeliveryPersistence.update(announcementsDelivery,
081 false);
082 }
083
084
090 public AnnouncementsDelivery createAnnouncementsDelivery(long deliveryId) {
091 return announcementsDeliveryPersistence.create(deliveryId);
092 }
093
094
101 public void deleteAnnouncementsDelivery(long deliveryId)
102 throws PortalException, SystemException {
103 announcementsDeliveryPersistence.remove(deliveryId);
104 }
105
106
112 public void deleteAnnouncementsDelivery(
113 AnnouncementsDelivery announcementsDelivery) throws SystemException {
114 announcementsDeliveryPersistence.remove(announcementsDelivery);
115 }
116
117
124 @SuppressWarnings("rawtypes")
125 public List dynamicQuery(DynamicQuery dynamicQuery)
126 throws SystemException {
127 return announcementsDeliveryPersistence.findWithDynamicQuery(dynamicQuery);
128 }
129
130
143 @SuppressWarnings("rawtypes")
144 public List dynamicQuery(DynamicQuery dynamicQuery, int start, int end)
145 throws SystemException {
146 return announcementsDeliveryPersistence.findWithDynamicQuery(dynamicQuery,
147 start, end);
148 }
149
150
164 @SuppressWarnings("rawtypes")
165 public List dynamicQuery(DynamicQuery dynamicQuery, int start, int end,
166 OrderByComparator orderByComparator) throws SystemException {
167 return announcementsDeliveryPersistence.findWithDynamicQuery(dynamicQuery,
168 start, end, orderByComparator);
169 }
170
171
178 public long dynamicQueryCount(DynamicQuery dynamicQuery)
179 throws SystemException {
180 return announcementsDeliveryPersistence.countWithDynamicQuery(dynamicQuery);
181 }
182
183
191 public AnnouncementsDelivery getAnnouncementsDelivery(long deliveryId)
192 throws PortalException, SystemException {
193 return announcementsDeliveryPersistence.findByPrimaryKey(deliveryId);
194 }
195
196
208 public List<AnnouncementsDelivery> getAnnouncementsDeliveries(int start,
209 int end) throws SystemException {
210 return announcementsDeliveryPersistence.findAll(start, end);
211 }
212
213
219 public int getAnnouncementsDeliveriesCount() throws SystemException {
220 return announcementsDeliveryPersistence.countAll();
221 }
222
223
230 public AnnouncementsDelivery updateAnnouncementsDelivery(
231 AnnouncementsDelivery announcementsDelivery) throws SystemException {
232 announcementsDelivery.setNew(false);
233
234 return announcementsDeliveryPersistence.update(announcementsDelivery,
235 true);
236 }
237
238
246 public AnnouncementsDelivery updateAnnouncementsDelivery(
247 AnnouncementsDelivery announcementsDelivery, boolean merge)
248 throws SystemException {
249 announcementsDelivery.setNew(false);
250
251 return announcementsDeliveryPersistence.update(announcementsDelivery,
252 merge);
253 }
254
255
260 public AnnouncementsDeliveryLocalService getAnnouncementsDeliveryLocalService() {
261 return announcementsDeliveryLocalService;
262 }
263
264
269 public void setAnnouncementsDeliveryLocalService(
270 AnnouncementsDeliveryLocalService announcementsDeliveryLocalService) {
271 this.announcementsDeliveryLocalService = announcementsDeliveryLocalService;
272 }
273
274
279 public AnnouncementsDeliveryService getAnnouncementsDeliveryService() {
280 return announcementsDeliveryService;
281 }
282
283
288 public void setAnnouncementsDeliveryService(
289 AnnouncementsDeliveryService announcementsDeliveryService) {
290 this.announcementsDeliveryService = announcementsDeliveryService;
291 }
292
293
298 public AnnouncementsDeliveryPersistence getAnnouncementsDeliveryPersistence() {
299 return announcementsDeliveryPersistence;
300 }
301
302
307 public void setAnnouncementsDeliveryPersistence(
308 AnnouncementsDeliveryPersistence announcementsDeliveryPersistence) {
309 this.announcementsDeliveryPersistence = announcementsDeliveryPersistence;
310 }
311
312
317 public AnnouncementsEntryLocalService getAnnouncementsEntryLocalService() {
318 return announcementsEntryLocalService;
319 }
320
321
326 public void setAnnouncementsEntryLocalService(
327 AnnouncementsEntryLocalService announcementsEntryLocalService) {
328 this.announcementsEntryLocalService = announcementsEntryLocalService;
329 }
330
331
336 public AnnouncementsEntryService getAnnouncementsEntryService() {
337 return announcementsEntryService;
338 }
339
340
345 public void setAnnouncementsEntryService(
346 AnnouncementsEntryService announcementsEntryService) {
347 this.announcementsEntryService = announcementsEntryService;
348 }
349
350
355 public AnnouncementsEntryPersistence getAnnouncementsEntryPersistence() {
356 return announcementsEntryPersistence;
357 }
358
359
364 public void setAnnouncementsEntryPersistence(
365 AnnouncementsEntryPersistence announcementsEntryPersistence) {
366 this.announcementsEntryPersistence = announcementsEntryPersistence;
367 }
368
369
374 public AnnouncementsEntryFinder getAnnouncementsEntryFinder() {
375 return announcementsEntryFinder;
376 }
377
378
383 public void setAnnouncementsEntryFinder(
384 AnnouncementsEntryFinder announcementsEntryFinder) {
385 this.announcementsEntryFinder = announcementsEntryFinder;
386 }
387
388
393 public AnnouncementsFlagLocalService getAnnouncementsFlagLocalService() {
394 return announcementsFlagLocalService;
395 }
396
397
402 public void setAnnouncementsFlagLocalService(
403 AnnouncementsFlagLocalService announcementsFlagLocalService) {
404 this.announcementsFlagLocalService = announcementsFlagLocalService;
405 }
406
407
412 public AnnouncementsFlagService getAnnouncementsFlagService() {
413 return announcementsFlagService;
414 }
415
416
421 public void setAnnouncementsFlagService(
422 AnnouncementsFlagService announcementsFlagService) {
423 this.announcementsFlagService = announcementsFlagService;
424 }
425
426
431 public AnnouncementsFlagPersistence getAnnouncementsFlagPersistence() {
432 return announcementsFlagPersistence;
433 }
434
435
440 public void setAnnouncementsFlagPersistence(
441 AnnouncementsFlagPersistence announcementsFlagPersistence) {
442 this.announcementsFlagPersistence = announcementsFlagPersistence;
443 }
444
445
450 public CounterLocalService getCounterLocalService() {
451 return counterLocalService;
452 }
453
454
459 public void setCounterLocalService(CounterLocalService counterLocalService) {
460 this.counterLocalService = counterLocalService;
461 }
462
463
468 public ResourceLocalService getResourceLocalService() {
469 return resourceLocalService;
470 }
471
472
477 public void setResourceLocalService(
478 ResourceLocalService resourceLocalService) {
479 this.resourceLocalService = resourceLocalService;
480 }
481
482
487 public ResourceService getResourceService() {
488 return resourceService;
489 }
490
491
496 public void setResourceService(ResourceService resourceService) {
497 this.resourceService = resourceService;
498 }
499
500
505 public ResourcePersistence getResourcePersistence() {
506 return resourcePersistence;
507 }
508
509
514 public void setResourcePersistence(ResourcePersistence resourcePersistence) {
515 this.resourcePersistence = resourcePersistence;
516 }
517
518
523 public ResourceFinder getResourceFinder() {
524 return resourceFinder;
525 }
526
527
532 public void setResourceFinder(ResourceFinder resourceFinder) {
533 this.resourceFinder = resourceFinder;
534 }
535
536
541 public UserLocalService getUserLocalService() {
542 return userLocalService;
543 }
544
545
550 public void setUserLocalService(UserLocalService userLocalService) {
551 this.userLocalService = userLocalService;
552 }
553
554
559 public UserService getUserService() {
560 return userService;
561 }
562
563
568 public void setUserService(UserService userService) {
569 this.userService = userService;
570 }
571
572
577 public UserPersistence getUserPersistence() {
578 return userPersistence;
579 }
580
581
586 public void setUserPersistence(UserPersistence userPersistence) {
587 this.userPersistence = userPersistence;
588 }
589
590
595 public UserFinder getUserFinder() {
596 return userFinder;
597 }
598
599
604 public void setUserFinder(UserFinder userFinder) {
605 this.userFinder = userFinder;
606 }
607
608
613 protected void runSQL(String sql) throws SystemException {
614 try {
615 DataSource dataSource = announcementsDeliveryPersistence.getDataSource();
616
617 SqlUpdate sqlUpdate = SqlUpdateFactoryUtil.getSqlUpdate(dataSource,
618 sql, new int[0]);
619
620 sqlUpdate.update();
621 }
622 catch (Exception e) {
623 throw new SystemException(e);
624 }
625 }
626
627 @BeanReference(type = AnnouncementsDeliveryLocalService.class)
628 protected AnnouncementsDeliveryLocalService announcementsDeliveryLocalService;
629 @BeanReference(type = AnnouncementsDeliveryService.class)
630 protected AnnouncementsDeliveryService announcementsDeliveryService;
631 @BeanReference(type = AnnouncementsDeliveryPersistence.class)
632 protected AnnouncementsDeliveryPersistence announcementsDeliveryPersistence;
633 @BeanReference(type = AnnouncementsEntryLocalService.class)
634 protected AnnouncementsEntryLocalService announcementsEntryLocalService;
635 @BeanReference(type = AnnouncementsEntryService.class)
636 protected AnnouncementsEntryService announcementsEntryService;
637 @BeanReference(type = AnnouncementsEntryPersistence.class)
638 protected AnnouncementsEntryPersistence announcementsEntryPersistence;
639 @BeanReference(type = AnnouncementsEntryFinder.class)
640 protected AnnouncementsEntryFinder announcementsEntryFinder;
641 @BeanReference(type = AnnouncementsFlagLocalService.class)
642 protected AnnouncementsFlagLocalService announcementsFlagLocalService;
643 @BeanReference(type = AnnouncementsFlagService.class)
644 protected AnnouncementsFlagService announcementsFlagService;
645 @BeanReference(type = AnnouncementsFlagPersistence.class)
646 protected AnnouncementsFlagPersistence announcementsFlagPersistence;
647 @BeanReference(type = CounterLocalService.class)
648 protected CounterLocalService counterLocalService;
649 @BeanReference(type = ResourceLocalService.class)
650 protected ResourceLocalService resourceLocalService;
651 @BeanReference(type = ResourceService.class)
652 protected ResourceService resourceService;
653 @BeanReference(type = ResourcePersistence.class)
654 protected ResourcePersistence resourcePersistence;
655 @BeanReference(type = ResourceFinder.class)
656 protected ResourceFinder resourceFinder;
657 @BeanReference(type = UserLocalService.class)
658 protected UserLocalService userLocalService;
659 @BeanReference(type = UserService.class)
660 protected UserService userService;
661 @BeanReference(type = UserPersistence.class)
662 protected UserPersistence userPersistence;
663 @BeanReference(type = UserFinder.class)
664 protected UserFinder userFinder;
665 }