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