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.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.announcements.model.AnnouncementsDelivery;
043 import com.liferay.portlet.announcements.service.AnnouncementsDeliveryLocalService;
044 import com.liferay.portlet.announcements.service.AnnouncementsDeliveryService;
045 import com.liferay.portlet.announcements.service.AnnouncementsEntryLocalService;
046 import com.liferay.portlet.announcements.service.AnnouncementsEntryService;
047 import com.liferay.portlet.announcements.service.AnnouncementsFlagLocalService;
048 import com.liferay.portlet.announcements.service.AnnouncementsFlagService;
049 import com.liferay.portlet.announcements.service.persistence.AnnouncementsDeliveryPersistence;
050 import com.liferay.portlet.announcements.service.persistence.AnnouncementsEntryFinder;
051 import com.liferay.portlet.announcements.service.persistence.AnnouncementsEntryPersistence;
052 import com.liferay.portlet.announcements.service.persistence.AnnouncementsFlagPersistence;
053
054 import java.io.Serializable;
055
056 import java.util.List;
057
058 import javax.sql.DataSource;
059
060
072 public abstract class AnnouncementsDeliveryLocalServiceBaseImpl
073 extends BaseLocalServiceImpl implements AnnouncementsDeliveryLocalService,
074 IdentifiableBean {
075
080
081
088 @Indexable(type = IndexableType.REINDEX)
089 public AnnouncementsDelivery addAnnouncementsDelivery(
090 AnnouncementsDelivery announcementsDelivery) throws SystemException {
091 announcementsDelivery.setNew(true);
092
093 return announcementsDeliveryPersistence.update(announcementsDelivery,
094 false);
095 }
096
097
103 public AnnouncementsDelivery createAnnouncementsDelivery(long deliveryId) {
104 return announcementsDeliveryPersistence.create(deliveryId);
105 }
106
107
115 @Indexable(type = IndexableType.DELETE)
116 public AnnouncementsDelivery deleteAnnouncementsDelivery(long deliveryId)
117 throws PortalException, SystemException {
118 return announcementsDeliveryPersistence.remove(deliveryId);
119 }
120
121
128 @Indexable(type = IndexableType.DELETE)
129 public AnnouncementsDelivery deleteAnnouncementsDelivery(
130 AnnouncementsDelivery announcementsDelivery) throws SystemException {
131 return announcementsDeliveryPersistence.remove(announcementsDelivery);
132 }
133
134 public DynamicQuery dynamicQuery() {
135 Class<?> clazz = getClass();
136
137 return DynamicQueryFactoryUtil.forClass(AnnouncementsDelivery.class,
138 clazz.getClassLoader());
139 }
140
141
148 @SuppressWarnings("rawtypes")
149 public List dynamicQuery(DynamicQuery dynamicQuery)
150 throws SystemException {
151 return announcementsDeliveryPersistence.findWithDynamicQuery(dynamicQuery);
152 }
153
154
167 @SuppressWarnings("rawtypes")
168 public List dynamicQuery(DynamicQuery dynamicQuery, int start, int end)
169 throws SystemException {
170 return announcementsDeliveryPersistence.findWithDynamicQuery(dynamicQuery,
171 start, end);
172 }
173
174
188 @SuppressWarnings("rawtypes")
189 public List dynamicQuery(DynamicQuery dynamicQuery, int start, int end,
190 OrderByComparator orderByComparator) throws SystemException {
191 return announcementsDeliveryPersistence.findWithDynamicQuery(dynamicQuery,
192 start, end, orderByComparator);
193 }
194
195
202 public long dynamicQueryCount(DynamicQuery dynamicQuery)
203 throws SystemException {
204 return announcementsDeliveryPersistence.countWithDynamicQuery(dynamicQuery);
205 }
206
207 public AnnouncementsDelivery fetchAnnouncementsDelivery(long deliveryId)
208 throws SystemException {
209 return announcementsDeliveryPersistence.fetchByPrimaryKey(deliveryId);
210 }
211
212
220 public AnnouncementsDelivery getAnnouncementsDelivery(long deliveryId)
221 throws PortalException, SystemException {
222 return announcementsDeliveryPersistence.findByPrimaryKey(deliveryId);
223 }
224
225 public PersistedModel getPersistedModel(Serializable primaryKeyObj)
226 throws PortalException, SystemException {
227 return announcementsDeliveryPersistence.findByPrimaryKey(primaryKeyObj);
228 }
229
230
242 public List<AnnouncementsDelivery> getAnnouncementsDeliveries(int start,
243 int end) throws SystemException {
244 return announcementsDeliveryPersistence.findAll(start, end);
245 }
246
247
253 public int getAnnouncementsDeliveriesCount() throws SystemException {
254 return announcementsDeliveryPersistence.countAll();
255 }
256
257
264 @Indexable(type = IndexableType.REINDEX)
265 public AnnouncementsDelivery updateAnnouncementsDelivery(
266 AnnouncementsDelivery announcementsDelivery) throws SystemException {
267 return updateAnnouncementsDelivery(announcementsDelivery, true);
268 }
269
270
278 @Indexable(type = IndexableType.REINDEX)
279 public AnnouncementsDelivery updateAnnouncementsDelivery(
280 AnnouncementsDelivery announcementsDelivery, boolean merge)
281 throws SystemException {
282 announcementsDelivery.setNew(false);
283
284 return announcementsDeliveryPersistence.update(announcementsDelivery,
285 merge);
286 }
287
288
293 public AnnouncementsDeliveryLocalService getAnnouncementsDeliveryLocalService() {
294 return announcementsDeliveryLocalService;
295 }
296
297
302 public void setAnnouncementsDeliveryLocalService(
303 AnnouncementsDeliveryLocalService announcementsDeliveryLocalService) {
304 this.announcementsDeliveryLocalService = announcementsDeliveryLocalService;
305 }
306
307
312 public AnnouncementsDeliveryService getAnnouncementsDeliveryService() {
313 return announcementsDeliveryService;
314 }
315
316
321 public void setAnnouncementsDeliveryService(
322 AnnouncementsDeliveryService announcementsDeliveryService) {
323 this.announcementsDeliveryService = announcementsDeliveryService;
324 }
325
326
331 public AnnouncementsDeliveryPersistence getAnnouncementsDeliveryPersistence() {
332 return announcementsDeliveryPersistence;
333 }
334
335
340 public void setAnnouncementsDeliveryPersistence(
341 AnnouncementsDeliveryPersistence announcementsDeliveryPersistence) {
342 this.announcementsDeliveryPersistence = announcementsDeliveryPersistence;
343 }
344
345
350 public AnnouncementsEntryLocalService getAnnouncementsEntryLocalService() {
351 return announcementsEntryLocalService;
352 }
353
354
359 public void setAnnouncementsEntryLocalService(
360 AnnouncementsEntryLocalService announcementsEntryLocalService) {
361 this.announcementsEntryLocalService = announcementsEntryLocalService;
362 }
363
364
369 public AnnouncementsEntryService getAnnouncementsEntryService() {
370 return announcementsEntryService;
371 }
372
373
378 public void setAnnouncementsEntryService(
379 AnnouncementsEntryService announcementsEntryService) {
380 this.announcementsEntryService = announcementsEntryService;
381 }
382
383
388 public AnnouncementsEntryPersistence getAnnouncementsEntryPersistence() {
389 return announcementsEntryPersistence;
390 }
391
392
397 public void setAnnouncementsEntryPersistence(
398 AnnouncementsEntryPersistence announcementsEntryPersistence) {
399 this.announcementsEntryPersistence = announcementsEntryPersistence;
400 }
401
402
407 public AnnouncementsEntryFinder getAnnouncementsEntryFinder() {
408 return announcementsEntryFinder;
409 }
410
411
416 public void setAnnouncementsEntryFinder(
417 AnnouncementsEntryFinder announcementsEntryFinder) {
418 this.announcementsEntryFinder = announcementsEntryFinder;
419 }
420
421
426 public AnnouncementsFlagLocalService getAnnouncementsFlagLocalService() {
427 return announcementsFlagLocalService;
428 }
429
430
435 public void setAnnouncementsFlagLocalService(
436 AnnouncementsFlagLocalService announcementsFlagLocalService) {
437 this.announcementsFlagLocalService = announcementsFlagLocalService;
438 }
439
440
445 public AnnouncementsFlagService getAnnouncementsFlagService() {
446 return announcementsFlagService;
447 }
448
449
454 public void setAnnouncementsFlagService(
455 AnnouncementsFlagService announcementsFlagService) {
456 this.announcementsFlagService = announcementsFlagService;
457 }
458
459
464 public AnnouncementsFlagPersistence getAnnouncementsFlagPersistence() {
465 return announcementsFlagPersistence;
466 }
467
468
473 public void setAnnouncementsFlagPersistence(
474 AnnouncementsFlagPersistence announcementsFlagPersistence) {
475 this.announcementsFlagPersistence = announcementsFlagPersistence;
476 }
477
478
483 public CounterLocalService getCounterLocalService() {
484 return counterLocalService;
485 }
486
487
492 public void setCounterLocalService(CounterLocalService counterLocalService) {
493 this.counterLocalService = counterLocalService;
494 }
495
496
501 public ResourceLocalService getResourceLocalService() {
502 return resourceLocalService;
503 }
504
505
510 public void setResourceLocalService(
511 ResourceLocalService resourceLocalService) {
512 this.resourceLocalService = resourceLocalService;
513 }
514
515
520 public ResourceService getResourceService() {
521 return resourceService;
522 }
523
524
529 public void setResourceService(ResourceService resourceService) {
530 this.resourceService = resourceService;
531 }
532
533
538 public ResourcePersistence getResourcePersistence() {
539 return resourcePersistence;
540 }
541
542
547 public void setResourcePersistence(ResourcePersistence resourcePersistence) {
548 this.resourcePersistence = resourcePersistence;
549 }
550
551
556 public ResourceFinder getResourceFinder() {
557 return resourceFinder;
558 }
559
560
565 public void setResourceFinder(ResourceFinder resourceFinder) {
566 this.resourceFinder = resourceFinder;
567 }
568
569
574 public UserLocalService getUserLocalService() {
575 return userLocalService;
576 }
577
578
583 public void setUserLocalService(UserLocalService userLocalService) {
584 this.userLocalService = userLocalService;
585 }
586
587
592 public UserService getUserService() {
593 return userService;
594 }
595
596
601 public void setUserService(UserService userService) {
602 this.userService = userService;
603 }
604
605
610 public UserPersistence getUserPersistence() {
611 return userPersistence;
612 }
613
614
619 public void setUserPersistence(UserPersistence userPersistence) {
620 this.userPersistence = userPersistence;
621 }
622
623
628 public UserFinder getUserFinder() {
629 return userFinder;
630 }
631
632
637 public void setUserFinder(UserFinder userFinder) {
638 this.userFinder = userFinder;
639 }
640
641 public void afterPropertiesSet() {
642 persistedModelLocalServiceRegistry.register("com.liferay.portlet.announcements.model.AnnouncementsDelivery",
643 announcementsDeliveryLocalService);
644 }
645
646 public void destroy() {
647 persistedModelLocalServiceRegistry.unregister(
648 "com.liferay.portlet.announcements.model.AnnouncementsDelivery");
649 }
650
651
656 public String getBeanIdentifier() {
657 return _beanIdentifier;
658 }
659
660
665 public void setBeanIdentifier(String beanIdentifier) {
666 _beanIdentifier = beanIdentifier;
667 }
668
669 protected Class<?> getModelClass() {
670 return AnnouncementsDelivery.class;
671 }
672
673 protected String getModelClassName() {
674 return AnnouncementsDelivery.class.getName();
675 }
676
677
682 protected void runSQL(String sql) throws SystemException {
683 try {
684 DataSource dataSource = announcementsDeliveryPersistence.getDataSource();
685
686 SqlUpdate sqlUpdate = SqlUpdateFactoryUtil.getSqlUpdate(dataSource,
687 sql, new int[0]);
688
689 sqlUpdate.update();
690 }
691 catch (Exception e) {
692 throw new SystemException(e);
693 }
694 }
695
696 @BeanReference(type = AnnouncementsDeliveryLocalService.class)
697 protected AnnouncementsDeliveryLocalService announcementsDeliveryLocalService;
698 @BeanReference(type = AnnouncementsDeliveryService.class)
699 protected AnnouncementsDeliveryService announcementsDeliveryService;
700 @BeanReference(type = AnnouncementsDeliveryPersistence.class)
701 protected AnnouncementsDeliveryPersistence announcementsDeliveryPersistence;
702 @BeanReference(type = AnnouncementsEntryLocalService.class)
703 protected AnnouncementsEntryLocalService announcementsEntryLocalService;
704 @BeanReference(type = AnnouncementsEntryService.class)
705 protected AnnouncementsEntryService announcementsEntryService;
706 @BeanReference(type = AnnouncementsEntryPersistence.class)
707 protected AnnouncementsEntryPersistence announcementsEntryPersistence;
708 @BeanReference(type = AnnouncementsEntryFinder.class)
709 protected AnnouncementsEntryFinder announcementsEntryFinder;
710 @BeanReference(type = AnnouncementsFlagLocalService.class)
711 protected AnnouncementsFlagLocalService announcementsFlagLocalService;
712 @BeanReference(type = AnnouncementsFlagService.class)
713 protected AnnouncementsFlagService announcementsFlagService;
714 @BeanReference(type = AnnouncementsFlagPersistence.class)
715 protected AnnouncementsFlagPersistence announcementsFlagPersistence;
716 @BeanReference(type = CounterLocalService.class)
717 protected CounterLocalService counterLocalService;
718 @BeanReference(type = ResourceLocalService.class)
719 protected ResourceLocalService resourceLocalService;
720 @BeanReference(type = ResourceService.class)
721 protected ResourceService resourceService;
722 @BeanReference(type = ResourcePersistence.class)
723 protected ResourcePersistence resourcePersistence;
724 @BeanReference(type = ResourceFinder.class)
725 protected ResourceFinder resourceFinder;
726 @BeanReference(type = UserLocalService.class)
727 protected UserLocalService userLocalService;
728 @BeanReference(type = UserService.class)
729 protected UserService userService;
730 @BeanReference(type = UserPersistence.class)
731 protected UserPersistence userPersistence;
732 @BeanReference(type = UserFinder.class)
733 protected UserFinder userFinder;
734 @BeanReference(type = PersistedModelLocalServiceRegistry.class)
735 protected PersistedModelLocalServiceRegistry persistedModelLocalServiceRegistry;
736 private String _beanIdentifier;
737 }