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.DBFactoryUtil;
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.UserFinder;
031 import com.liferay.portal.service.persistence.UserPersistence;
032 import com.liferay.portal.util.PortalUtil;
033
034 import javax.sql.DataSource;
035
036
048 public abstract class LayoutBranchServiceBaseImpl extends BaseServiceImpl
049 implements LayoutBranchService, IdentifiableOSGiService {
050
055
056
061 public com.liferay.portal.service.LayoutBranchLocalService getLayoutBranchLocalService() {
062 return layoutBranchLocalService;
063 }
064
065
070 public void setLayoutBranchLocalService(
071 com.liferay.portal.service.LayoutBranchLocalService layoutBranchLocalService) {
072 this.layoutBranchLocalService = layoutBranchLocalService;
073 }
074
075
080 public LayoutBranchService getLayoutBranchService() {
081 return layoutBranchService;
082 }
083
084
089 public void setLayoutBranchService(LayoutBranchService layoutBranchService) {
090 this.layoutBranchService = layoutBranchService;
091 }
092
093
098 public LayoutBranchPersistence getLayoutBranchPersistence() {
099 return layoutBranchPersistence;
100 }
101
102
107 public void setLayoutBranchPersistence(
108 LayoutBranchPersistence layoutBranchPersistence) {
109 this.layoutBranchPersistence = layoutBranchPersistence;
110 }
111
112
117 public com.liferay.counter.service.CounterLocalService getCounterLocalService() {
118 return counterLocalService;
119 }
120
121
126 public void setCounterLocalService(
127 com.liferay.counter.service.CounterLocalService counterLocalService) {
128 this.counterLocalService = counterLocalService;
129 }
130
131
136 public com.liferay.portal.service.LayoutRevisionLocalService getLayoutRevisionLocalService() {
137 return layoutRevisionLocalService;
138 }
139
140
145 public void setLayoutRevisionLocalService(
146 com.liferay.portal.service.LayoutRevisionLocalService layoutRevisionLocalService) {
147 this.layoutRevisionLocalService = layoutRevisionLocalService;
148 }
149
150
155 public com.liferay.portal.service.LayoutRevisionService getLayoutRevisionService() {
156 return layoutRevisionService;
157 }
158
159
164 public void setLayoutRevisionService(
165 com.liferay.portal.service.LayoutRevisionService layoutRevisionService) {
166 this.layoutRevisionService = layoutRevisionService;
167 }
168
169
174 public LayoutRevisionPersistence getLayoutRevisionPersistence() {
175 return layoutRevisionPersistence;
176 }
177
178
183 public void setLayoutRevisionPersistence(
184 LayoutRevisionPersistence layoutRevisionPersistence) {
185 this.layoutRevisionPersistence = layoutRevisionPersistence;
186 }
187
188
193 public com.liferay.portal.service.LayoutSetBranchLocalService getLayoutSetBranchLocalService() {
194 return layoutSetBranchLocalService;
195 }
196
197
202 public void setLayoutSetBranchLocalService(
203 com.liferay.portal.service.LayoutSetBranchLocalService layoutSetBranchLocalService) {
204 this.layoutSetBranchLocalService = layoutSetBranchLocalService;
205 }
206
207
212 public com.liferay.portal.service.LayoutSetBranchService getLayoutSetBranchService() {
213 return layoutSetBranchService;
214 }
215
216
221 public void setLayoutSetBranchService(
222 com.liferay.portal.service.LayoutSetBranchService layoutSetBranchService) {
223 this.layoutSetBranchService = layoutSetBranchService;
224 }
225
226
231 public LayoutSetBranchPersistence getLayoutSetBranchPersistence() {
232 return layoutSetBranchPersistence;
233 }
234
235
240 public void setLayoutSetBranchPersistence(
241 LayoutSetBranchPersistence layoutSetBranchPersistence) {
242 this.layoutSetBranchPersistence = layoutSetBranchPersistence;
243 }
244
245
250 public com.liferay.portal.service.UserLocalService getUserLocalService() {
251 return userLocalService;
252 }
253
254
259 public void setUserLocalService(
260 com.liferay.portal.service.UserLocalService userLocalService) {
261 this.userLocalService = userLocalService;
262 }
263
264
269 public com.liferay.portal.service.UserService getUserService() {
270 return userService;
271 }
272
273
278 public void setUserService(
279 com.liferay.portal.service.UserService userService) {
280 this.userService = userService;
281 }
282
283
288 public UserPersistence getUserPersistence() {
289 return userPersistence;
290 }
291
292
297 public void setUserPersistence(UserPersistence userPersistence) {
298 this.userPersistence = userPersistence;
299 }
300
301
306 public UserFinder getUserFinder() {
307 return userFinder;
308 }
309
310
315 public void setUserFinder(UserFinder userFinder) {
316 this.userFinder = userFinder;
317 }
318
319 public void afterPropertiesSet() {
320 }
321
322 public void destroy() {
323 }
324
325
330 @Override
331 public String getOSGiServiceIdentifier() {
332 return LayoutBranchService.class.getName();
333 }
334
335 protected Class<?> getModelClass() {
336 return LayoutBranch.class;
337 }
338
339 protected String getModelClassName() {
340 return LayoutBranch.class.getName();
341 }
342
343
348 protected void runSQL(String sql) {
349 try {
350 DataSource dataSource = layoutBranchPersistence.getDataSource();
351
352 DB db = DBFactoryUtil.getDB();
353
354 sql = db.buildSQL(sql);
355 sql = PortalUtil.transformSQL(sql);
356
357 SqlUpdate sqlUpdate = SqlUpdateFactoryUtil.getSqlUpdate(dataSource,
358 sql, new int[0]);
359
360 sqlUpdate.update();
361 }
362 catch (Exception e) {
363 throw new SystemException(e);
364 }
365 }
366
367 @BeanReference(type = com.liferay.portal.service.LayoutBranchLocalService.class)
368 protected com.liferay.portal.service.LayoutBranchLocalService layoutBranchLocalService;
369 @BeanReference(type = com.liferay.portal.service.LayoutBranchService.class)
370 protected LayoutBranchService layoutBranchService;
371 @BeanReference(type = LayoutBranchPersistence.class)
372 protected LayoutBranchPersistence layoutBranchPersistence;
373 @BeanReference(type = com.liferay.counter.service.CounterLocalService.class)
374 protected com.liferay.counter.service.CounterLocalService counterLocalService;
375 @BeanReference(type = com.liferay.portal.service.LayoutRevisionLocalService.class)
376 protected com.liferay.portal.service.LayoutRevisionLocalService layoutRevisionLocalService;
377 @BeanReference(type = com.liferay.portal.service.LayoutRevisionService.class)
378 protected com.liferay.portal.service.LayoutRevisionService layoutRevisionService;
379 @BeanReference(type = LayoutRevisionPersistence.class)
380 protected LayoutRevisionPersistence layoutRevisionPersistence;
381 @BeanReference(type = com.liferay.portal.service.LayoutSetBranchLocalService.class)
382 protected com.liferay.portal.service.LayoutSetBranchLocalService layoutSetBranchLocalService;
383 @BeanReference(type = com.liferay.portal.service.LayoutSetBranchService.class)
384 protected com.liferay.portal.service.LayoutSetBranchService layoutSetBranchService;
385 @BeanReference(type = LayoutSetBranchPersistence.class)
386 protected LayoutSetBranchPersistence layoutSetBranchPersistence;
387 @BeanReference(type = com.liferay.portal.service.UserLocalService.class)
388 protected com.liferay.portal.service.UserLocalService userLocalService;
389 @BeanReference(type = com.liferay.portal.service.UserService.class)
390 protected com.liferay.portal.service.UserService userService;
391 @BeanReference(type = UserPersistence.class)
392 protected UserPersistence userPersistence;
393 @BeanReference(type = UserFinder.class)
394 protected UserFinder userFinder;
395 }