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.AnnouncementsFlag;
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 AnnouncementsFlagLocalServiceBaseImpl
068 implements AnnouncementsFlagLocalService {
069
076 public AnnouncementsFlag addAnnouncementsFlag(
077 AnnouncementsFlag announcementsFlag) throws SystemException {
078 announcementsFlag.setNew(true);
079
080 return announcementsFlagPersistence.update(announcementsFlag, false);
081 }
082
083
089 public AnnouncementsFlag createAnnouncementsFlag(long flagId) {
090 return announcementsFlagPersistence.create(flagId);
091 }
092
093
100 public void deleteAnnouncementsFlag(long flagId)
101 throws PortalException, SystemException {
102 announcementsFlagPersistence.remove(flagId);
103 }
104
105
111 public void deleteAnnouncementsFlag(AnnouncementsFlag announcementsFlag)
112 throws SystemException {
113 announcementsFlagPersistence.remove(announcementsFlag);
114 }
115
116
123 @SuppressWarnings("rawtypes")
124 public List dynamicQuery(DynamicQuery dynamicQuery)
125 throws SystemException {
126 return announcementsFlagPersistence.findWithDynamicQuery(dynamicQuery);
127 }
128
129
142 @SuppressWarnings("rawtypes")
143 public List dynamicQuery(DynamicQuery dynamicQuery, int start, int end)
144 throws SystemException {
145 return announcementsFlagPersistence.findWithDynamicQuery(dynamicQuery,
146 start, end);
147 }
148
149
163 @SuppressWarnings("rawtypes")
164 public List dynamicQuery(DynamicQuery dynamicQuery, int start, int end,
165 OrderByComparator orderByComparator) throws SystemException {
166 return announcementsFlagPersistence.findWithDynamicQuery(dynamicQuery,
167 start, end, orderByComparator);
168 }
169
170
177 public long dynamicQueryCount(DynamicQuery dynamicQuery)
178 throws SystemException {
179 return announcementsFlagPersistence.countWithDynamicQuery(dynamicQuery);
180 }
181
182
190 public AnnouncementsFlag getAnnouncementsFlag(long flagId)
191 throws PortalException, SystemException {
192 return announcementsFlagPersistence.findByPrimaryKey(flagId);
193 }
194
195
207 public List<AnnouncementsFlag> getAnnouncementsFlags(int start, int end)
208 throws SystemException {
209 return announcementsFlagPersistence.findAll(start, end);
210 }
211
212
218 public int getAnnouncementsFlagsCount() throws SystemException {
219 return announcementsFlagPersistence.countAll();
220 }
221
222
229 public AnnouncementsFlag updateAnnouncementsFlag(
230 AnnouncementsFlag announcementsFlag) throws SystemException {
231 announcementsFlag.setNew(false);
232
233 return announcementsFlagPersistence.update(announcementsFlag, true);
234 }
235
236
244 public AnnouncementsFlag updateAnnouncementsFlag(
245 AnnouncementsFlag announcementsFlag, boolean merge)
246 throws SystemException {
247 announcementsFlag.setNew(false);
248
249 return announcementsFlagPersistence.update(announcementsFlag, merge);
250 }
251
252
257 public AnnouncementsDeliveryLocalService getAnnouncementsDeliveryLocalService() {
258 return announcementsDeliveryLocalService;
259 }
260
261
266 public void setAnnouncementsDeliveryLocalService(
267 AnnouncementsDeliveryLocalService announcementsDeliveryLocalService) {
268 this.announcementsDeliveryLocalService = announcementsDeliveryLocalService;
269 }
270
271
276 public AnnouncementsDeliveryService getAnnouncementsDeliveryService() {
277 return announcementsDeliveryService;
278 }
279
280
285 public void setAnnouncementsDeliveryService(
286 AnnouncementsDeliveryService announcementsDeliveryService) {
287 this.announcementsDeliveryService = announcementsDeliveryService;
288 }
289
290
295 public AnnouncementsDeliveryPersistence getAnnouncementsDeliveryPersistence() {
296 return announcementsDeliveryPersistence;
297 }
298
299
304 public void setAnnouncementsDeliveryPersistence(
305 AnnouncementsDeliveryPersistence announcementsDeliveryPersistence) {
306 this.announcementsDeliveryPersistence = announcementsDeliveryPersistence;
307 }
308
309
314 public AnnouncementsEntryLocalService getAnnouncementsEntryLocalService() {
315 return announcementsEntryLocalService;
316 }
317
318
323 public void setAnnouncementsEntryLocalService(
324 AnnouncementsEntryLocalService announcementsEntryLocalService) {
325 this.announcementsEntryLocalService = announcementsEntryLocalService;
326 }
327
328
333 public AnnouncementsEntryService getAnnouncementsEntryService() {
334 return announcementsEntryService;
335 }
336
337
342 public void setAnnouncementsEntryService(
343 AnnouncementsEntryService announcementsEntryService) {
344 this.announcementsEntryService = announcementsEntryService;
345 }
346
347
352 public AnnouncementsEntryPersistence getAnnouncementsEntryPersistence() {
353 return announcementsEntryPersistence;
354 }
355
356
361 public void setAnnouncementsEntryPersistence(
362 AnnouncementsEntryPersistence announcementsEntryPersistence) {
363 this.announcementsEntryPersistence = announcementsEntryPersistence;
364 }
365
366
371 public AnnouncementsEntryFinder getAnnouncementsEntryFinder() {
372 return announcementsEntryFinder;
373 }
374
375
380 public void setAnnouncementsEntryFinder(
381 AnnouncementsEntryFinder announcementsEntryFinder) {
382 this.announcementsEntryFinder = announcementsEntryFinder;
383 }
384
385
390 public AnnouncementsFlagLocalService getAnnouncementsFlagLocalService() {
391 return announcementsFlagLocalService;
392 }
393
394
399 public void setAnnouncementsFlagLocalService(
400 AnnouncementsFlagLocalService announcementsFlagLocalService) {
401 this.announcementsFlagLocalService = announcementsFlagLocalService;
402 }
403
404
409 public AnnouncementsFlagService getAnnouncementsFlagService() {
410 return announcementsFlagService;
411 }
412
413
418 public void setAnnouncementsFlagService(
419 AnnouncementsFlagService announcementsFlagService) {
420 this.announcementsFlagService = announcementsFlagService;
421 }
422
423
428 public AnnouncementsFlagPersistence getAnnouncementsFlagPersistence() {
429 return announcementsFlagPersistence;
430 }
431
432
437 public void setAnnouncementsFlagPersistence(
438 AnnouncementsFlagPersistence announcementsFlagPersistence) {
439 this.announcementsFlagPersistence = announcementsFlagPersistence;
440 }
441
442
447 public CounterLocalService getCounterLocalService() {
448 return counterLocalService;
449 }
450
451
456 public void setCounterLocalService(CounterLocalService counterLocalService) {
457 this.counterLocalService = counterLocalService;
458 }
459
460
465 public ResourceLocalService getResourceLocalService() {
466 return resourceLocalService;
467 }
468
469
474 public void setResourceLocalService(
475 ResourceLocalService resourceLocalService) {
476 this.resourceLocalService = resourceLocalService;
477 }
478
479
484 public ResourceService getResourceService() {
485 return resourceService;
486 }
487
488
493 public void setResourceService(ResourceService resourceService) {
494 this.resourceService = resourceService;
495 }
496
497
502 public ResourcePersistence getResourcePersistence() {
503 return resourcePersistence;
504 }
505
506
511 public void setResourcePersistence(ResourcePersistence resourcePersistence) {
512 this.resourcePersistence = resourcePersistence;
513 }
514
515
520 public ResourceFinder getResourceFinder() {
521 return resourceFinder;
522 }
523
524
529 public void setResourceFinder(ResourceFinder resourceFinder) {
530 this.resourceFinder = resourceFinder;
531 }
532
533
538 public UserLocalService getUserLocalService() {
539 return userLocalService;
540 }
541
542
547 public void setUserLocalService(UserLocalService userLocalService) {
548 this.userLocalService = userLocalService;
549 }
550
551
556 public UserService getUserService() {
557 return userService;
558 }
559
560
565 public void setUserService(UserService userService) {
566 this.userService = userService;
567 }
568
569
574 public UserPersistence getUserPersistence() {
575 return userPersistence;
576 }
577
578
583 public void setUserPersistence(UserPersistence userPersistence) {
584 this.userPersistence = userPersistence;
585 }
586
587
592 public UserFinder getUserFinder() {
593 return userFinder;
594 }
595
596
601 public void setUserFinder(UserFinder userFinder) {
602 this.userFinder = userFinder;
603 }
604
605
610 protected void runSQL(String sql) throws SystemException {
611 try {
612 DataSource dataSource = announcementsFlagPersistence.getDataSource();
613
614 SqlUpdate sqlUpdate = SqlUpdateFactoryUtil.getSqlUpdate(dataSource,
615 sql, new int[0]);
616
617 sqlUpdate.update();
618 }
619 catch (Exception e) {
620 throw new SystemException(e);
621 }
622 }
623
624 @BeanReference(type = AnnouncementsDeliveryLocalService.class)
625 protected AnnouncementsDeliveryLocalService announcementsDeliveryLocalService;
626 @BeanReference(type = AnnouncementsDeliveryService.class)
627 protected AnnouncementsDeliveryService announcementsDeliveryService;
628 @BeanReference(type = AnnouncementsDeliveryPersistence.class)
629 protected AnnouncementsDeliveryPersistence announcementsDeliveryPersistence;
630 @BeanReference(type = AnnouncementsEntryLocalService.class)
631 protected AnnouncementsEntryLocalService announcementsEntryLocalService;
632 @BeanReference(type = AnnouncementsEntryService.class)
633 protected AnnouncementsEntryService announcementsEntryService;
634 @BeanReference(type = AnnouncementsEntryPersistence.class)
635 protected AnnouncementsEntryPersistence announcementsEntryPersistence;
636 @BeanReference(type = AnnouncementsEntryFinder.class)
637 protected AnnouncementsEntryFinder announcementsEntryFinder;
638 @BeanReference(type = AnnouncementsFlagLocalService.class)
639 protected AnnouncementsFlagLocalService announcementsFlagLocalService;
640 @BeanReference(type = AnnouncementsFlagService.class)
641 protected AnnouncementsFlagService announcementsFlagService;
642 @BeanReference(type = AnnouncementsFlagPersistence.class)
643 protected AnnouncementsFlagPersistence announcementsFlagPersistence;
644 @BeanReference(type = CounterLocalService.class)
645 protected CounterLocalService counterLocalService;
646 @BeanReference(type = ResourceLocalService.class)
647 protected ResourceLocalService resourceLocalService;
648 @BeanReference(type = ResourceService.class)
649 protected ResourceService resourceService;
650 @BeanReference(type = ResourcePersistence.class)
651 protected ResourcePersistence resourcePersistence;
652 @BeanReference(type = ResourceFinder.class)
653 protected ResourceFinder resourceFinder;
654 @BeanReference(type = UserLocalService.class)
655 protected UserLocalService userLocalService;
656 @BeanReference(type = UserService.class)
657 protected UserService userService;
658 @BeanReference(type = UserPersistence.class)
659 protected UserPersistence userPersistence;
660 @BeanReference(type = UserFinder.class)
661 protected UserFinder userFinder;
662 }