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.polls.service.base;
016    
017    import com.liferay.counter.service.CounterLocalService;
018    
019    import com.liferay.portal.kernel.bean.BeanReference;
020    import com.liferay.portal.kernel.bean.IdentifiableBean;
021    import com.liferay.portal.kernel.dao.jdbc.SqlUpdate;
022    import com.liferay.portal.kernel.dao.jdbc.SqlUpdateFactoryUtil;
023    import com.liferay.portal.kernel.exception.SystemException;
024    import com.liferay.portal.service.BaseServiceImpl;
025    import com.liferay.portal.service.ResourceLocalService;
026    import com.liferay.portal.service.UserLocalService;
027    import com.liferay.portal.service.UserService;
028    import com.liferay.portal.service.persistence.UserFinder;
029    import com.liferay.portal.service.persistence.UserPersistence;
030    
031    import com.liferay.portlet.polls.model.PollsChoice;
032    import com.liferay.portlet.polls.service.PollsChoiceLocalService;
033    import com.liferay.portlet.polls.service.PollsChoiceService;
034    import com.liferay.portlet.polls.service.PollsQuestionLocalService;
035    import com.liferay.portlet.polls.service.PollsQuestionService;
036    import com.liferay.portlet.polls.service.PollsVoteLocalService;
037    import com.liferay.portlet.polls.service.PollsVoteService;
038    import com.liferay.portlet.polls.service.persistence.PollsChoiceFinder;
039    import com.liferay.portlet.polls.service.persistence.PollsChoicePersistence;
040    import com.liferay.portlet.polls.service.persistence.PollsQuestionPersistence;
041    import com.liferay.portlet.polls.service.persistence.PollsVotePersistence;
042    
043    import javax.sql.DataSource;
044    
045    /**
046     * The base implementation of the polls choice remote service.
047     *
048     * <p>
049     * 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.polls.service.impl.PollsChoiceServiceImpl}.
050     * </p>
051     *
052     * @author Brian Wing Shun Chan
053     * @see com.liferay.portlet.polls.service.impl.PollsChoiceServiceImpl
054     * @see com.liferay.portlet.polls.service.PollsChoiceServiceUtil
055     * @generated
056     */
057    public abstract class PollsChoiceServiceBaseImpl extends BaseServiceImpl
058            implements PollsChoiceService, IdentifiableBean {
059            /*
060             * NOTE FOR DEVELOPERS:
061             *
062             * Never modify or reference this class directly. Always use {@link com.liferay.portlet.polls.service.PollsChoiceServiceUtil} to access the polls choice remote service.
063             */
064    
065            /**
066             * Returns the polls choice local service.
067             *
068             * @return the polls choice local service
069             */
070            public PollsChoiceLocalService getPollsChoiceLocalService() {
071                    return pollsChoiceLocalService;
072            }
073    
074            /**
075             * Sets the polls choice local service.
076             *
077             * @param pollsChoiceLocalService the polls choice local service
078             */
079            public void setPollsChoiceLocalService(
080                    PollsChoiceLocalService pollsChoiceLocalService) {
081                    this.pollsChoiceLocalService = pollsChoiceLocalService;
082            }
083    
084            /**
085             * Returns the polls choice remote service.
086             *
087             * @return the polls choice remote service
088             */
089            public PollsChoiceService getPollsChoiceService() {
090                    return pollsChoiceService;
091            }
092    
093            /**
094             * Sets the polls choice remote service.
095             *
096             * @param pollsChoiceService the polls choice remote service
097             */
098            public void setPollsChoiceService(PollsChoiceService pollsChoiceService) {
099                    this.pollsChoiceService = pollsChoiceService;
100            }
101    
102            /**
103             * Returns the polls choice persistence.
104             *
105             * @return the polls choice persistence
106             */
107            public PollsChoicePersistence getPollsChoicePersistence() {
108                    return pollsChoicePersistence;
109            }
110    
111            /**
112             * Sets the polls choice persistence.
113             *
114             * @param pollsChoicePersistence the polls choice persistence
115             */
116            public void setPollsChoicePersistence(
117                    PollsChoicePersistence pollsChoicePersistence) {
118                    this.pollsChoicePersistence = pollsChoicePersistence;
119            }
120    
121            /**
122             * Returns the polls choice finder.
123             *
124             * @return the polls choice finder
125             */
126            public PollsChoiceFinder getPollsChoiceFinder() {
127                    return pollsChoiceFinder;
128            }
129    
130            /**
131             * Sets the polls choice finder.
132             *
133             * @param pollsChoiceFinder the polls choice finder
134             */
135            public void setPollsChoiceFinder(PollsChoiceFinder pollsChoiceFinder) {
136                    this.pollsChoiceFinder = pollsChoiceFinder;
137            }
138    
139            /**
140             * Returns the polls question local service.
141             *
142             * @return the polls question local service
143             */
144            public PollsQuestionLocalService getPollsQuestionLocalService() {
145                    return pollsQuestionLocalService;
146            }
147    
148            /**
149             * Sets the polls question local service.
150             *
151             * @param pollsQuestionLocalService the polls question local service
152             */
153            public void setPollsQuestionLocalService(
154                    PollsQuestionLocalService pollsQuestionLocalService) {
155                    this.pollsQuestionLocalService = pollsQuestionLocalService;
156            }
157    
158            /**
159             * Returns the polls question remote service.
160             *
161             * @return the polls question remote service
162             */
163            public PollsQuestionService getPollsQuestionService() {
164                    return pollsQuestionService;
165            }
166    
167            /**
168             * Sets the polls question remote service.
169             *
170             * @param pollsQuestionService the polls question remote service
171             */
172            public void setPollsQuestionService(
173                    PollsQuestionService pollsQuestionService) {
174                    this.pollsQuestionService = pollsQuestionService;
175            }
176    
177            /**
178             * Returns the polls question persistence.
179             *
180             * @return the polls question persistence
181             */
182            public PollsQuestionPersistence getPollsQuestionPersistence() {
183                    return pollsQuestionPersistence;
184            }
185    
186            /**
187             * Sets the polls question persistence.
188             *
189             * @param pollsQuestionPersistence the polls question persistence
190             */
191            public void setPollsQuestionPersistence(
192                    PollsQuestionPersistence pollsQuestionPersistence) {
193                    this.pollsQuestionPersistence = pollsQuestionPersistence;
194            }
195    
196            /**
197             * Returns the polls vote local service.
198             *
199             * @return the polls vote local service
200             */
201            public PollsVoteLocalService getPollsVoteLocalService() {
202                    return pollsVoteLocalService;
203            }
204    
205            /**
206             * Sets the polls vote local service.
207             *
208             * @param pollsVoteLocalService the polls vote local service
209             */
210            public void setPollsVoteLocalService(
211                    PollsVoteLocalService pollsVoteLocalService) {
212                    this.pollsVoteLocalService = pollsVoteLocalService;
213            }
214    
215            /**
216             * Returns the polls vote remote service.
217             *
218             * @return the polls vote remote service
219             */
220            public PollsVoteService getPollsVoteService() {
221                    return pollsVoteService;
222            }
223    
224            /**
225             * Sets the polls vote remote service.
226             *
227             * @param pollsVoteService the polls vote remote service
228             */
229            public void setPollsVoteService(PollsVoteService pollsVoteService) {
230                    this.pollsVoteService = pollsVoteService;
231            }
232    
233            /**
234             * Returns the polls vote persistence.
235             *
236             * @return the polls vote persistence
237             */
238            public PollsVotePersistence getPollsVotePersistence() {
239                    return pollsVotePersistence;
240            }
241    
242            /**
243             * Sets the polls vote persistence.
244             *
245             * @param pollsVotePersistence the polls vote persistence
246             */
247            public void setPollsVotePersistence(
248                    PollsVotePersistence pollsVotePersistence) {
249                    this.pollsVotePersistence = pollsVotePersistence;
250            }
251    
252            /**
253             * Returns the counter local service.
254             *
255             * @return the counter local service
256             */
257            public CounterLocalService getCounterLocalService() {
258                    return counterLocalService;
259            }
260    
261            /**
262             * Sets the counter local service.
263             *
264             * @param counterLocalService the counter local service
265             */
266            public void setCounterLocalService(CounterLocalService counterLocalService) {
267                    this.counterLocalService = counterLocalService;
268            }
269    
270            /**
271             * Returns the resource local service.
272             *
273             * @return the resource local service
274             */
275            public ResourceLocalService getResourceLocalService() {
276                    return resourceLocalService;
277            }
278    
279            /**
280             * Sets the resource local service.
281             *
282             * @param resourceLocalService the resource local service
283             */
284            public void setResourceLocalService(
285                    ResourceLocalService resourceLocalService) {
286                    this.resourceLocalService = resourceLocalService;
287            }
288    
289            /**
290             * Returns the user local service.
291             *
292             * @return the user local service
293             */
294            public UserLocalService getUserLocalService() {
295                    return userLocalService;
296            }
297    
298            /**
299             * Sets the user local service.
300             *
301             * @param userLocalService the user local service
302             */
303            public void setUserLocalService(UserLocalService userLocalService) {
304                    this.userLocalService = userLocalService;
305            }
306    
307            /**
308             * Returns the user remote service.
309             *
310             * @return the user remote service
311             */
312            public UserService getUserService() {
313                    return userService;
314            }
315    
316            /**
317             * Sets the user remote service.
318             *
319             * @param userService the user remote service
320             */
321            public void setUserService(UserService userService) {
322                    this.userService = userService;
323            }
324    
325            /**
326             * Returns the user persistence.
327             *
328             * @return the user persistence
329             */
330            public UserPersistence getUserPersistence() {
331                    return userPersistence;
332            }
333    
334            /**
335             * Sets the user persistence.
336             *
337             * @param userPersistence the user persistence
338             */
339            public void setUserPersistence(UserPersistence userPersistence) {
340                    this.userPersistence = userPersistence;
341            }
342    
343            /**
344             * Returns the user finder.
345             *
346             * @return the user finder
347             */
348            public UserFinder getUserFinder() {
349                    return userFinder;
350            }
351    
352            /**
353             * Sets the user finder.
354             *
355             * @param userFinder the user finder
356             */
357            public void setUserFinder(UserFinder userFinder) {
358                    this.userFinder = userFinder;
359            }
360    
361            public void afterPropertiesSet() {
362            }
363    
364            public void destroy() {
365            }
366    
367            /**
368             * Returns the Spring bean ID for this bean.
369             *
370             * @return the Spring bean ID for this bean
371             */
372            public String getBeanIdentifier() {
373                    return _beanIdentifier;
374            }
375    
376            /**
377             * Sets the Spring bean ID for this bean.
378             *
379             * @param beanIdentifier the Spring bean ID for this bean
380             */
381            public void setBeanIdentifier(String beanIdentifier) {
382                    _beanIdentifier = beanIdentifier;
383            }
384    
385            protected Class<?> getModelClass() {
386                    return PollsChoice.class;
387            }
388    
389            protected String getModelClassName() {
390                    return PollsChoice.class.getName();
391            }
392    
393            /**
394             * Performs an SQL query.
395             *
396             * @param sql the sql query
397             */
398            protected void runSQL(String sql) throws SystemException {
399                    try {
400                            DataSource dataSource = pollsChoicePersistence.getDataSource();
401    
402                            SqlUpdate sqlUpdate = SqlUpdateFactoryUtil.getSqlUpdate(dataSource,
403                                            sql, new int[0]);
404    
405                            sqlUpdate.update();
406                    }
407                    catch (Exception e) {
408                            throw new SystemException(e);
409                    }
410            }
411    
412            @BeanReference(type = PollsChoiceLocalService.class)
413            protected PollsChoiceLocalService pollsChoiceLocalService;
414            @BeanReference(type = PollsChoiceService.class)
415            protected PollsChoiceService pollsChoiceService;
416            @BeanReference(type = PollsChoicePersistence.class)
417            protected PollsChoicePersistence pollsChoicePersistence;
418            @BeanReference(type = PollsChoiceFinder.class)
419            protected PollsChoiceFinder pollsChoiceFinder;
420            @BeanReference(type = PollsQuestionLocalService.class)
421            protected PollsQuestionLocalService pollsQuestionLocalService;
422            @BeanReference(type = PollsQuestionService.class)
423            protected PollsQuestionService pollsQuestionService;
424            @BeanReference(type = PollsQuestionPersistence.class)
425            protected PollsQuestionPersistence pollsQuestionPersistence;
426            @BeanReference(type = PollsVoteLocalService.class)
427            protected PollsVoteLocalService pollsVoteLocalService;
428            @BeanReference(type = PollsVoteService.class)
429            protected PollsVoteService pollsVoteService;
430            @BeanReference(type = PollsVotePersistence.class)
431            protected PollsVotePersistence pollsVotePersistence;
432            @BeanReference(type = CounterLocalService.class)
433            protected CounterLocalService counterLocalService;
434            @BeanReference(type = ResourceLocalService.class)
435            protected ResourceLocalService resourceLocalService;
436            @BeanReference(type = UserLocalService.class)
437            protected UserLocalService userLocalService;
438            @BeanReference(type = UserService.class)
439            protected UserService userService;
440            @BeanReference(type = UserPersistence.class)
441            protected UserPersistence userPersistence;
442            @BeanReference(type = UserFinder.class)
443            protected UserFinder userFinder;
444            private String _beanIdentifier;
445    }