001
014
015 package com.liferay.portlet.dynamicdatalists.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.service.persistence.WorkflowInstanceLinkPersistence;
028 import com.liferay.portal.util.PortalUtil;
029
030 import com.liferay.portlet.asset.service.persistence.AssetEntryFinder;
031 import com.liferay.portlet.asset.service.persistence.AssetEntryPersistence;
032 import com.liferay.portlet.dynamicdatalists.model.DDLRecord;
033 import com.liferay.portlet.dynamicdatalists.service.DDLRecordService;
034 import com.liferay.portlet.dynamicdatalists.service.persistence.DDLRecordFinder;
035 import com.liferay.portlet.dynamicdatalists.service.persistence.DDLRecordPersistence;
036 import com.liferay.portlet.dynamicdatalists.service.persistence.DDLRecordSetFinder;
037 import com.liferay.portlet.dynamicdatalists.service.persistence.DDLRecordSetPersistence;
038 import com.liferay.portlet.dynamicdatalists.service.persistence.DDLRecordVersionPersistence;
039 import com.liferay.portlet.dynamicdatamapping.service.persistence.DDMStructureFinder;
040 import com.liferay.portlet.dynamicdatamapping.service.persistence.DDMStructurePersistence;
041
042 import javax.sql.DataSource;
043
044
056 public abstract class DDLRecordServiceBaseImpl extends BaseServiceImpl
057 implements DDLRecordService, IdentifiableBean {
058
063
064
069 public com.liferay.portlet.dynamicdatalists.service.DDLRecordLocalService getDDLRecordLocalService() {
070 return ddlRecordLocalService;
071 }
072
073
078 public void setDDLRecordLocalService(
079 com.liferay.portlet.dynamicdatalists.service.DDLRecordLocalService ddlRecordLocalService) {
080 this.ddlRecordLocalService = ddlRecordLocalService;
081 }
082
083
088 public com.liferay.portlet.dynamicdatalists.service.DDLRecordService getDDLRecordService() {
089 return ddlRecordService;
090 }
091
092
097 public void setDDLRecordService(
098 com.liferay.portlet.dynamicdatalists.service.DDLRecordService ddlRecordService) {
099 this.ddlRecordService = ddlRecordService;
100 }
101
102
107 public DDLRecordPersistence getDDLRecordPersistence() {
108 return ddlRecordPersistence;
109 }
110
111
116 public void setDDLRecordPersistence(
117 DDLRecordPersistence ddlRecordPersistence) {
118 this.ddlRecordPersistence = ddlRecordPersistence;
119 }
120
121
126 public DDLRecordFinder getDDLRecordFinder() {
127 return ddlRecordFinder;
128 }
129
130
135 public void setDDLRecordFinder(DDLRecordFinder ddlRecordFinder) {
136 this.ddlRecordFinder = ddlRecordFinder;
137 }
138
139
144 public com.liferay.counter.service.CounterLocalService getCounterLocalService() {
145 return counterLocalService;
146 }
147
148
153 public void setCounterLocalService(
154 com.liferay.counter.service.CounterLocalService counterLocalService) {
155 this.counterLocalService = counterLocalService;
156 }
157
158
163 public com.liferay.portal.service.UserLocalService getUserLocalService() {
164 return userLocalService;
165 }
166
167
172 public void setUserLocalService(
173 com.liferay.portal.service.UserLocalService userLocalService) {
174 this.userLocalService = userLocalService;
175 }
176
177
182 public com.liferay.portal.service.UserService getUserService() {
183 return userService;
184 }
185
186
191 public void setUserService(
192 com.liferay.portal.service.UserService userService) {
193 this.userService = userService;
194 }
195
196
201 public UserPersistence getUserPersistence() {
202 return userPersistence;
203 }
204
205
210 public void setUserPersistence(UserPersistence userPersistence) {
211 this.userPersistence = userPersistence;
212 }
213
214
219 public UserFinder getUserFinder() {
220 return userFinder;
221 }
222
223
228 public void setUserFinder(UserFinder userFinder) {
229 this.userFinder = userFinder;
230 }
231
232
237 public com.liferay.portal.service.WorkflowInstanceLinkLocalService getWorkflowInstanceLinkLocalService() {
238 return workflowInstanceLinkLocalService;
239 }
240
241
246 public void setWorkflowInstanceLinkLocalService(
247 com.liferay.portal.service.WorkflowInstanceLinkLocalService workflowInstanceLinkLocalService) {
248 this.workflowInstanceLinkLocalService = workflowInstanceLinkLocalService;
249 }
250
251
256 public WorkflowInstanceLinkPersistence getWorkflowInstanceLinkPersistence() {
257 return workflowInstanceLinkPersistence;
258 }
259
260
265 public void setWorkflowInstanceLinkPersistence(
266 WorkflowInstanceLinkPersistence workflowInstanceLinkPersistence) {
267 this.workflowInstanceLinkPersistence = workflowInstanceLinkPersistence;
268 }
269
270
275 public com.liferay.portlet.asset.service.AssetEntryLocalService getAssetEntryLocalService() {
276 return assetEntryLocalService;
277 }
278
279
284 public void setAssetEntryLocalService(
285 com.liferay.portlet.asset.service.AssetEntryLocalService assetEntryLocalService) {
286 this.assetEntryLocalService = assetEntryLocalService;
287 }
288
289
294 public com.liferay.portlet.asset.service.AssetEntryService getAssetEntryService() {
295 return assetEntryService;
296 }
297
298
303 public void setAssetEntryService(
304 com.liferay.portlet.asset.service.AssetEntryService assetEntryService) {
305 this.assetEntryService = assetEntryService;
306 }
307
308
313 public AssetEntryPersistence getAssetEntryPersistence() {
314 return assetEntryPersistence;
315 }
316
317
322 public void setAssetEntryPersistence(
323 AssetEntryPersistence assetEntryPersistence) {
324 this.assetEntryPersistence = assetEntryPersistence;
325 }
326
327
332 public AssetEntryFinder getAssetEntryFinder() {
333 return assetEntryFinder;
334 }
335
336
341 public void setAssetEntryFinder(AssetEntryFinder assetEntryFinder) {
342 this.assetEntryFinder = assetEntryFinder;
343 }
344
345
350 public com.liferay.portlet.dynamicdatamapping.service.DDMStructureLocalService getDDMStructureLocalService() {
351 return ddmStructureLocalService;
352 }
353
354
359 public void setDDMStructureLocalService(
360 com.liferay.portlet.dynamicdatamapping.service.DDMStructureLocalService ddmStructureLocalService) {
361 this.ddmStructureLocalService = ddmStructureLocalService;
362 }
363
364
369 public com.liferay.portlet.dynamicdatamapping.service.DDMStructureService getDDMStructureService() {
370 return ddmStructureService;
371 }
372
373
378 public void setDDMStructureService(
379 com.liferay.portlet.dynamicdatamapping.service.DDMStructureService ddmStructureService) {
380 this.ddmStructureService = ddmStructureService;
381 }
382
383
388 public DDMStructurePersistence getDDMStructurePersistence() {
389 return ddmStructurePersistence;
390 }
391
392
397 public void setDDMStructurePersistence(
398 DDMStructurePersistence ddmStructurePersistence) {
399 this.ddmStructurePersistence = ddmStructurePersistence;
400 }
401
402
407 public DDMStructureFinder getDDMStructureFinder() {
408 return ddmStructureFinder;
409 }
410
411
416 public void setDDMStructureFinder(DDMStructureFinder ddmStructureFinder) {
417 this.ddmStructureFinder = ddmStructureFinder;
418 }
419
420
425 public com.liferay.portlet.dynamicdatalists.service.DDLRecordSetLocalService getDDLRecordSetLocalService() {
426 return ddlRecordSetLocalService;
427 }
428
429
434 public void setDDLRecordSetLocalService(
435 com.liferay.portlet.dynamicdatalists.service.DDLRecordSetLocalService ddlRecordSetLocalService) {
436 this.ddlRecordSetLocalService = ddlRecordSetLocalService;
437 }
438
439
444 public com.liferay.portlet.dynamicdatalists.service.DDLRecordSetService getDDLRecordSetService() {
445 return ddlRecordSetService;
446 }
447
448
453 public void setDDLRecordSetService(
454 com.liferay.portlet.dynamicdatalists.service.DDLRecordSetService ddlRecordSetService) {
455 this.ddlRecordSetService = ddlRecordSetService;
456 }
457
458
463 public DDLRecordSetPersistence getDDLRecordSetPersistence() {
464 return ddlRecordSetPersistence;
465 }
466
467
472 public void setDDLRecordSetPersistence(
473 DDLRecordSetPersistence ddlRecordSetPersistence) {
474 this.ddlRecordSetPersistence = ddlRecordSetPersistence;
475 }
476
477
482 public DDLRecordSetFinder getDDLRecordSetFinder() {
483 return ddlRecordSetFinder;
484 }
485
486
491 public void setDDLRecordSetFinder(DDLRecordSetFinder ddlRecordSetFinder) {
492 this.ddlRecordSetFinder = ddlRecordSetFinder;
493 }
494
495
500 public com.liferay.portlet.dynamicdatalists.service.DDLRecordVersionLocalService getDDLRecordVersionLocalService() {
501 return ddlRecordVersionLocalService;
502 }
503
504
509 public void setDDLRecordVersionLocalService(
510 com.liferay.portlet.dynamicdatalists.service.DDLRecordVersionLocalService ddlRecordVersionLocalService) {
511 this.ddlRecordVersionLocalService = ddlRecordVersionLocalService;
512 }
513
514
519 public com.liferay.portlet.dynamicdatalists.service.DDLRecordVersionService getDDLRecordVersionService() {
520 return ddlRecordVersionService;
521 }
522
523
528 public void setDDLRecordVersionService(
529 com.liferay.portlet.dynamicdatalists.service.DDLRecordVersionService ddlRecordVersionService) {
530 this.ddlRecordVersionService = ddlRecordVersionService;
531 }
532
533
538 public DDLRecordVersionPersistence getDDLRecordVersionPersistence() {
539 return ddlRecordVersionPersistence;
540 }
541
542
547 public void setDDLRecordVersionPersistence(
548 DDLRecordVersionPersistence ddlRecordVersionPersistence) {
549 this.ddlRecordVersionPersistence = ddlRecordVersionPersistence;
550 }
551
552 public void afterPropertiesSet() {
553 }
554
555 public void destroy() {
556 }
557
558
563 @Override
564 public String getBeanIdentifier() {
565 return _beanIdentifier;
566 }
567
568
573 @Override
574 public void setBeanIdentifier(String beanIdentifier) {
575 _beanIdentifier = beanIdentifier;
576 }
577
578 protected Class<?> getModelClass() {
579 return DDLRecord.class;
580 }
581
582 protected String getModelClassName() {
583 return DDLRecord.class.getName();
584 }
585
586
591 protected void runSQL(String sql) {
592 try {
593 DataSource dataSource = ddlRecordPersistence.getDataSource();
594
595 DB db = DBFactoryUtil.getDB();
596
597 sql = db.buildSQL(sql);
598 sql = PortalUtil.transformSQL(sql);
599
600 SqlUpdate sqlUpdate = SqlUpdateFactoryUtil.getSqlUpdate(dataSource,
601 sql, new int[0]);
602
603 sqlUpdate.update();
604 }
605 catch (Exception e) {
606 throw new SystemException(e);
607 }
608 }
609
610 @BeanReference(type = com.liferay.portlet.dynamicdatalists.service.DDLRecordLocalService.class)
611 protected com.liferay.portlet.dynamicdatalists.service.DDLRecordLocalService ddlRecordLocalService;
612 @BeanReference(type = com.liferay.portlet.dynamicdatalists.service.DDLRecordService.class)
613 protected com.liferay.portlet.dynamicdatalists.service.DDLRecordService ddlRecordService;
614 @BeanReference(type = DDLRecordPersistence.class)
615 protected DDLRecordPersistence ddlRecordPersistence;
616 @BeanReference(type = DDLRecordFinder.class)
617 protected DDLRecordFinder ddlRecordFinder;
618 @BeanReference(type = com.liferay.counter.service.CounterLocalService.class)
619 protected com.liferay.counter.service.CounterLocalService counterLocalService;
620 @BeanReference(type = com.liferay.portal.service.UserLocalService.class)
621 protected com.liferay.portal.service.UserLocalService userLocalService;
622 @BeanReference(type = com.liferay.portal.service.UserService.class)
623 protected com.liferay.portal.service.UserService userService;
624 @BeanReference(type = UserPersistence.class)
625 protected UserPersistence userPersistence;
626 @BeanReference(type = UserFinder.class)
627 protected UserFinder userFinder;
628 @BeanReference(type = com.liferay.portal.service.WorkflowInstanceLinkLocalService.class)
629 protected com.liferay.portal.service.WorkflowInstanceLinkLocalService workflowInstanceLinkLocalService;
630 @BeanReference(type = WorkflowInstanceLinkPersistence.class)
631 protected WorkflowInstanceLinkPersistence workflowInstanceLinkPersistence;
632 @BeanReference(type = com.liferay.portlet.asset.service.AssetEntryLocalService.class)
633 protected com.liferay.portlet.asset.service.AssetEntryLocalService assetEntryLocalService;
634 @BeanReference(type = com.liferay.portlet.asset.service.AssetEntryService.class)
635 protected com.liferay.portlet.asset.service.AssetEntryService assetEntryService;
636 @BeanReference(type = AssetEntryPersistence.class)
637 protected AssetEntryPersistence assetEntryPersistence;
638 @BeanReference(type = AssetEntryFinder.class)
639 protected AssetEntryFinder assetEntryFinder;
640 @BeanReference(type = com.liferay.portlet.dynamicdatamapping.service.DDMStructureLocalService.class)
641 protected com.liferay.portlet.dynamicdatamapping.service.DDMStructureLocalService ddmStructureLocalService;
642 @BeanReference(type = com.liferay.portlet.dynamicdatamapping.service.DDMStructureService.class)
643 protected com.liferay.portlet.dynamicdatamapping.service.DDMStructureService ddmStructureService;
644 @BeanReference(type = DDMStructurePersistence.class)
645 protected DDMStructurePersistence ddmStructurePersistence;
646 @BeanReference(type = DDMStructureFinder.class)
647 protected DDMStructureFinder ddmStructureFinder;
648 @BeanReference(type = com.liferay.portlet.dynamicdatalists.service.DDLRecordSetLocalService.class)
649 protected com.liferay.portlet.dynamicdatalists.service.DDLRecordSetLocalService ddlRecordSetLocalService;
650 @BeanReference(type = com.liferay.portlet.dynamicdatalists.service.DDLRecordSetService.class)
651 protected com.liferay.portlet.dynamicdatalists.service.DDLRecordSetService ddlRecordSetService;
652 @BeanReference(type = DDLRecordSetPersistence.class)
653 protected DDLRecordSetPersistence ddlRecordSetPersistence;
654 @BeanReference(type = DDLRecordSetFinder.class)
655 protected DDLRecordSetFinder ddlRecordSetFinder;
656 @BeanReference(type = com.liferay.portlet.dynamicdatalists.service.DDLRecordVersionLocalService.class)
657 protected com.liferay.portlet.dynamicdatalists.service.DDLRecordVersionLocalService ddlRecordVersionLocalService;
658 @BeanReference(type = com.liferay.portlet.dynamicdatalists.service.DDLRecordVersionService.class)
659 protected com.liferay.portlet.dynamicdatalists.service.DDLRecordVersionService ddlRecordVersionService;
660 @BeanReference(type = DDLRecordVersionPersistence.class)
661 protected DDLRecordVersionPersistence ddlRecordVersionPersistence;
662 private String _beanIdentifier;
663 }