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