1   /**
2    * Copyright (c) 2000-2010 Liferay, Inc. All rights reserved.
3    *
4    * This library is free software; you can redistribute it and/or modify it under
5    * the terms of the GNU Lesser General Public License as published by the Free
6    * Software Foundation; either version 2.1 of the License, or (at your option)
7    * any later version.
8    *
9    * This library is distributed in the hope that it will be useful, but WITHOUT
10   * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
11   * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
12   * details.
13   */
14  
15  package com.liferay.portlet.polls.service.base;
16  
17  import com.liferay.counter.service.CounterLocalService;
18  
19  import com.liferay.portal.kernel.annotation.BeanReference;
20  import com.liferay.portal.kernel.dao.jdbc.SqlUpdate;
21  import com.liferay.portal.kernel.dao.jdbc.SqlUpdateFactoryUtil;
22  import com.liferay.portal.kernel.exception.SystemException;
23  import com.liferay.portal.service.ResourceLocalService;
24  import com.liferay.portal.service.ResourceService;
25  import com.liferay.portal.service.UserLocalService;
26  import com.liferay.portal.service.UserService;
27  import com.liferay.portal.service.base.PrincipalBean;
28  import com.liferay.portal.service.persistence.ResourceFinder;
29  import com.liferay.portal.service.persistence.ResourcePersistence;
30  import com.liferay.portal.service.persistence.UserFinder;
31  import com.liferay.portal.service.persistence.UserPersistence;
32  
33  import com.liferay.portlet.polls.service.PollsChoiceLocalService;
34  import com.liferay.portlet.polls.service.PollsQuestionLocalService;
35  import com.liferay.portlet.polls.service.PollsQuestionService;
36  import com.liferay.portlet.polls.service.PollsVoteLocalService;
37  import com.liferay.portlet.polls.service.PollsVoteService;
38  import com.liferay.portlet.polls.service.persistence.PollsChoiceFinder;
39  import com.liferay.portlet.polls.service.persistence.PollsChoicePersistence;
40  import com.liferay.portlet.polls.service.persistence.PollsQuestionPersistence;
41  import com.liferay.portlet.polls.service.persistence.PollsVotePersistence;
42  
43  import javax.sql.DataSource;
44  
45  /**
46   * <a href="PollsVoteServiceBaseImpl.java.html"><b><i>View Source</i></b></a>
47   *
48   * @author Brian Wing Shun Chan
49   */
50  public abstract class PollsVoteServiceBaseImpl extends PrincipalBean
51      implements PollsVoteService {
52      public PollsChoiceLocalService getPollsChoiceLocalService() {
53          return pollsChoiceLocalService;
54      }
55  
56      public void setPollsChoiceLocalService(
57          PollsChoiceLocalService pollsChoiceLocalService) {
58          this.pollsChoiceLocalService = pollsChoiceLocalService;
59      }
60  
61      public PollsChoicePersistence getPollsChoicePersistence() {
62          return pollsChoicePersistence;
63      }
64  
65      public void setPollsChoicePersistence(
66          PollsChoicePersistence pollsChoicePersistence) {
67          this.pollsChoicePersistence = pollsChoicePersistence;
68      }
69  
70      public PollsChoiceFinder getPollsChoiceFinder() {
71          return pollsChoiceFinder;
72      }
73  
74      public void setPollsChoiceFinder(PollsChoiceFinder pollsChoiceFinder) {
75          this.pollsChoiceFinder = pollsChoiceFinder;
76      }
77  
78      public PollsQuestionLocalService getPollsQuestionLocalService() {
79          return pollsQuestionLocalService;
80      }
81  
82      public void setPollsQuestionLocalService(
83          PollsQuestionLocalService pollsQuestionLocalService) {
84          this.pollsQuestionLocalService = pollsQuestionLocalService;
85      }
86  
87      public PollsQuestionService getPollsQuestionService() {
88          return pollsQuestionService;
89      }
90  
91      public void setPollsQuestionService(
92          PollsQuestionService pollsQuestionService) {
93          this.pollsQuestionService = pollsQuestionService;
94      }
95  
96      public PollsQuestionPersistence getPollsQuestionPersistence() {
97          return pollsQuestionPersistence;
98      }
99  
100     public void setPollsQuestionPersistence(
101         PollsQuestionPersistence pollsQuestionPersistence) {
102         this.pollsQuestionPersistence = pollsQuestionPersistence;
103     }
104 
105     public PollsVoteLocalService getPollsVoteLocalService() {
106         return pollsVoteLocalService;
107     }
108 
109     public void setPollsVoteLocalService(
110         PollsVoteLocalService pollsVoteLocalService) {
111         this.pollsVoteLocalService = pollsVoteLocalService;
112     }
113 
114     public PollsVoteService getPollsVoteService() {
115         return pollsVoteService;
116     }
117 
118     public void setPollsVoteService(PollsVoteService pollsVoteService) {
119         this.pollsVoteService = pollsVoteService;
120     }
121 
122     public PollsVotePersistence getPollsVotePersistence() {
123         return pollsVotePersistence;
124     }
125 
126     public void setPollsVotePersistence(
127         PollsVotePersistence pollsVotePersistence) {
128         this.pollsVotePersistence = pollsVotePersistence;
129     }
130 
131     public CounterLocalService getCounterLocalService() {
132         return counterLocalService;
133     }
134 
135     public void setCounterLocalService(CounterLocalService counterLocalService) {
136         this.counterLocalService = counterLocalService;
137     }
138 
139     public ResourceLocalService getResourceLocalService() {
140         return resourceLocalService;
141     }
142 
143     public void setResourceLocalService(
144         ResourceLocalService resourceLocalService) {
145         this.resourceLocalService = resourceLocalService;
146     }
147 
148     public ResourceService getResourceService() {
149         return resourceService;
150     }
151 
152     public void setResourceService(ResourceService resourceService) {
153         this.resourceService = resourceService;
154     }
155 
156     public ResourcePersistence getResourcePersistence() {
157         return resourcePersistence;
158     }
159 
160     public void setResourcePersistence(ResourcePersistence resourcePersistence) {
161         this.resourcePersistence = resourcePersistence;
162     }
163 
164     public ResourceFinder getResourceFinder() {
165         return resourceFinder;
166     }
167 
168     public void setResourceFinder(ResourceFinder resourceFinder) {
169         this.resourceFinder = resourceFinder;
170     }
171 
172     public UserLocalService getUserLocalService() {
173         return userLocalService;
174     }
175 
176     public void setUserLocalService(UserLocalService userLocalService) {
177         this.userLocalService = userLocalService;
178     }
179 
180     public UserService getUserService() {
181         return userService;
182     }
183 
184     public void setUserService(UserService userService) {
185         this.userService = userService;
186     }
187 
188     public UserPersistence getUserPersistence() {
189         return userPersistence;
190     }
191 
192     public void setUserPersistence(UserPersistence userPersistence) {
193         this.userPersistence = userPersistence;
194     }
195 
196     public UserFinder getUserFinder() {
197         return userFinder;
198     }
199 
200     public void setUserFinder(UserFinder userFinder) {
201         this.userFinder = userFinder;
202     }
203 
204     protected void runSQL(String sql) throws SystemException {
205         try {
206             DataSource dataSource = pollsVotePersistence.getDataSource();
207 
208             SqlUpdate sqlUpdate = SqlUpdateFactoryUtil.getSqlUpdate(dataSource,
209                     sql, new int[0]);
210 
211             sqlUpdate.update();
212         }
213         catch (Exception e) {
214             throw new SystemException(e);
215         }
216     }
217 
218     @BeanReference(type = PollsChoiceLocalService.class)
219     protected PollsChoiceLocalService pollsChoiceLocalService;
220     @BeanReference(type = PollsChoicePersistence.class)
221     protected PollsChoicePersistence pollsChoicePersistence;
222     @BeanReference(type = PollsChoiceFinder.class)
223     protected PollsChoiceFinder pollsChoiceFinder;
224     @BeanReference(type = PollsQuestionLocalService.class)
225     protected PollsQuestionLocalService pollsQuestionLocalService;
226     @BeanReference(type = PollsQuestionService.class)
227     protected PollsQuestionService pollsQuestionService;
228     @BeanReference(type = PollsQuestionPersistence.class)
229     protected PollsQuestionPersistence pollsQuestionPersistence;
230     @BeanReference(type = PollsVoteLocalService.class)
231     protected PollsVoteLocalService pollsVoteLocalService;
232     @BeanReference(type = PollsVoteService.class)
233     protected PollsVoteService pollsVoteService;
234     @BeanReference(type = PollsVotePersistence.class)
235     protected PollsVotePersistence pollsVotePersistence;
236     @BeanReference(type = CounterLocalService.class)
237     protected CounterLocalService counterLocalService;
238     @BeanReference(type = ResourceLocalService.class)
239     protected ResourceLocalService resourceLocalService;
240     @BeanReference(type = ResourceService.class)
241     protected ResourceService resourceService;
242     @BeanReference(type = ResourcePersistence.class)
243     protected ResourcePersistence resourcePersistence;
244     @BeanReference(type = ResourceFinder.class)
245     protected ResourceFinder resourceFinder;
246     @BeanReference(type = UserLocalService.class)
247     protected UserLocalService userLocalService;
248     @BeanReference(type = UserService.class)
249     protected UserService userService;
250     @BeanReference(type = UserPersistence.class)
251     protected UserPersistence userPersistence;
252     @BeanReference(type = UserFinder.class)
253     protected UserFinder userFinder;
254 }