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="PollsQuestionServiceBaseImpl.java.html"><b><i>View Source</i></b>
48   * </a>
49   *
50   * @author Brian Wing Shun Chan
51   */
52  public abstract class PollsQuestionServiceBaseImpl extends PrincipalBean
53      implements PollsQuestionService {
54      public PollsChoiceLocalService getPollsChoiceLocalService() {
55          return pollsChoiceLocalService;
56      }
57  
58      public void setPollsChoiceLocalService(
59          PollsChoiceLocalService pollsChoiceLocalService) {
60          this.pollsChoiceLocalService = pollsChoiceLocalService;
61      }
62  
63      public PollsChoicePersistence getPollsChoicePersistence() {
64          return pollsChoicePersistence;
65      }
66  
67      public void setPollsChoicePersistence(
68          PollsChoicePersistence pollsChoicePersistence) {
69          this.pollsChoicePersistence = pollsChoicePersistence;
70      }
71  
72      public PollsChoiceFinder getPollsChoiceFinder() {
73          return pollsChoiceFinder;
74      }
75  
76      public void setPollsChoiceFinder(PollsChoiceFinder pollsChoiceFinder) {
77          this.pollsChoiceFinder = pollsChoiceFinder;
78      }
79  
80      public PollsQuestionLocalService getPollsQuestionLocalService() {
81          return pollsQuestionLocalService;
82      }
83  
84      public void setPollsQuestionLocalService(
85          PollsQuestionLocalService pollsQuestionLocalService) {
86          this.pollsQuestionLocalService = pollsQuestionLocalService;
87      }
88  
89      public PollsQuestionService getPollsQuestionService() {
90          return pollsQuestionService;
91      }
92  
93      public void setPollsQuestionService(
94          PollsQuestionService pollsQuestionService) {
95          this.pollsQuestionService = pollsQuestionService;
96      }
97  
98      public PollsQuestionPersistence getPollsQuestionPersistence() {
99          return pollsQuestionPersistence;
100     }
101 
102     public void setPollsQuestionPersistence(
103         PollsQuestionPersistence pollsQuestionPersistence) {
104         this.pollsQuestionPersistence = pollsQuestionPersistence;
105     }
106 
107     public PollsVoteLocalService getPollsVoteLocalService() {
108         return pollsVoteLocalService;
109     }
110 
111     public void setPollsVoteLocalService(
112         PollsVoteLocalService pollsVoteLocalService) {
113         this.pollsVoteLocalService = pollsVoteLocalService;
114     }
115 
116     public PollsVoteService getPollsVoteService() {
117         return pollsVoteService;
118     }
119 
120     public void setPollsVoteService(PollsVoteService pollsVoteService) {
121         this.pollsVoteService = pollsVoteService;
122     }
123 
124     public PollsVotePersistence getPollsVotePersistence() {
125         return pollsVotePersistence;
126     }
127 
128     public void setPollsVotePersistence(
129         PollsVotePersistence pollsVotePersistence) {
130         this.pollsVotePersistence = pollsVotePersistence;
131     }
132 
133     public CounterLocalService getCounterLocalService() {
134         return counterLocalService;
135     }
136 
137     public void setCounterLocalService(CounterLocalService counterLocalService) {
138         this.counterLocalService = counterLocalService;
139     }
140 
141     public CounterService getCounterService() {
142         return counterService;
143     }
144 
145     public void setCounterService(CounterService counterService) {
146         this.counterService = counterService;
147     }
148 
149     public ResourceLocalService getResourceLocalService() {
150         return resourceLocalService;
151     }
152 
153     public void setResourceLocalService(
154         ResourceLocalService resourceLocalService) {
155         this.resourceLocalService = resourceLocalService;
156     }
157 
158     public ResourceService getResourceService() {
159         return resourceService;
160     }
161 
162     public void setResourceService(ResourceService resourceService) {
163         this.resourceService = resourceService;
164     }
165 
166     public ResourcePersistence getResourcePersistence() {
167         return resourcePersistence;
168     }
169 
170     public void setResourcePersistence(ResourcePersistence resourcePersistence) {
171         this.resourcePersistence = resourcePersistence;
172     }
173 
174     public ResourceFinder getResourceFinder() {
175         return resourceFinder;
176     }
177 
178     public void setResourceFinder(ResourceFinder resourceFinder) {
179         this.resourceFinder = resourceFinder;
180     }
181 
182     public UserLocalService getUserLocalService() {
183         return userLocalService;
184     }
185 
186     public void setUserLocalService(UserLocalService userLocalService) {
187         this.userLocalService = userLocalService;
188     }
189 
190     public UserService getUserService() {
191         return userService;
192     }
193 
194     public void setUserService(UserService userService) {
195         this.userService = userService;
196     }
197 
198     public UserPersistence getUserPersistence() {
199         return userPersistence;
200     }
201 
202     public void setUserPersistence(UserPersistence userPersistence) {
203         this.userPersistence = userPersistence;
204     }
205 
206     public UserFinder getUserFinder() {
207         return userFinder;
208     }
209 
210     public void setUserFinder(UserFinder userFinder) {
211         this.userFinder = userFinder;
212     }
213 
214     protected void runSQL(String sql) throws SystemException {
215         try {
216             DataSource dataSource = pollsQuestionPersistence.getDataSource();
217 
218             SqlUpdate sqlUpdate = SqlUpdateFactoryUtil.getSqlUpdate(dataSource,
219                     sql, new int[0]);
220 
221             sqlUpdate.update(new Object[0]);
222         }
223         catch (Exception e) {
224             throw new SystemException(e);
225         }
226     }
227 
228     @BeanReference(type = PollsChoiceLocalService.class)
229     protected PollsChoiceLocalService pollsChoiceLocalService;
230     @BeanReference(type = PollsChoicePersistence.class)
231     protected PollsChoicePersistence pollsChoicePersistence;
232     @BeanReference(type = PollsChoiceFinder.class)
233     protected PollsChoiceFinder pollsChoiceFinder;
234     @BeanReference(type = PollsQuestionLocalService.class)
235     protected PollsQuestionLocalService pollsQuestionLocalService;
236     @BeanReference(type = PollsQuestionService.class)
237     protected PollsQuestionService pollsQuestionService;
238     @BeanReference(type = PollsQuestionPersistence.class)
239     protected PollsQuestionPersistence pollsQuestionPersistence;
240     @BeanReference(type = PollsVoteLocalService.class)
241     protected PollsVoteLocalService pollsVoteLocalService;
242     @BeanReference(type = PollsVoteService.class)
243     protected PollsVoteService pollsVoteService;
244     @BeanReference(type = PollsVotePersistence.class)
245     protected PollsVotePersistence pollsVotePersistence;
246     @BeanReference(type = CounterLocalService.class)
247     protected CounterLocalService counterLocalService;
248     @BeanReference(type = CounterService.class)
249     protected CounterService counterService;
250     @BeanReference(type = ResourceLocalService.class)
251     protected ResourceLocalService resourceLocalService;
252     @BeanReference(type = ResourceService.class)
253     protected ResourceService resourceService;
254     @BeanReference(type = ResourcePersistence.class)
255     protected ResourcePersistence resourcePersistence;
256     @BeanReference(type = ResourceFinder.class)
257     protected ResourceFinder resourceFinder;
258     @BeanReference(type = UserLocalService.class)
259     protected UserLocalService userLocalService;
260     @BeanReference(type = UserService.class)
261     protected UserService userService;
262     @BeanReference(type = UserPersistence.class)
263     protected UserPersistence userPersistence;
264     @BeanReference(type = UserFinder.class)
265     protected UserFinder userFinder;
266 }