001
014
015 package com.liferay.portlet.announcements.service.base;
016
017 import com.liferay.portal.kernel.bean.BeanReference;
018 import com.liferay.portal.kernel.bean.IdentifiableBean;
019 import com.liferay.portal.kernel.dao.jdbc.SqlUpdate;
020 import com.liferay.portal.kernel.dao.jdbc.SqlUpdateFactoryUtil;
021 import com.liferay.portal.kernel.dao.orm.DynamicQuery;
022 import com.liferay.portal.kernel.dao.orm.DynamicQueryFactoryUtil;
023 import com.liferay.portal.kernel.dao.orm.Projection;
024 import com.liferay.portal.kernel.exception.PortalException;
025 import com.liferay.portal.kernel.exception.SystemException;
026 import com.liferay.portal.kernel.search.Indexable;
027 import com.liferay.portal.kernel.search.IndexableType;
028 import com.liferay.portal.kernel.util.OrderByComparator;
029 import com.liferay.portal.model.PersistedModel;
030 import com.liferay.portal.service.BaseLocalServiceImpl;
031 import com.liferay.portal.service.PersistedModelLocalServiceRegistry;
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.persistence.AnnouncementsDeliveryPersistence;
038 import com.liferay.portlet.announcements.service.persistence.AnnouncementsEntryFinder;
039 import com.liferay.portlet.announcements.service.persistence.AnnouncementsEntryPersistence;
040 import com.liferay.portlet.announcements.service.persistence.AnnouncementsFlagPersistence;
041
042 import java.io.Serializable;
043
044 import java.util.List;
045
046 import javax.sql.DataSource;
047
048
060 public abstract class AnnouncementsDeliveryLocalServiceBaseImpl
061 extends BaseLocalServiceImpl implements AnnouncementsDeliveryLocalService,
062 IdentifiableBean {
063
068
069
076 @Indexable(type = IndexableType.REINDEX)
077 @Override
078 public AnnouncementsDelivery addAnnouncementsDelivery(
079 AnnouncementsDelivery announcementsDelivery) throws SystemException {
080 announcementsDelivery.setNew(true);
081
082 return announcementsDeliveryPersistence.update(announcementsDelivery);
083 }
084
085
091 @Override
092 public AnnouncementsDelivery createAnnouncementsDelivery(long deliveryId) {
093 return announcementsDeliveryPersistence.create(deliveryId);
094 }
095
096
104 @Indexable(type = IndexableType.DELETE)
105 @Override
106 public AnnouncementsDelivery deleteAnnouncementsDelivery(long deliveryId)
107 throws PortalException, SystemException {
108 return announcementsDeliveryPersistence.remove(deliveryId);
109 }
110
111
118 @Indexable(type = IndexableType.DELETE)
119 @Override
120 public AnnouncementsDelivery deleteAnnouncementsDelivery(
121 AnnouncementsDelivery announcementsDelivery) throws SystemException {
122 return announcementsDeliveryPersistence.remove(announcementsDelivery);
123 }
124
125 @Override
126 public DynamicQuery dynamicQuery() {
127 Class<?> clazz = getClass();
128
129 return DynamicQueryFactoryUtil.forClass(AnnouncementsDelivery.class,
130 clazz.getClassLoader());
131 }
132
133
140 @Override
141 @SuppressWarnings("rawtypes")
142 public List dynamicQuery(DynamicQuery dynamicQuery)
143 throws SystemException {
144 return announcementsDeliveryPersistence.findWithDynamicQuery(dynamicQuery);
145 }
146
147
160 @Override
161 @SuppressWarnings("rawtypes")
162 public List dynamicQuery(DynamicQuery dynamicQuery, int start, int end)
163 throws SystemException {
164 return announcementsDeliveryPersistence.findWithDynamicQuery(dynamicQuery,
165 start, end);
166 }
167
168
182 @Override
183 @SuppressWarnings("rawtypes")
184 public List dynamicQuery(DynamicQuery dynamicQuery, int start, int end,
185 OrderByComparator orderByComparator) throws SystemException {
186 return announcementsDeliveryPersistence.findWithDynamicQuery(dynamicQuery,
187 start, end, orderByComparator);
188 }
189
190
197 @Override
198 public long dynamicQueryCount(DynamicQuery dynamicQuery)
199 throws SystemException {
200 return announcementsDeliveryPersistence.countWithDynamicQuery(dynamicQuery);
201 }
202
203
211 @Override
212 public long dynamicQueryCount(DynamicQuery dynamicQuery,
213 Projection projection) throws SystemException {
214 return announcementsDeliveryPersistence.countWithDynamicQuery(dynamicQuery,
215 projection);
216 }
217
218 @Override
219 public AnnouncementsDelivery fetchAnnouncementsDelivery(long deliveryId)
220 throws SystemException {
221 return announcementsDeliveryPersistence.fetchByPrimaryKey(deliveryId);
222 }
223
224
232 @Override
233 public AnnouncementsDelivery getAnnouncementsDelivery(long deliveryId)
234 throws PortalException, SystemException {
235 return announcementsDeliveryPersistence.findByPrimaryKey(deliveryId);
236 }
237
238 @Override
239 public PersistedModel getPersistedModel(Serializable primaryKeyObj)
240 throws PortalException, SystemException {
241 return announcementsDeliveryPersistence.findByPrimaryKey(primaryKeyObj);
242 }
243
244
256 @Override
257 public List<AnnouncementsDelivery> getAnnouncementsDeliveries(int start,
258 int end) throws SystemException {
259 return announcementsDeliveryPersistence.findAll(start, end);
260 }
261
262
268 @Override
269 public int getAnnouncementsDeliveriesCount() throws SystemException {
270 return announcementsDeliveryPersistence.countAll();
271 }
272
273
280 @Indexable(type = IndexableType.REINDEX)
281 @Override
282 public AnnouncementsDelivery updateAnnouncementsDelivery(
283 AnnouncementsDelivery announcementsDelivery) throws SystemException {
284 return announcementsDeliveryPersistence.update(announcementsDelivery);
285 }
286
287
292 public com.liferay.portlet.announcements.service.AnnouncementsDeliveryLocalService getAnnouncementsDeliveryLocalService() {
293 return announcementsDeliveryLocalService;
294 }
295
296
301 public void setAnnouncementsDeliveryLocalService(
302 com.liferay.portlet.announcements.service.AnnouncementsDeliveryLocalService announcementsDeliveryLocalService) {
303 this.announcementsDeliveryLocalService = announcementsDeliveryLocalService;
304 }
305
306
311 public com.liferay.portlet.announcements.service.AnnouncementsDeliveryService getAnnouncementsDeliveryService() {
312 return announcementsDeliveryService;
313 }
314
315
320 public void setAnnouncementsDeliveryService(
321 com.liferay.portlet.announcements.service.AnnouncementsDeliveryService announcementsDeliveryService) {
322 this.announcementsDeliveryService = announcementsDeliveryService;
323 }
324
325
330 public AnnouncementsDeliveryPersistence getAnnouncementsDeliveryPersistence() {
331 return announcementsDeliveryPersistence;
332 }
333
334
339 public void setAnnouncementsDeliveryPersistence(
340 AnnouncementsDeliveryPersistence announcementsDeliveryPersistence) {
341 this.announcementsDeliveryPersistence = announcementsDeliveryPersistence;
342 }
343
344
349 public com.liferay.portlet.announcements.service.AnnouncementsEntryLocalService getAnnouncementsEntryLocalService() {
350 return announcementsEntryLocalService;
351 }
352
353
358 public void setAnnouncementsEntryLocalService(
359 com.liferay.portlet.announcements.service.AnnouncementsEntryLocalService announcementsEntryLocalService) {
360 this.announcementsEntryLocalService = announcementsEntryLocalService;
361 }
362
363
368 public com.liferay.portlet.announcements.service.AnnouncementsEntryService getAnnouncementsEntryService() {
369 return announcementsEntryService;
370 }
371
372
377 public void setAnnouncementsEntryService(
378 com.liferay.portlet.announcements.service.AnnouncementsEntryService announcementsEntryService) {
379 this.announcementsEntryService = announcementsEntryService;
380 }
381
382
387 public AnnouncementsEntryPersistence getAnnouncementsEntryPersistence() {
388 return announcementsEntryPersistence;
389 }
390
391
396 public void setAnnouncementsEntryPersistence(
397 AnnouncementsEntryPersistence announcementsEntryPersistence) {
398 this.announcementsEntryPersistence = announcementsEntryPersistence;
399 }
400
401
406 public AnnouncementsEntryFinder getAnnouncementsEntryFinder() {
407 return announcementsEntryFinder;
408 }
409
410
415 public void setAnnouncementsEntryFinder(
416 AnnouncementsEntryFinder announcementsEntryFinder) {
417 this.announcementsEntryFinder = announcementsEntryFinder;
418 }
419
420
425 public com.liferay.portlet.announcements.service.AnnouncementsFlagLocalService getAnnouncementsFlagLocalService() {
426 return announcementsFlagLocalService;
427 }
428
429
434 public void setAnnouncementsFlagLocalService(
435 com.liferay.portlet.announcements.service.AnnouncementsFlagLocalService announcementsFlagLocalService) {
436 this.announcementsFlagLocalService = announcementsFlagLocalService;
437 }
438
439
444 public com.liferay.portlet.announcements.service.AnnouncementsFlagService getAnnouncementsFlagService() {
445 return announcementsFlagService;
446 }
447
448
453 public void setAnnouncementsFlagService(
454 com.liferay.portlet.announcements.service.AnnouncementsFlagService announcementsFlagService) {
455 this.announcementsFlagService = announcementsFlagService;
456 }
457
458
463 public AnnouncementsFlagPersistence getAnnouncementsFlagPersistence() {
464 return announcementsFlagPersistence;
465 }
466
467
472 public void setAnnouncementsFlagPersistence(
473 AnnouncementsFlagPersistence announcementsFlagPersistence) {
474 this.announcementsFlagPersistence = announcementsFlagPersistence;
475 }
476
477
482 public com.liferay.counter.service.CounterLocalService getCounterLocalService() {
483 return counterLocalService;
484 }
485
486
491 public void setCounterLocalService(
492 com.liferay.counter.service.CounterLocalService counterLocalService) {
493 this.counterLocalService = counterLocalService;
494 }
495
496
501 public com.liferay.portal.service.ResourceLocalService getResourceLocalService() {
502 return resourceLocalService;
503 }
504
505
510 public void setResourceLocalService(
511 com.liferay.portal.service.ResourceLocalService resourceLocalService) {
512 this.resourceLocalService = resourceLocalService;
513 }
514
515
520 public com.liferay.portal.service.UserLocalService getUserLocalService() {
521 return userLocalService;
522 }
523
524
529 public void setUserLocalService(
530 com.liferay.portal.service.UserLocalService userLocalService) {
531 this.userLocalService = userLocalService;
532 }
533
534
539 public com.liferay.portal.service.UserService getUserService() {
540 return userService;
541 }
542
543
548 public void setUserService(
549 com.liferay.portal.service.UserService userService) {
550 this.userService = userService;
551 }
552
553
558 public UserPersistence getUserPersistence() {
559 return userPersistence;
560 }
561
562
567 public void setUserPersistence(UserPersistence userPersistence) {
568 this.userPersistence = userPersistence;
569 }
570
571
576 public UserFinder getUserFinder() {
577 return userFinder;
578 }
579
580
585 public void setUserFinder(UserFinder userFinder) {
586 this.userFinder = userFinder;
587 }
588
589 public void afterPropertiesSet() {
590 persistedModelLocalServiceRegistry.register("com.liferay.portlet.announcements.model.AnnouncementsDelivery",
591 announcementsDeliveryLocalService);
592 }
593
594 public void destroy() {
595 persistedModelLocalServiceRegistry.unregister(
596 "com.liferay.portlet.announcements.model.AnnouncementsDelivery");
597 }
598
599
604 @Override
605 public String getBeanIdentifier() {
606 return _beanIdentifier;
607 }
608
609
614 @Override
615 public void setBeanIdentifier(String beanIdentifier) {
616 _beanIdentifier = beanIdentifier;
617 }
618
619 protected Class<?> getModelClass() {
620 return AnnouncementsDelivery.class;
621 }
622
623 protected String getModelClassName() {
624 return AnnouncementsDelivery.class.getName();
625 }
626
627
632 protected void runSQL(String sql) throws SystemException {
633 try {
634 DataSource dataSource = announcementsDeliveryPersistence.getDataSource();
635
636 SqlUpdate sqlUpdate = SqlUpdateFactoryUtil.getSqlUpdate(dataSource,
637 sql, new int[0]);
638
639 sqlUpdate.update();
640 }
641 catch (Exception e) {
642 throw new SystemException(e);
643 }
644 }
645
646 @BeanReference(type = com.liferay.portlet.announcements.service.AnnouncementsDeliveryLocalService.class)
647 protected com.liferay.portlet.announcements.service.AnnouncementsDeliveryLocalService announcementsDeliveryLocalService;
648 @BeanReference(type = com.liferay.portlet.announcements.service.AnnouncementsDeliveryService.class)
649 protected com.liferay.portlet.announcements.service.AnnouncementsDeliveryService announcementsDeliveryService;
650 @BeanReference(type = AnnouncementsDeliveryPersistence.class)
651 protected AnnouncementsDeliveryPersistence announcementsDeliveryPersistence;
652 @BeanReference(type = com.liferay.portlet.announcements.service.AnnouncementsEntryLocalService.class)
653 protected com.liferay.portlet.announcements.service.AnnouncementsEntryLocalService announcementsEntryLocalService;
654 @BeanReference(type = com.liferay.portlet.announcements.service.AnnouncementsEntryService.class)
655 protected com.liferay.portlet.announcements.service.AnnouncementsEntryService announcementsEntryService;
656 @BeanReference(type = AnnouncementsEntryPersistence.class)
657 protected AnnouncementsEntryPersistence announcementsEntryPersistence;
658 @BeanReference(type = AnnouncementsEntryFinder.class)
659 protected AnnouncementsEntryFinder announcementsEntryFinder;
660 @BeanReference(type = com.liferay.portlet.announcements.service.AnnouncementsFlagLocalService.class)
661 protected com.liferay.portlet.announcements.service.AnnouncementsFlagLocalService announcementsFlagLocalService;
662 @BeanReference(type = com.liferay.portlet.announcements.service.AnnouncementsFlagService.class)
663 protected com.liferay.portlet.announcements.service.AnnouncementsFlagService announcementsFlagService;
664 @BeanReference(type = AnnouncementsFlagPersistence.class)
665 protected AnnouncementsFlagPersistence announcementsFlagPersistence;
666 @BeanReference(type = com.liferay.counter.service.CounterLocalService.class)
667 protected com.liferay.counter.service.CounterLocalService counterLocalService;
668 @BeanReference(type = com.liferay.portal.service.ResourceLocalService.class)
669 protected com.liferay.portal.service.ResourceLocalService resourceLocalService;
670 @BeanReference(type = com.liferay.portal.service.UserLocalService.class)
671 protected com.liferay.portal.service.UserLocalService userLocalService;
672 @BeanReference(type = com.liferay.portal.service.UserService.class)
673 protected com.liferay.portal.service.UserService userService;
674 @BeanReference(type = UserPersistence.class)
675 protected UserPersistence userPersistence;
676 @BeanReference(type = UserFinder.class)
677 protected UserFinder userFinder;
678 @BeanReference(type = PersistedModelLocalServiceRegistry.class)
679 protected PersistedModelLocalServiceRegistry persistedModelLocalServiceRegistry;
680 private String _beanIdentifier;
681 }