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