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