001    /**
002     * Copyright (c) 2000-2010 Liferay, Inc. All rights reserved.
003     *
004     * This library is free software; you can redistribute it and/or modify it under
005     * the terms of the GNU Lesser General Public License as published by the Free
006     * Software Foundation; either version 2.1 of the License, or (at your option)
007     * any later version.
008     *
009     * This library is distributed in the hope that it will be useful, but WITHOUT
010     * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
011     * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
012     * details.
013     */
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.annotation.BeanReference;
022    import com.liferay.portal.kernel.dao.jdbc.SqlUpdate;
023    import com.liferay.portal.kernel.dao.jdbc.SqlUpdateFactoryUtil;
024    import com.liferay.portal.kernel.dao.orm.DynamicQuery;
025    import com.liferay.portal.kernel.exception.PortalException;
026    import com.liferay.portal.kernel.exception.SystemException;
027    import com.liferay.portal.kernel.util.OrderByComparator;
028    import com.liferay.portal.service.CompanyLocalService;
029    import com.liferay.portal.service.CompanyService;
030    import com.liferay.portal.service.GroupLocalService;
031    import com.liferay.portal.service.GroupService;
032    import com.liferay.portal.service.OrganizationLocalService;
033    import com.liferay.portal.service.OrganizationService;
034    import com.liferay.portal.service.ResourceLocalService;
035    import com.liferay.portal.service.ResourceService;
036    import com.liferay.portal.service.RoleLocalService;
037    import com.liferay.portal.service.RoleService;
038    import com.liferay.portal.service.UserGroupLocalService;
039    import com.liferay.portal.service.UserGroupService;
040    import com.liferay.portal.service.UserLocalService;
041    import com.liferay.portal.service.UserService;
042    import com.liferay.portal.service.persistence.CompanyPersistence;
043    import com.liferay.portal.service.persistence.GroupFinder;
044    import com.liferay.portal.service.persistence.GroupPersistence;
045    import com.liferay.portal.service.persistence.OrganizationFinder;
046    import com.liferay.portal.service.persistence.OrganizationPersistence;
047    import com.liferay.portal.service.persistence.ResourceFinder;
048    import com.liferay.portal.service.persistence.ResourcePersistence;
049    import com.liferay.portal.service.persistence.RoleFinder;
050    import com.liferay.portal.service.persistence.RolePersistence;
051    import com.liferay.portal.service.persistence.UserFinder;
052    import com.liferay.portal.service.persistence.UserGroupFinder;
053    import com.liferay.portal.service.persistence.UserGroupPersistence;
054    import com.liferay.portal.service.persistence.UserPersistence;
055    
056    import com.liferay.portlet.announcements.model.AnnouncementsEntry;
057    import com.liferay.portlet.announcements.service.AnnouncementsDeliveryLocalService;
058    import com.liferay.portlet.announcements.service.AnnouncementsDeliveryService;
059    import com.liferay.portlet.announcements.service.AnnouncementsEntryLocalService;
060    import com.liferay.portlet.announcements.service.AnnouncementsEntryService;
061    import com.liferay.portlet.announcements.service.AnnouncementsFlagLocalService;
062    import com.liferay.portlet.announcements.service.AnnouncementsFlagService;
063    import com.liferay.portlet.announcements.service.persistence.AnnouncementsDeliveryPersistence;
064    import com.liferay.portlet.announcements.service.persistence.AnnouncementsEntryFinder;
065    import com.liferay.portlet.announcements.service.persistence.AnnouncementsEntryPersistence;
066    import com.liferay.portlet.announcements.service.persistence.AnnouncementsFlagPersistence;
067    
068    import java.util.List;
069    
070    import javax.sql.DataSource;
071    
072    /**
073     * The base implementation of the announcements entry local service.
074     *
075     * <p>
076     * This implementation exists only as a container for the default service methods generated by ServiceBuilder. All custom service methods should be put in {@link com.liferay.portlet.announcements.service.impl.AnnouncementsEntryLocalServiceImpl}.
077     * </p>
078     *
079     * <p>
080     * Never modify or reference this class directly. Always use {@link com.liferay.portlet.announcements.service.AnnouncementsEntryLocalServiceUtil} to access the announcements entry local service.
081     * </p>
082     *
083     * @author Brian Wing Shun Chan
084     * @see com.liferay.portlet.announcements.service.impl.AnnouncementsEntryLocalServiceImpl
085     * @see com.liferay.portlet.announcements.service.AnnouncementsEntryLocalServiceUtil
086     * @generated
087     */
088    public abstract class AnnouncementsEntryLocalServiceBaseImpl
089            implements AnnouncementsEntryLocalService {
090            /**
091             * Adds the announcements entry to the database. Also notifies the appropriate model listeners.
092             *
093             * @param announcementsEntry the announcements entry to add
094             * @return the announcements entry that was added
095             * @throws SystemException if a system exception occurred
096             */
097            public AnnouncementsEntry addAnnouncementsEntry(
098                    AnnouncementsEntry announcementsEntry) throws SystemException {
099                    announcementsEntry.setNew(true);
100    
101                    return announcementsEntryPersistence.update(announcementsEntry, false);
102            }
103    
104            /**
105             * Creates a new announcements entry with the primary key. Does not add the announcements entry to the database.
106             *
107             * @param entryId the primary key for the new announcements entry
108             * @return the new announcements entry
109             */
110            public AnnouncementsEntry createAnnouncementsEntry(long entryId) {
111                    return announcementsEntryPersistence.create(entryId);
112            }
113    
114            /**
115             * Deletes the announcements entry with the primary key from the database. Also notifies the appropriate model listeners.
116             *
117             * @param entryId the primary key of the announcements entry to delete
118             * @throws PortalException if a announcements entry with the primary key could not be found
119             * @throws SystemException if a system exception occurred
120             */
121            public void deleteAnnouncementsEntry(long entryId)
122                    throws PortalException, SystemException {
123                    announcementsEntryPersistence.remove(entryId);
124            }
125    
126            /**
127             * Deletes the announcements entry from the database. Also notifies the appropriate model listeners.
128             *
129             * @param announcementsEntry the announcements entry to delete
130             * @throws SystemException if a system exception occurred
131             */
132            public void deleteAnnouncementsEntry(AnnouncementsEntry announcementsEntry)
133                    throws SystemException {
134                    announcementsEntryPersistence.remove(announcementsEntry);
135            }
136    
137            /**
138             * Performs a dynamic query on the database and returns the matching rows.
139             *
140             * @param dynamicQuery the dynamic query to search with
141             * @return the matching rows
142             * @throws SystemException if a system exception occurred
143             */
144            @SuppressWarnings("rawtypes")
145            public List dynamicQuery(DynamicQuery dynamicQuery)
146                    throws SystemException {
147                    return announcementsEntryPersistence.findWithDynamicQuery(dynamicQuery);
148            }
149    
150            /**
151             * Performs a dynamic query on the database and returns a range of the matching rows.
152             *
153             * <p>
154             * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
155             * </p>
156             *
157             * @param dynamicQuery the dynamic query to search with
158             * @param start the lower bound of the range of model instances to return
159             * @param end the upper bound of the range of model instances to return (not inclusive)
160             * @return the range of matching rows
161             * @throws SystemException if a system exception occurred
162             */
163            @SuppressWarnings("rawtypes")
164            public List dynamicQuery(DynamicQuery dynamicQuery, int start, int end)
165                    throws SystemException {
166                    return announcementsEntryPersistence.findWithDynamicQuery(dynamicQuery,
167                            start, end);
168            }
169    
170            /**
171             * Performs a dynamic query on the database and returns an ordered range of the matching rows.
172             *
173             * <p>
174             * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
175             * </p>
176             *
177             * @param dynamicQuery the dynamic query to search with
178             * @param start the lower bound of the range of model instances to return
179             * @param end the upper bound of the range of model instances to return (not inclusive)
180             * @param orderByComparator the comparator to order the results by
181             * @return the ordered range of matching rows
182             * @throws SystemException if a system exception occurred
183             */
184            @SuppressWarnings("rawtypes")
185            public List dynamicQuery(DynamicQuery dynamicQuery, int start, int end,
186                    OrderByComparator orderByComparator) throws SystemException {
187                    return announcementsEntryPersistence.findWithDynamicQuery(dynamicQuery,
188                            start, end, orderByComparator);
189            }
190    
191            /**
192             * Counts the number of rows that match the dynamic query.
193             *
194             * @param dynamicQuery the dynamic query to search with
195             * @return the number of rows that match the dynamic query
196             * @throws SystemException if a system exception occurred
197             */
198            public long dynamicQueryCount(DynamicQuery dynamicQuery)
199                    throws SystemException {
200                    return announcementsEntryPersistence.countWithDynamicQuery(dynamicQuery);
201            }
202    
203            /**
204             * Gets the announcements entry with the primary key.
205             *
206             * @param entryId the primary key of the announcements entry to get
207             * @return the announcements entry
208             * @throws PortalException if a announcements entry with the primary key could not be found
209             * @throws SystemException if a system exception occurred
210             */
211            public AnnouncementsEntry getAnnouncementsEntry(long entryId)
212                    throws PortalException, SystemException {
213                    return announcementsEntryPersistence.findByPrimaryKey(entryId);
214            }
215    
216            /**
217             * Gets a range of all the announcements entries.
218             *
219             * <p>
220             * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
221             * </p>
222             *
223             * @param start the lower bound of the range of announcements entries to return
224             * @param end the upper bound of the range of announcements entries to return (not inclusive)
225             * @return the range of announcements entries
226             * @throws SystemException if a system exception occurred
227             */
228            public List<AnnouncementsEntry> getAnnouncementsEntries(int start, int end)
229                    throws SystemException {
230                    return announcementsEntryPersistence.findAll(start, end);
231            }
232    
233            /**
234             * Gets the number of announcements entries.
235             *
236             * @return the number of announcements entries
237             * @throws SystemException if a system exception occurred
238             */
239            public int getAnnouncementsEntriesCount() throws SystemException {
240                    return announcementsEntryPersistence.countAll();
241            }
242    
243            /**
244             * Updates the announcements entry in the database. Also notifies the appropriate model listeners.
245             *
246             * @param announcementsEntry the announcements entry to update
247             * @return the announcements entry that was updated
248             * @throws SystemException if a system exception occurred
249             */
250            public AnnouncementsEntry updateAnnouncementsEntry(
251                    AnnouncementsEntry announcementsEntry) throws SystemException {
252                    announcementsEntry.setNew(false);
253    
254                    return announcementsEntryPersistence.update(announcementsEntry, true);
255            }
256    
257            /**
258             * Updates the announcements entry in the database. Also notifies the appropriate model listeners.
259             *
260             * @param announcementsEntry the announcements entry to update
261             * @param merge whether to merge the announcements entry with the current session. See {@link com.liferay.portal.service.persistence.BatchSession#update(com.liferay.portal.kernel.dao.orm.Session, com.liferay.portal.model.BaseModel, boolean)} for an explanation.
262             * @return the announcements entry that was updated
263             * @throws SystemException if a system exception occurred
264             */
265            public AnnouncementsEntry updateAnnouncementsEntry(
266                    AnnouncementsEntry announcementsEntry, boolean merge)
267                    throws SystemException {
268                    announcementsEntry.setNew(false);
269    
270                    return announcementsEntryPersistence.update(announcementsEntry, merge);
271            }
272    
273            /**
274             * Gets the announcements delivery local service.
275             *
276             * @return the announcements delivery local service
277             */
278            public AnnouncementsDeliveryLocalService getAnnouncementsDeliveryLocalService() {
279                    return announcementsDeliveryLocalService;
280            }
281    
282            /**
283             * Sets the announcements delivery local service.
284             *
285             * @param announcementsDeliveryLocalService the announcements delivery local service
286             */
287            public void setAnnouncementsDeliveryLocalService(
288                    AnnouncementsDeliveryLocalService announcementsDeliveryLocalService) {
289                    this.announcementsDeliveryLocalService = announcementsDeliveryLocalService;
290            }
291    
292            /**
293             * Gets the announcements delivery remote service.
294             *
295             * @return the announcements delivery remote service
296             */
297            public AnnouncementsDeliveryService getAnnouncementsDeliveryService() {
298                    return announcementsDeliveryService;
299            }
300    
301            /**
302             * Sets the announcements delivery remote service.
303             *
304             * @param announcementsDeliveryService the announcements delivery remote service
305             */
306            public void setAnnouncementsDeliveryService(
307                    AnnouncementsDeliveryService announcementsDeliveryService) {
308                    this.announcementsDeliveryService = announcementsDeliveryService;
309            }
310    
311            /**
312             * Gets the announcements delivery persistence.
313             *
314             * @return the announcements delivery persistence
315             */
316            public AnnouncementsDeliveryPersistence getAnnouncementsDeliveryPersistence() {
317                    return announcementsDeliveryPersistence;
318            }
319    
320            /**
321             * Sets the announcements delivery persistence.
322             *
323             * @param announcementsDeliveryPersistence the announcements delivery persistence
324             */
325            public void setAnnouncementsDeliveryPersistence(
326                    AnnouncementsDeliveryPersistence announcementsDeliveryPersistence) {
327                    this.announcementsDeliveryPersistence = announcementsDeliveryPersistence;
328            }
329    
330            /**
331             * Gets the announcements entry local service.
332             *
333             * @return the announcements entry local service
334             */
335            public AnnouncementsEntryLocalService getAnnouncementsEntryLocalService() {
336                    return announcementsEntryLocalService;
337            }
338    
339            /**
340             * Sets the announcements entry local service.
341             *
342             * @param announcementsEntryLocalService the announcements entry local service
343             */
344            public void setAnnouncementsEntryLocalService(
345                    AnnouncementsEntryLocalService announcementsEntryLocalService) {
346                    this.announcementsEntryLocalService = announcementsEntryLocalService;
347            }
348    
349            /**
350             * Gets the announcements entry remote service.
351             *
352             * @return the announcements entry remote service
353             */
354            public AnnouncementsEntryService getAnnouncementsEntryService() {
355                    return announcementsEntryService;
356            }
357    
358            /**
359             * Sets the announcements entry remote service.
360             *
361             * @param announcementsEntryService the announcements entry remote service
362             */
363            public void setAnnouncementsEntryService(
364                    AnnouncementsEntryService announcementsEntryService) {
365                    this.announcementsEntryService = announcementsEntryService;
366            }
367    
368            /**
369             * Gets the announcements entry persistence.
370             *
371             * @return the announcements entry persistence
372             */
373            public AnnouncementsEntryPersistence getAnnouncementsEntryPersistence() {
374                    return announcementsEntryPersistence;
375            }
376    
377            /**
378             * Sets the announcements entry persistence.
379             *
380             * @param announcementsEntryPersistence the announcements entry persistence
381             */
382            public void setAnnouncementsEntryPersistence(
383                    AnnouncementsEntryPersistence announcementsEntryPersistence) {
384                    this.announcementsEntryPersistence = announcementsEntryPersistence;
385            }
386    
387            /**
388             * Gets the announcements entry finder.
389             *
390             * @return the announcements entry finder
391             */
392            public AnnouncementsEntryFinder getAnnouncementsEntryFinder() {
393                    return announcementsEntryFinder;
394            }
395    
396            /**
397             * Sets the announcements entry finder.
398             *
399             * @param announcementsEntryFinder the announcements entry finder
400             */
401            public void setAnnouncementsEntryFinder(
402                    AnnouncementsEntryFinder announcementsEntryFinder) {
403                    this.announcementsEntryFinder = announcementsEntryFinder;
404            }
405    
406            /**
407             * Gets the announcements flag local service.
408             *
409             * @return the announcements flag local service
410             */
411            public AnnouncementsFlagLocalService getAnnouncementsFlagLocalService() {
412                    return announcementsFlagLocalService;
413            }
414    
415            /**
416             * Sets the announcements flag local service.
417             *
418             * @param announcementsFlagLocalService the announcements flag local service
419             */
420            public void setAnnouncementsFlagLocalService(
421                    AnnouncementsFlagLocalService announcementsFlagLocalService) {
422                    this.announcementsFlagLocalService = announcementsFlagLocalService;
423            }
424    
425            /**
426             * Gets the announcements flag remote service.
427             *
428             * @return the announcements flag remote service
429             */
430            public AnnouncementsFlagService getAnnouncementsFlagService() {
431                    return announcementsFlagService;
432            }
433    
434            /**
435             * Sets the announcements flag remote service.
436             *
437             * @param announcementsFlagService the announcements flag remote service
438             */
439            public void setAnnouncementsFlagService(
440                    AnnouncementsFlagService announcementsFlagService) {
441                    this.announcementsFlagService = announcementsFlagService;
442            }
443    
444            /**
445             * Gets the announcements flag persistence.
446             *
447             * @return the announcements flag persistence
448             */
449            public AnnouncementsFlagPersistence getAnnouncementsFlagPersistence() {
450                    return announcementsFlagPersistence;
451            }
452    
453            /**
454             * Sets the announcements flag persistence.
455             *
456             * @param announcementsFlagPersistence the announcements flag persistence
457             */
458            public void setAnnouncementsFlagPersistence(
459                    AnnouncementsFlagPersistence announcementsFlagPersistence) {
460                    this.announcementsFlagPersistence = announcementsFlagPersistence;
461            }
462    
463            /**
464             * Gets the counter local service.
465             *
466             * @return the counter local service
467             */
468            public CounterLocalService getCounterLocalService() {
469                    return counterLocalService;
470            }
471    
472            /**
473             * Sets the counter local service.
474             *
475             * @param counterLocalService the counter local service
476             */
477            public void setCounterLocalService(CounterLocalService counterLocalService) {
478                    this.counterLocalService = counterLocalService;
479            }
480    
481            /**
482             * Gets the mail remote service.
483             *
484             * @return the mail remote service
485             */
486            public MailService getMailService() {
487                    return mailService;
488            }
489    
490            /**
491             * Sets the mail remote service.
492             *
493             * @param mailService the mail remote service
494             */
495            public void setMailService(MailService mailService) {
496                    this.mailService = mailService;
497            }
498    
499            /**
500             * Gets the company local service.
501             *
502             * @return the company local service
503             */
504            public CompanyLocalService getCompanyLocalService() {
505                    return companyLocalService;
506            }
507    
508            /**
509             * Sets the company local service.
510             *
511             * @param companyLocalService the company local service
512             */
513            public void setCompanyLocalService(CompanyLocalService companyLocalService) {
514                    this.companyLocalService = companyLocalService;
515            }
516    
517            /**
518             * Gets the company remote service.
519             *
520             * @return the company remote service
521             */
522            public CompanyService getCompanyService() {
523                    return companyService;
524            }
525    
526            /**
527             * Sets the company remote service.
528             *
529             * @param companyService the company remote service
530             */
531            public void setCompanyService(CompanyService companyService) {
532                    this.companyService = companyService;
533            }
534    
535            /**
536             * Gets the company persistence.
537             *
538             * @return the company persistence
539             */
540            public CompanyPersistence getCompanyPersistence() {
541                    return companyPersistence;
542            }
543    
544            /**
545             * Sets the company persistence.
546             *
547             * @param companyPersistence the company persistence
548             */
549            public void setCompanyPersistence(CompanyPersistence companyPersistence) {
550                    this.companyPersistence = companyPersistence;
551            }
552    
553            /**
554             * Gets the group local service.
555             *
556             * @return the group local service
557             */
558            public GroupLocalService getGroupLocalService() {
559                    return groupLocalService;
560            }
561    
562            /**
563             * Sets the group local service.
564             *
565             * @param groupLocalService the group local service
566             */
567            public void setGroupLocalService(GroupLocalService groupLocalService) {
568                    this.groupLocalService = groupLocalService;
569            }
570    
571            /**
572             * Gets the group remote service.
573             *
574             * @return the group remote service
575             */
576            public GroupService getGroupService() {
577                    return groupService;
578            }
579    
580            /**
581             * Sets the group remote service.
582             *
583             * @param groupService the group remote service
584             */
585            public void setGroupService(GroupService groupService) {
586                    this.groupService = groupService;
587            }
588    
589            /**
590             * Gets the group persistence.
591             *
592             * @return the group persistence
593             */
594            public GroupPersistence getGroupPersistence() {
595                    return groupPersistence;
596            }
597    
598            /**
599             * Sets the group persistence.
600             *
601             * @param groupPersistence the group persistence
602             */
603            public void setGroupPersistence(GroupPersistence groupPersistence) {
604                    this.groupPersistence = groupPersistence;
605            }
606    
607            /**
608             * Gets the group finder.
609             *
610             * @return the group finder
611             */
612            public GroupFinder getGroupFinder() {
613                    return groupFinder;
614            }
615    
616            /**
617             * Sets the group finder.
618             *
619             * @param groupFinder the group finder
620             */
621            public void setGroupFinder(GroupFinder groupFinder) {
622                    this.groupFinder = groupFinder;
623            }
624    
625            /**
626             * Gets the organization local service.
627             *
628             * @return the organization local service
629             */
630            public OrganizationLocalService getOrganizationLocalService() {
631                    return organizationLocalService;
632            }
633    
634            /**
635             * Sets the organization local service.
636             *
637             * @param organizationLocalService the organization local service
638             */
639            public void setOrganizationLocalService(
640                    OrganizationLocalService organizationLocalService) {
641                    this.organizationLocalService = organizationLocalService;
642            }
643    
644            /**
645             * Gets the organization remote service.
646             *
647             * @return the organization remote service
648             */
649            public OrganizationService getOrganizationService() {
650                    return organizationService;
651            }
652    
653            /**
654             * Sets the organization remote service.
655             *
656             * @param organizationService the organization remote service
657             */
658            public void setOrganizationService(OrganizationService organizationService) {
659                    this.organizationService = organizationService;
660            }
661    
662            /**
663             * Gets the organization persistence.
664             *
665             * @return the organization persistence
666             */
667            public OrganizationPersistence getOrganizationPersistence() {
668                    return organizationPersistence;
669            }
670    
671            /**
672             * Sets the organization persistence.
673             *
674             * @param organizationPersistence the organization persistence
675             */
676            public void setOrganizationPersistence(
677                    OrganizationPersistence organizationPersistence) {
678                    this.organizationPersistence = organizationPersistence;
679            }
680    
681            /**
682             * Gets the organization finder.
683             *
684             * @return the organization finder
685             */
686            public OrganizationFinder getOrganizationFinder() {
687                    return organizationFinder;
688            }
689    
690            /**
691             * Sets the organization finder.
692             *
693             * @param organizationFinder the organization finder
694             */
695            public void setOrganizationFinder(OrganizationFinder organizationFinder) {
696                    this.organizationFinder = organizationFinder;
697            }
698    
699            /**
700             * Gets the resource local service.
701             *
702             * @return the resource local service
703             */
704            public ResourceLocalService getResourceLocalService() {
705                    return resourceLocalService;
706            }
707    
708            /**
709             * Sets the resource local service.
710             *
711             * @param resourceLocalService the resource local service
712             */
713            public void setResourceLocalService(
714                    ResourceLocalService resourceLocalService) {
715                    this.resourceLocalService = resourceLocalService;
716            }
717    
718            /**
719             * Gets the resource remote service.
720             *
721             * @return the resource remote service
722             */
723            public ResourceService getResourceService() {
724                    return resourceService;
725            }
726    
727            /**
728             * Sets the resource remote service.
729             *
730             * @param resourceService the resource remote service
731             */
732            public void setResourceService(ResourceService resourceService) {
733                    this.resourceService = resourceService;
734            }
735    
736            /**
737             * Gets the resource persistence.
738             *
739             * @return the resource persistence
740             */
741            public ResourcePersistence getResourcePersistence() {
742                    return resourcePersistence;
743            }
744    
745            /**
746             * Sets the resource persistence.
747             *
748             * @param resourcePersistence the resource persistence
749             */
750            public void setResourcePersistence(ResourcePersistence resourcePersistence) {
751                    this.resourcePersistence = resourcePersistence;
752            }
753    
754            /**
755             * Gets the resource finder.
756             *
757             * @return the resource finder
758             */
759            public ResourceFinder getResourceFinder() {
760                    return resourceFinder;
761            }
762    
763            /**
764             * Sets the resource finder.
765             *
766             * @param resourceFinder the resource finder
767             */
768            public void setResourceFinder(ResourceFinder resourceFinder) {
769                    this.resourceFinder = resourceFinder;
770            }
771    
772            /**
773             * Gets the role local service.
774             *
775             * @return the role local service
776             */
777            public RoleLocalService getRoleLocalService() {
778                    return roleLocalService;
779            }
780    
781            /**
782             * Sets the role local service.
783             *
784             * @param roleLocalService the role local service
785             */
786            public void setRoleLocalService(RoleLocalService roleLocalService) {
787                    this.roleLocalService = roleLocalService;
788            }
789    
790            /**
791             * Gets the role remote service.
792             *
793             * @return the role remote service
794             */
795            public RoleService getRoleService() {
796                    return roleService;
797            }
798    
799            /**
800             * Sets the role remote service.
801             *
802             * @param roleService the role remote service
803             */
804            public void setRoleService(RoleService roleService) {
805                    this.roleService = roleService;
806            }
807    
808            /**
809             * Gets the role persistence.
810             *
811             * @return the role persistence
812             */
813            public RolePersistence getRolePersistence() {
814                    return rolePersistence;
815            }
816    
817            /**
818             * Sets the role persistence.
819             *
820             * @param rolePersistence the role persistence
821             */
822            public void setRolePersistence(RolePersistence rolePersistence) {
823                    this.rolePersistence = rolePersistence;
824            }
825    
826            /**
827             * Gets the role finder.
828             *
829             * @return the role finder
830             */
831            public RoleFinder getRoleFinder() {
832                    return roleFinder;
833            }
834    
835            /**
836             * Sets the role finder.
837             *
838             * @param roleFinder the role finder
839             */
840            public void setRoleFinder(RoleFinder roleFinder) {
841                    this.roleFinder = roleFinder;
842            }
843    
844            /**
845             * Gets the user local service.
846             *
847             * @return the user local service
848             */
849            public UserLocalService getUserLocalService() {
850                    return userLocalService;
851            }
852    
853            /**
854             * Sets the user local service.
855             *
856             * @param userLocalService the user local service
857             */
858            public void setUserLocalService(UserLocalService userLocalService) {
859                    this.userLocalService = userLocalService;
860            }
861    
862            /**
863             * Gets the user remote service.
864             *
865             * @return the user remote service
866             */
867            public UserService getUserService() {
868                    return userService;
869            }
870    
871            /**
872             * Sets the user remote service.
873             *
874             * @param userService the user remote service
875             */
876            public void setUserService(UserService userService) {
877                    this.userService = userService;
878            }
879    
880            /**
881             * Gets the user persistence.
882             *
883             * @return the user persistence
884             */
885            public UserPersistence getUserPersistence() {
886                    return userPersistence;
887            }
888    
889            /**
890             * Sets the user persistence.
891             *
892             * @param userPersistence the user persistence
893             */
894            public void setUserPersistence(UserPersistence userPersistence) {
895                    this.userPersistence = userPersistence;
896            }
897    
898            /**
899             * Gets the user finder.
900             *
901             * @return the user finder
902             */
903            public UserFinder getUserFinder() {
904                    return userFinder;
905            }
906    
907            /**
908             * Sets the user finder.
909             *
910             * @param userFinder the user finder
911             */
912            public void setUserFinder(UserFinder userFinder) {
913                    this.userFinder = userFinder;
914            }
915    
916            /**
917             * Gets the user group local service.
918             *
919             * @return the user group local service
920             */
921            public UserGroupLocalService getUserGroupLocalService() {
922                    return userGroupLocalService;
923            }
924    
925            /**
926             * Sets the user group local service.
927             *
928             * @param userGroupLocalService the user group local service
929             */
930            public void setUserGroupLocalService(
931                    UserGroupLocalService userGroupLocalService) {
932                    this.userGroupLocalService = userGroupLocalService;
933            }
934    
935            /**
936             * Gets the user group remote service.
937             *
938             * @return the user group remote service
939             */
940            public UserGroupService getUserGroupService() {
941                    return userGroupService;
942            }
943    
944            /**
945             * Sets the user group remote service.
946             *
947             * @param userGroupService the user group remote service
948             */
949            public void setUserGroupService(UserGroupService userGroupService) {
950                    this.userGroupService = userGroupService;
951            }
952    
953            /**
954             * Gets the user group persistence.
955             *
956             * @return the user group persistence
957             */
958            public UserGroupPersistence getUserGroupPersistence() {
959                    return userGroupPersistence;
960            }
961    
962            /**
963             * Sets the user group persistence.
964             *
965             * @param userGroupPersistence the user group persistence
966             */
967            public void setUserGroupPersistence(
968                    UserGroupPersistence userGroupPersistence) {
969                    this.userGroupPersistence = userGroupPersistence;
970            }
971    
972            /**
973             * Gets the user group finder.
974             *
975             * @return the user group finder
976             */
977            public UserGroupFinder getUserGroupFinder() {
978                    return userGroupFinder;
979            }
980    
981            /**
982             * Sets the user group finder.
983             *
984             * @param userGroupFinder the user group finder
985             */
986            public void setUserGroupFinder(UserGroupFinder userGroupFinder) {
987                    this.userGroupFinder = userGroupFinder;
988            }
989    
990            /**
991             * Performs an SQL query.
992             *
993             * @param sql the sql query to perform
994             */
995            protected void runSQL(String sql) throws SystemException {
996                    try {
997                            DataSource dataSource = announcementsEntryPersistence.getDataSource();
998    
999                            SqlUpdate sqlUpdate = SqlUpdateFactoryUtil.getSqlUpdate(dataSource,
1000                                            sql, new int[0]);
1001    
1002                            sqlUpdate.update();
1003                    }
1004                    catch (Exception e) {
1005                            throw new SystemException(e);
1006                    }
1007            }
1008    
1009            @BeanReference(type = AnnouncementsDeliveryLocalService.class)
1010            protected AnnouncementsDeliveryLocalService announcementsDeliveryLocalService;
1011            @BeanReference(type = AnnouncementsDeliveryService.class)
1012            protected AnnouncementsDeliveryService announcementsDeliveryService;
1013            @BeanReference(type = AnnouncementsDeliveryPersistence.class)
1014            protected AnnouncementsDeliveryPersistence announcementsDeliveryPersistence;
1015            @BeanReference(type = AnnouncementsEntryLocalService.class)
1016            protected AnnouncementsEntryLocalService announcementsEntryLocalService;
1017            @BeanReference(type = AnnouncementsEntryService.class)
1018            protected AnnouncementsEntryService announcementsEntryService;
1019            @BeanReference(type = AnnouncementsEntryPersistence.class)
1020            protected AnnouncementsEntryPersistence announcementsEntryPersistence;
1021            @BeanReference(type = AnnouncementsEntryFinder.class)
1022            protected AnnouncementsEntryFinder announcementsEntryFinder;
1023            @BeanReference(type = AnnouncementsFlagLocalService.class)
1024            protected AnnouncementsFlagLocalService announcementsFlagLocalService;
1025            @BeanReference(type = AnnouncementsFlagService.class)
1026            protected AnnouncementsFlagService announcementsFlagService;
1027            @BeanReference(type = AnnouncementsFlagPersistence.class)
1028            protected AnnouncementsFlagPersistence announcementsFlagPersistence;
1029            @BeanReference(type = CounterLocalService.class)
1030            protected CounterLocalService counterLocalService;
1031            @BeanReference(type = MailService.class)
1032            protected MailService mailService;
1033            @BeanReference(type = CompanyLocalService.class)
1034            protected CompanyLocalService companyLocalService;
1035            @BeanReference(type = CompanyService.class)
1036            protected CompanyService companyService;
1037            @BeanReference(type = CompanyPersistence.class)
1038            protected CompanyPersistence companyPersistence;
1039            @BeanReference(type = GroupLocalService.class)
1040            protected GroupLocalService groupLocalService;
1041            @BeanReference(type = GroupService.class)
1042            protected GroupService groupService;
1043            @BeanReference(type = GroupPersistence.class)
1044            protected GroupPersistence groupPersistence;
1045            @BeanReference(type = GroupFinder.class)
1046            protected GroupFinder groupFinder;
1047            @BeanReference(type = OrganizationLocalService.class)
1048            protected OrganizationLocalService organizationLocalService;
1049            @BeanReference(type = OrganizationService.class)
1050            protected OrganizationService organizationService;
1051            @BeanReference(type = OrganizationPersistence.class)
1052            protected OrganizationPersistence organizationPersistence;
1053            @BeanReference(type = OrganizationFinder.class)
1054            protected OrganizationFinder organizationFinder;
1055            @BeanReference(type = ResourceLocalService.class)
1056            protected ResourceLocalService resourceLocalService;
1057            @BeanReference(type = ResourceService.class)
1058            protected ResourceService resourceService;
1059            @BeanReference(type = ResourcePersistence.class)
1060            protected ResourcePersistence resourcePersistence;
1061            @BeanReference(type = ResourceFinder.class)
1062            protected ResourceFinder resourceFinder;
1063            @BeanReference(type = RoleLocalService.class)
1064            protected RoleLocalService roleLocalService;
1065            @BeanReference(type = RoleService.class)
1066            protected RoleService roleService;
1067            @BeanReference(type = RolePersistence.class)
1068            protected RolePersistence rolePersistence;
1069            @BeanReference(type = RoleFinder.class)
1070            protected RoleFinder roleFinder;
1071            @BeanReference(type = UserLocalService.class)
1072            protected UserLocalService userLocalService;
1073            @BeanReference(type = UserService.class)
1074            protected UserService userService;
1075            @BeanReference(type = UserPersistence.class)
1076            protected UserPersistence userPersistence;
1077            @BeanReference(type = UserFinder.class)
1078            protected UserFinder userFinder;
1079            @BeanReference(type = UserGroupLocalService.class)
1080            protected UserGroupLocalService userGroupLocalService;
1081            @BeanReference(type = UserGroupService.class)
1082            protected UserGroupService userGroupService;
1083            @BeanReference(type = UserGroupPersistence.class)
1084            protected UserGroupPersistence userGroupPersistence;
1085            @BeanReference(type = UserGroupFinder.class)
1086            protected UserGroupFinder userGroupFinder;
1087    }