001
014
015 package com.liferay.portlet.shopping.service.base;
016
017 import com.liferay.portal.kernel.bean.BeanReference;
018 import com.liferay.portal.kernel.bean.IdentifiableBean;
019 import com.liferay.portal.kernel.dao.db.DB;
020 import com.liferay.portal.kernel.dao.db.DBFactoryUtil;
021 import com.liferay.portal.kernel.dao.jdbc.SqlUpdate;
022 import com.liferay.portal.kernel.dao.jdbc.SqlUpdateFactoryUtil;
023 import com.liferay.portal.kernel.exception.SystemException;
024 import com.liferay.portal.service.BaseServiceImpl;
025 import com.liferay.portal.service.persistence.UserFinder;
026 import com.liferay.portal.service.persistence.UserPersistence;
027 import com.liferay.portal.util.PortalUtil;
028
029 import com.liferay.portlet.shopping.model.ShoppingCategory;
030 import com.liferay.portlet.shopping.service.ShoppingCategoryService;
031 import com.liferay.portlet.shopping.service.persistence.ShoppingCategoryPersistence;
032 import com.liferay.portlet.shopping.service.persistence.ShoppingItemFinder;
033 import com.liferay.portlet.shopping.service.persistence.ShoppingItemPersistence;
034
035 import javax.sql.DataSource;
036
037
049 public abstract class ShoppingCategoryServiceBaseImpl extends BaseServiceImpl
050 implements ShoppingCategoryService, IdentifiableBean {
051
056
057
062 public com.liferay.portlet.shopping.service.ShoppingCategoryLocalService getShoppingCategoryLocalService() {
063 return shoppingCategoryLocalService;
064 }
065
066
071 public void setShoppingCategoryLocalService(
072 com.liferay.portlet.shopping.service.ShoppingCategoryLocalService shoppingCategoryLocalService) {
073 this.shoppingCategoryLocalService = shoppingCategoryLocalService;
074 }
075
076
081 public com.liferay.portlet.shopping.service.ShoppingCategoryService getShoppingCategoryService() {
082 return shoppingCategoryService;
083 }
084
085
090 public void setShoppingCategoryService(
091 com.liferay.portlet.shopping.service.ShoppingCategoryService shoppingCategoryService) {
092 this.shoppingCategoryService = shoppingCategoryService;
093 }
094
095
100 public ShoppingCategoryPersistence getShoppingCategoryPersistence() {
101 return shoppingCategoryPersistence;
102 }
103
104
109 public void setShoppingCategoryPersistence(
110 ShoppingCategoryPersistence shoppingCategoryPersistence) {
111 this.shoppingCategoryPersistence = shoppingCategoryPersistence;
112 }
113
114
119 public com.liferay.counter.service.CounterLocalService getCounterLocalService() {
120 return counterLocalService;
121 }
122
123
128 public void setCounterLocalService(
129 com.liferay.counter.service.CounterLocalService counterLocalService) {
130 this.counterLocalService = counterLocalService;
131 }
132
133
138 public com.liferay.portal.service.ResourceLocalService getResourceLocalService() {
139 return resourceLocalService;
140 }
141
142
147 public void setResourceLocalService(
148 com.liferay.portal.service.ResourceLocalService resourceLocalService) {
149 this.resourceLocalService = resourceLocalService;
150 }
151
152
157 public com.liferay.portal.service.UserLocalService getUserLocalService() {
158 return userLocalService;
159 }
160
161
166 public void setUserLocalService(
167 com.liferay.portal.service.UserLocalService userLocalService) {
168 this.userLocalService = userLocalService;
169 }
170
171
176 public com.liferay.portal.service.UserService getUserService() {
177 return userService;
178 }
179
180
185 public void setUserService(
186 com.liferay.portal.service.UserService userService) {
187 this.userService = userService;
188 }
189
190
195 public UserPersistence getUserPersistence() {
196 return userPersistence;
197 }
198
199
204 public void setUserPersistence(UserPersistence userPersistence) {
205 this.userPersistence = userPersistence;
206 }
207
208
213 public UserFinder getUserFinder() {
214 return userFinder;
215 }
216
217
222 public void setUserFinder(UserFinder userFinder) {
223 this.userFinder = userFinder;
224 }
225
226
231 public com.liferay.portlet.shopping.service.ShoppingItemLocalService getShoppingItemLocalService() {
232 return shoppingItemLocalService;
233 }
234
235
240 public void setShoppingItemLocalService(
241 com.liferay.portlet.shopping.service.ShoppingItemLocalService shoppingItemLocalService) {
242 this.shoppingItemLocalService = shoppingItemLocalService;
243 }
244
245
250 public com.liferay.portlet.shopping.service.ShoppingItemService getShoppingItemService() {
251 return shoppingItemService;
252 }
253
254
259 public void setShoppingItemService(
260 com.liferay.portlet.shopping.service.ShoppingItemService shoppingItemService) {
261 this.shoppingItemService = shoppingItemService;
262 }
263
264
269 public ShoppingItemPersistence getShoppingItemPersistence() {
270 return shoppingItemPersistence;
271 }
272
273
278 public void setShoppingItemPersistence(
279 ShoppingItemPersistence shoppingItemPersistence) {
280 this.shoppingItemPersistence = shoppingItemPersistence;
281 }
282
283
288 public ShoppingItemFinder getShoppingItemFinder() {
289 return shoppingItemFinder;
290 }
291
292
297 public void setShoppingItemFinder(ShoppingItemFinder shoppingItemFinder) {
298 this.shoppingItemFinder = shoppingItemFinder;
299 }
300
301 public void afterPropertiesSet() {
302 }
303
304 public void destroy() {
305 }
306
307
312 @Override
313 public String getBeanIdentifier() {
314 return _beanIdentifier;
315 }
316
317
322 @Override
323 public void setBeanIdentifier(String beanIdentifier) {
324 _beanIdentifier = beanIdentifier;
325 }
326
327 protected Class<?> getModelClass() {
328 return ShoppingCategory.class;
329 }
330
331 protected String getModelClassName() {
332 return ShoppingCategory.class.getName();
333 }
334
335
340 protected void runSQL(String sql) {
341 try {
342 DataSource dataSource = shoppingCategoryPersistence.getDataSource();
343
344 DB db = DBFactoryUtil.getDB();
345
346 sql = db.buildSQL(sql);
347 sql = PortalUtil.transformSQL(sql);
348
349 SqlUpdate sqlUpdate = SqlUpdateFactoryUtil.getSqlUpdate(dataSource,
350 sql, new int[0]);
351
352 sqlUpdate.update();
353 }
354 catch (Exception e) {
355 throw new SystemException(e);
356 }
357 }
358
359 @BeanReference(type = com.liferay.portlet.shopping.service.ShoppingCategoryLocalService.class)
360 protected com.liferay.portlet.shopping.service.ShoppingCategoryLocalService shoppingCategoryLocalService;
361 @BeanReference(type = com.liferay.portlet.shopping.service.ShoppingCategoryService.class)
362 protected com.liferay.portlet.shopping.service.ShoppingCategoryService shoppingCategoryService;
363 @BeanReference(type = ShoppingCategoryPersistence.class)
364 protected ShoppingCategoryPersistence shoppingCategoryPersistence;
365 @BeanReference(type = com.liferay.counter.service.CounterLocalService.class)
366 protected com.liferay.counter.service.CounterLocalService counterLocalService;
367 @BeanReference(type = com.liferay.portal.service.ResourceLocalService.class)
368 protected com.liferay.portal.service.ResourceLocalService resourceLocalService;
369 @BeanReference(type = com.liferay.portal.service.UserLocalService.class)
370 protected com.liferay.portal.service.UserLocalService userLocalService;
371 @BeanReference(type = com.liferay.portal.service.UserService.class)
372 protected com.liferay.portal.service.UserService userService;
373 @BeanReference(type = UserPersistence.class)
374 protected UserPersistence userPersistence;
375 @BeanReference(type = UserFinder.class)
376 protected UserFinder userFinder;
377 @BeanReference(type = com.liferay.portlet.shopping.service.ShoppingItemLocalService.class)
378 protected com.liferay.portlet.shopping.service.ShoppingItemLocalService shoppingItemLocalService;
379 @BeanReference(type = com.liferay.portlet.shopping.service.ShoppingItemService.class)
380 protected com.liferay.portlet.shopping.service.ShoppingItemService shoppingItemService;
381 @BeanReference(type = ShoppingItemPersistence.class)
382 protected ShoppingItemPersistence shoppingItemPersistence;
383 @BeanReference(type = ShoppingItemFinder.class)
384 protected ShoppingItemFinder shoppingItemFinder;
385 private String _beanIdentifier;
386 }