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