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