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