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