001
014
015 package com.liferay.portal.service.base;
016
017 import com.liferay.portal.kernel.bean.BeanReference;
018 import com.liferay.portal.kernel.dao.db.DB;
019 import com.liferay.portal.kernel.dao.db.DBManagerUtil;
020 import com.liferay.portal.kernel.dao.jdbc.SqlUpdate;
021 import com.liferay.portal.kernel.dao.jdbc.SqlUpdateFactoryUtil;
022 import com.liferay.portal.kernel.exception.SystemException;
023 import com.liferay.portal.kernel.module.framework.service.IdentifiableOSGiService;
024 import com.liferay.portal.model.LayoutBranch;
025 import com.liferay.portal.service.BaseServiceImpl;
026 import com.liferay.portal.service.LayoutBranchService;
027 import com.liferay.portal.service.persistence.LayoutBranchPersistence;
028 import com.liferay.portal.service.persistence.LayoutRevisionPersistence;
029 import com.liferay.portal.service.persistence.LayoutSetBranchPersistence;
030 import com.liferay.portal.service.persistence.RecentLayoutBranchPersistence;
031 import com.liferay.portal.service.persistence.UserFinder;
032 import com.liferay.portal.service.persistence.UserPersistence;
033 import com.liferay.portal.util.PortalUtil;
034
035 import javax.sql.DataSource;
036
037
049 public abstract class LayoutBranchServiceBaseImpl extends BaseServiceImpl
050 implements LayoutBranchService, IdentifiableOSGiService {
051
056
057
062 public com.liferay.portal.service.LayoutBranchLocalService getLayoutBranchLocalService() {
063 return layoutBranchLocalService;
064 }
065
066
071 public void setLayoutBranchLocalService(
072 com.liferay.portal.service.LayoutBranchLocalService layoutBranchLocalService) {
073 this.layoutBranchLocalService = layoutBranchLocalService;
074 }
075
076
081 public LayoutBranchService getLayoutBranchService() {
082 return layoutBranchService;
083 }
084
085
090 public void setLayoutBranchService(LayoutBranchService layoutBranchService) {
091 this.layoutBranchService = layoutBranchService;
092 }
093
094
099 public LayoutBranchPersistence getLayoutBranchPersistence() {
100 return layoutBranchPersistence;
101 }
102
103
108 public void setLayoutBranchPersistence(
109 LayoutBranchPersistence layoutBranchPersistence) {
110 this.layoutBranchPersistence = layoutBranchPersistence;
111 }
112
113
118 public com.liferay.counter.service.CounterLocalService getCounterLocalService() {
119 return counterLocalService;
120 }
121
122
127 public void setCounterLocalService(
128 com.liferay.counter.service.CounterLocalService counterLocalService) {
129 this.counterLocalService = counterLocalService;
130 }
131
132
137 public com.liferay.portal.service.LayoutRevisionLocalService getLayoutRevisionLocalService() {
138 return layoutRevisionLocalService;
139 }
140
141
146 public void setLayoutRevisionLocalService(
147 com.liferay.portal.service.LayoutRevisionLocalService layoutRevisionLocalService) {
148 this.layoutRevisionLocalService = layoutRevisionLocalService;
149 }
150
151
156 public com.liferay.portal.service.LayoutRevisionService getLayoutRevisionService() {
157 return layoutRevisionService;
158 }
159
160
165 public void setLayoutRevisionService(
166 com.liferay.portal.service.LayoutRevisionService layoutRevisionService) {
167 this.layoutRevisionService = layoutRevisionService;
168 }
169
170
175 public LayoutRevisionPersistence getLayoutRevisionPersistence() {
176 return layoutRevisionPersistence;
177 }
178
179
184 public void setLayoutRevisionPersistence(
185 LayoutRevisionPersistence layoutRevisionPersistence) {
186 this.layoutRevisionPersistence = layoutRevisionPersistence;
187 }
188
189
194 public com.liferay.portal.service.LayoutSetBranchLocalService getLayoutSetBranchLocalService() {
195 return layoutSetBranchLocalService;
196 }
197
198
203 public void setLayoutSetBranchLocalService(
204 com.liferay.portal.service.LayoutSetBranchLocalService layoutSetBranchLocalService) {
205 this.layoutSetBranchLocalService = layoutSetBranchLocalService;
206 }
207
208
213 public com.liferay.portal.service.LayoutSetBranchService getLayoutSetBranchService() {
214 return layoutSetBranchService;
215 }
216
217
222 public void setLayoutSetBranchService(
223 com.liferay.portal.service.LayoutSetBranchService layoutSetBranchService) {
224 this.layoutSetBranchService = layoutSetBranchService;
225 }
226
227
232 public LayoutSetBranchPersistence getLayoutSetBranchPersistence() {
233 return layoutSetBranchPersistence;
234 }
235
236
241 public void setLayoutSetBranchPersistence(
242 LayoutSetBranchPersistence layoutSetBranchPersistence) {
243 this.layoutSetBranchPersistence = layoutSetBranchPersistence;
244 }
245
246
251 public com.liferay.portal.service.RecentLayoutBranchLocalService getRecentLayoutBranchLocalService() {
252 return recentLayoutBranchLocalService;
253 }
254
255
260 public void setRecentLayoutBranchLocalService(
261 com.liferay.portal.service.RecentLayoutBranchLocalService recentLayoutBranchLocalService) {
262 this.recentLayoutBranchLocalService = recentLayoutBranchLocalService;
263 }
264
265
270 public RecentLayoutBranchPersistence getRecentLayoutBranchPersistence() {
271 return recentLayoutBranchPersistence;
272 }
273
274
279 public void setRecentLayoutBranchPersistence(
280 RecentLayoutBranchPersistence recentLayoutBranchPersistence) {
281 this.recentLayoutBranchPersistence = recentLayoutBranchPersistence;
282 }
283
284
289 public com.liferay.portal.service.UserLocalService getUserLocalService() {
290 return userLocalService;
291 }
292
293
298 public void setUserLocalService(
299 com.liferay.portal.service.UserLocalService userLocalService) {
300 this.userLocalService = userLocalService;
301 }
302
303
308 public com.liferay.portal.service.UserService getUserService() {
309 return userService;
310 }
311
312
317 public void setUserService(
318 com.liferay.portal.service.UserService userService) {
319 this.userService = userService;
320 }
321
322
327 public UserPersistence getUserPersistence() {
328 return userPersistence;
329 }
330
331
336 public void setUserPersistence(UserPersistence userPersistence) {
337 this.userPersistence = userPersistence;
338 }
339
340
345 public UserFinder getUserFinder() {
346 return userFinder;
347 }
348
349
354 public void setUserFinder(UserFinder userFinder) {
355 this.userFinder = userFinder;
356 }
357
358 public void afterPropertiesSet() {
359 }
360
361 public void destroy() {
362 }
363
364
369 @Override
370 public String getOSGiServiceIdentifier() {
371 return LayoutBranchService.class.getName();
372 }
373
374 protected Class<?> getModelClass() {
375 return LayoutBranch.class;
376 }
377
378 protected String getModelClassName() {
379 return LayoutBranch.class.getName();
380 }
381
382
387 protected void runSQL(String sql) {
388 try {
389 DataSource dataSource = layoutBranchPersistence.getDataSource();
390
391 DB db = DBManagerUtil.getDB();
392
393 sql = db.buildSQL(sql);
394 sql = PortalUtil.transformSQL(sql);
395
396 SqlUpdate sqlUpdate = SqlUpdateFactoryUtil.getSqlUpdate(dataSource,
397 sql, new int[0]);
398
399 sqlUpdate.update();
400 }
401 catch (Exception e) {
402 throw new SystemException(e);
403 }
404 }
405
406 @BeanReference(type = com.liferay.portal.service.LayoutBranchLocalService.class)
407 protected com.liferay.portal.service.LayoutBranchLocalService layoutBranchLocalService;
408 @BeanReference(type = com.liferay.portal.service.LayoutBranchService.class)
409 protected LayoutBranchService layoutBranchService;
410 @BeanReference(type = LayoutBranchPersistence.class)
411 protected LayoutBranchPersistence layoutBranchPersistence;
412 @BeanReference(type = com.liferay.counter.service.CounterLocalService.class)
413 protected com.liferay.counter.service.CounterLocalService counterLocalService;
414 @BeanReference(type = com.liferay.portal.service.LayoutRevisionLocalService.class)
415 protected com.liferay.portal.service.LayoutRevisionLocalService layoutRevisionLocalService;
416 @BeanReference(type = com.liferay.portal.service.LayoutRevisionService.class)
417 protected com.liferay.portal.service.LayoutRevisionService layoutRevisionService;
418 @BeanReference(type = LayoutRevisionPersistence.class)
419 protected LayoutRevisionPersistence layoutRevisionPersistence;
420 @BeanReference(type = com.liferay.portal.service.LayoutSetBranchLocalService.class)
421 protected com.liferay.portal.service.LayoutSetBranchLocalService layoutSetBranchLocalService;
422 @BeanReference(type = com.liferay.portal.service.LayoutSetBranchService.class)
423 protected com.liferay.portal.service.LayoutSetBranchService layoutSetBranchService;
424 @BeanReference(type = LayoutSetBranchPersistence.class)
425 protected LayoutSetBranchPersistence layoutSetBranchPersistence;
426 @BeanReference(type = com.liferay.portal.service.RecentLayoutBranchLocalService.class)
427 protected com.liferay.portal.service.RecentLayoutBranchLocalService recentLayoutBranchLocalService;
428 @BeanReference(type = RecentLayoutBranchPersistence.class)
429 protected RecentLayoutBranchPersistence recentLayoutBranchPersistence;
430 @BeanReference(type = com.liferay.portal.service.UserLocalService.class)
431 protected com.liferay.portal.service.UserLocalService userLocalService;
432 @BeanReference(type = com.liferay.portal.service.UserService.class)
433 protected com.liferay.portal.service.UserService userService;
434 @BeanReference(type = UserPersistence.class)
435 protected UserPersistence userPersistence;
436 @BeanReference(type = UserFinder.class)
437 protected UserFinder userFinder;
438 }