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