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