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