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.expando.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.expando.service.ExpandoColumnLocalService;
35  import com.liferay.portlet.expando.service.ExpandoColumnService;
36  import com.liferay.portlet.expando.service.ExpandoRowLocalService;
37  import com.liferay.portlet.expando.service.ExpandoTableLocalService;
38  import com.liferay.portlet.expando.service.ExpandoValueLocalService;
39  import com.liferay.portlet.expando.service.ExpandoValueService;
40  import com.liferay.portlet.expando.service.persistence.ExpandoColumnPersistence;
41  import com.liferay.portlet.expando.service.persistence.ExpandoRowPersistence;
42  import com.liferay.portlet.expando.service.persistence.ExpandoTablePersistence;
43  import com.liferay.portlet.expando.service.persistence.ExpandoValuePersistence;
44  
45  import javax.sql.DataSource;
46  
47  /**
48   * <a href="ExpandoValueServiceBaseImpl.java.html"><b><i>View Source</i></b></a>
49   *
50   * @author Brian Wing Shun Chan
51   */
52  public abstract class ExpandoValueServiceBaseImpl extends PrincipalBean
53      implements ExpandoValueService {
54      public ExpandoColumnLocalService getExpandoColumnLocalService() {
55          return expandoColumnLocalService;
56      }
57  
58      public void setExpandoColumnLocalService(
59          ExpandoColumnLocalService expandoColumnLocalService) {
60          this.expandoColumnLocalService = expandoColumnLocalService;
61      }
62  
63      public ExpandoColumnService getExpandoColumnService() {
64          return expandoColumnService;
65      }
66  
67      public void setExpandoColumnService(
68          ExpandoColumnService expandoColumnService) {
69          this.expandoColumnService = expandoColumnService;
70      }
71  
72      public ExpandoColumnPersistence getExpandoColumnPersistence() {
73          return expandoColumnPersistence;
74      }
75  
76      public void setExpandoColumnPersistence(
77          ExpandoColumnPersistence expandoColumnPersistence) {
78          this.expandoColumnPersistence = expandoColumnPersistence;
79      }
80  
81      public ExpandoRowLocalService getExpandoRowLocalService() {
82          return expandoRowLocalService;
83      }
84  
85      public void setExpandoRowLocalService(
86          ExpandoRowLocalService expandoRowLocalService) {
87          this.expandoRowLocalService = expandoRowLocalService;
88      }
89  
90      public ExpandoRowPersistence getExpandoRowPersistence() {
91          return expandoRowPersistence;
92      }
93  
94      public void setExpandoRowPersistence(
95          ExpandoRowPersistence expandoRowPersistence) {
96          this.expandoRowPersistence = expandoRowPersistence;
97      }
98  
99      public ExpandoTableLocalService getExpandoTableLocalService() {
100         return expandoTableLocalService;
101     }
102 
103     public void setExpandoTableLocalService(
104         ExpandoTableLocalService expandoTableLocalService) {
105         this.expandoTableLocalService = expandoTableLocalService;
106     }
107 
108     public ExpandoTablePersistence getExpandoTablePersistence() {
109         return expandoTablePersistence;
110     }
111 
112     public void setExpandoTablePersistence(
113         ExpandoTablePersistence expandoTablePersistence) {
114         this.expandoTablePersistence = expandoTablePersistence;
115     }
116 
117     public ExpandoValueLocalService getExpandoValueLocalService() {
118         return expandoValueLocalService;
119     }
120 
121     public void setExpandoValueLocalService(
122         ExpandoValueLocalService expandoValueLocalService) {
123         this.expandoValueLocalService = expandoValueLocalService;
124     }
125 
126     public ExpandoValueService getExpandoValueService() {
127         return expandoValueService;
128     }
129 
130     public void setExpandoValueService(ExpandoValueService expandoValueService) {
131         this.expandoValueService = expandoValueService;
132     }
133 
134     public ExpandoValuePersistence getExpandoValuePersistence() {
135         return expandoValuePersistence;
136     }
137 
138     public void setExpandoValuePersistence(
139         ExpandoValuePersistence expandoValuePersistence) {
140         this.expandoValuePersistence = expandoValuePersistence;
141     }
142 
143     public CounterLocalService getCounterLocalService() {
144         return counterLocalService;
145     }
146 
147     public void setCounterLocalService(CounterLocalService counterLocalService) {
148         this.counterLocalService = counterLocalService;
149     }
150 
151     public CounterService getCounterService() {
152         return counterService;
153     }
154 
155     public void setCounterService(CounterService counterService) {
156         this.counterService = counterService;
157     }
158 
159     public ResourceLocalService getResourceLocalService() {
160         return resourceLocalService;
161     }
162 
163     public void setResourceLocalService(
164         ResourceLocalService resourceLocalService) {
165         this.resourceLocalService = resourceLocalService;
166     }
167 
168     public ResourceService getResourceService() {
169         return resourceService;
170     }
171 
172     public void setResourceService(ResourceService resourceService) {
173         this.resourceService = resourceService;
174     }
175 
176     public ResourcePersistence getResourcePersistence() {
177         return resourcePersistence;
178     }
179 
180     public void setResourcePersistence(ResourcePersistence resourcePersistence) {
181         this.resourcePersistence = resourcePersistence;
182     }
183 
184     public ResourceFinder getResourceFinder() {
185         return resourceFinder;
186     }
187 
188     public void setResourceFinder(ResourceFinder resourceFinder) {
189         this.resourceFinder = resourceFinder;
190     }
191 
192     public UserLocalService getUserLocalService() {
193         return userLocalService;
194     }
195 
196     public void setUserLocalService(UserLocalService userLocalService) {
197         this.userLocalService = userLocalService;
198     }
199 
200     public UserService getUserService() {
201         return userService;
202     }
203 
204     public void setUserService(UserService userService) {
205         this.userService = userService;
206     }
207 
208     public UserPersistence getUserPersistence() {
209         return userPersistence;
210     }
211 
212     public void setUserPersistence(UserPersistence userPersistence) {
213         this.userPersistence = userPersistence;
214     }
215 
216     public UserFinder getUserFinder() {
217         return userFinder;
218     }
219 
220     public void setUserFinder(UserFinder userFinder) {
221         this.userFinder = userFinder;
222     }
223 
224     protected void runSQL(String sql) throws SystemException {
225         try {
226             DataSource dataSource = expandoValuePersistence.getDataSource();
227 
228             SqlUpdate sqlUpdate = SqlUpdateFactoryUtil.getSqlUpdate(dataSource,
229                     sql, new int[0]);
230 
231             sqlUpdate.update(new Object[0]);
232         }
233         catch (Exception e) {
234             throw new SystemException(e);
235         }
236     }
237 
238     @BeanReference(type = ExpandoColumnLocalService.class)
239     protected ExpandoColumnLocalService expandoColumnLocalService;
240     @BeanReference(type = ExpandoColumnService.class)
241     protected ExpandoColumnService expandoColumnService;
242     @BeanReference(type = ExpandoColumnPersistence.class)
243     protected ExpandoColumnPersistence expandoColumnPersistence;
244     @BeanReference(type = ExpandoRowLocalService.class)
245     protected ExpandoRowLocalService expandoRowLocalService;
246     @BeanReference(type = ExpandoRowPersistence.class)
247     protected ExpandoRowPersistence expandoRowPersistence;
248     @BeanReference(type = ExpandoTableLocalService.class)
249     protected ExpandoTableLocalService expandoTableLocalService;
250     @BeanReference(type = ExpandoTablePersistence.class)
251     protected ExpandoTablePersistence expandoTablePersistence;
252     @BeanReference(type = ExpandoValueLocalService.class)
253     protected ExpandoValueLocalService expandoValueLocalService;
254     @BeanReference(type = ExpandoValueService.class)
255     protected ExpandoValueService expandoValueService;
256     @BeanReference(type = ExpandoValuePersistence.class)
257     protected ExpandoValuePersistence expandoValuePersistence;
258     @BeanReference(type = CounterLocalService.class)
259     protected CounterLocalService counterLocalService;
260     @BeanReference(type = CounterService.class)
261     protected CounterService counterService;
262     @BeanReference(type = ResourceLocalService.class)
263     protected ResourceLocalService resourceLocalService;
264     @BeanReference(type = ResourceService.class)
265     protected ResourceService resourceService;
266     @BeanReference(type = ResourcePersistence.class)
267     protected ResourcePersistence resourcePersistence;
268     @BeanReference(type = ResourceFinder.class)
269     protected ResourceFinder resourceFinder;
270     @BeanReference(type = UserLocalService.class)
271     protected UserLocalService userLocalService;
272     @BeanReference(type = UserService.class)
273     protected UserService userService;
274     @BeanReference(type = UserPersistence.class)
275     protected UserPersistence userPersistence;
276     @BeanReference(type = UserFinder.class)
277     protected UserFinder userFinder;
278 }