001
014
015 package com.liferay.portlet.exportimport.service.base;
016
017 import aQute.bnd.annotation.ProviderType;
018
019 import com.liferay.portal.kernel.bean.BeanReference;
020 import com.liferay.portal.kernel.bean.IdentifiableBean;
021 import com.liferay.portal.kernel.dao.db.DB;
022 import com.liferay.portal.kernel.dao.db.DBFactoryUtil;
023 import com.liferay.portal.kernel.dao.jdbc.SqlUpdate;
024 import com.liferay.portal.kernel.dao.jdbc.SqlUpdateFactoryUtil;
025 import com.liferay.portal.kernel.dao.orm.ActionableDynamicQuery;
026 import com.liferay.portal.kernel.dao.orm.DefaultActionableDynamicQuery;
027 import com.liferay.portal.kernel.dao.orm.DynamicQuery;
028 import com.liferay.portal.kernel.dao.orm.DynamicQueryFactoryUtil;
029 import com.liferay.portal.kernel.dao.orm.Projection;
030 import com.liferay.portal.kernel.exception.PortalException;
031 import com.liferay.portal.kernel.exception.SystemException;
032 import com.liferay.portal.kernel.search.Indexable;
033 import com.liferay.portal.kernel.search.IndexableType;
034 import com.liferay.portal.kernel.util.OrderByComparator;
035 import com.liferay.portal.model.PersistedModel;
036 import com.liferay.portal.service.BaseLocalServiceImpl;
037 import com.liferay.portal.service.PersistedModelLocalServiceRegistry;
038 import com.liferay.portal.service.persistence.ClassNamePersistence;
039 import com.liferay.portal.service.persistence.UserFinder;
040 import com.liferay.portal.service.persistence.UserPersistence;
041 import com.liferay.portal.util.PortalUtil;
042
043 import com.liferay.portlet.exportimport.model.ExportImportConfiguration;
044 import com.liferay.portlet.exportimport.service.ExportImportConfigurationLocalService;
045 import com.liferay.portlet.exportimport.service.persistence.ExportImportConfigurationPersistence;
046 import com.liferay.portlet.trash.service.persistence.TrashEntryPersistence;
047
048 import java.io.Serializable;
049
050 import java.util.List;
051
052 import javax.sql.DataSource;
053
054
066 @ProviderType
067 public abstract class ExportImportConfigurationLocalServiceBaseImpl
068 extends BaseLocalServiceImpl
069 implements ExportImportConfigurationLocalService, IdentifiableBean {
070
075
076
082 @Indexable(type = IndexableType.REINDEX)
083 @Override
084 public ExportImportConfiguration addExportImportConfiguration(
085 ExportImportConfiguration exportImportConfiguration) {
086 exportImportConfiguration.setNew(true);
087
088 return exportImportConfigurationPersistence.update(exportImportConfiguration);
089 }
090
091
097 @Override
098 public ExportImportConfiguration createExportImportConfiguration(
099 long exportImportConfigurationId) {
100 return exportImportConfigurationPersistence.create(exportImportConfigurationId);
101 }
102
103
110 @Indexable(type = IndexableType.DELETE)
111 @Override
112 public ExportImportConfiguration deleteExportImportConfiguration(
113 long exportImportConfigurationId) throws PortalException {
114 return exportImportConfigurationPersistence.remove(exportImportConfigurationId);
115 }
116
117
124 @Indexable(type = IndexableType.DELETE)
125 @Override
126 public ExportImportConfiguration deleteExportImportConfiguration(
127 ExportImportConfiguration exportImportConfiguration)
128 throws PortalException {
129 return exportImportConfigurationPersistence.remove(exportImportConfiguration);
130 }
131
132 @Override
133 public DynamicQuery dynamicQuery() {
134 Class<?> clazz = getClass();
135
136 return DynamicQueryFactoryUtil.forClass(ExportImportConfiguration.class,
137 clazz.getClassLoader());
138 }
139
140
146 @Override
147 public <T> List<T> dynamicQuery(DynamicQuery dynamicQuery) {
148 return exportImportConfigurationPersistence.findWithDynamicQuery(dynamicQuery);
149 }
150
151
163 @Override
164 public <T> List<T> dynamicQuery(DynamicQuery dynamicQuery, int start,
165 int end) {
166 return exportImportConfigurationPersistence.findWithDynamicQuery(dynamicQuery,
167 start, end);
168 }
169
170
183 @Override
184 public <T> List<T> dynamicQuery(DynamicQuery dynamicQuery, int start,
185 int end, OrderByComparator<T> orderByComparator) {
186 return exportImportConfigurationPersistence.findWithDynamicQuery(dynamicQuery,
187 start, end, orderByComparator);
188 }
189
190
196 @Override
197 public long dynamicQueryCount(DynamicQuery dynamicQuery) {
198 return exportImportConfigurationPersistence.countWithDynamicQuery(dynamicQuery);
199 }
200
201
208 @Override
209 public long dynamicQueryCount(DynamicQuery dynamicQuery,
210 Projection projection) {
211 return exportImportConfigurationPersistence.countWithDynamicQuery(dynamicQuery,
212 projection);
213 }
214
215 @Override
216 public ExportImportConfiguration fetchExportImportConfiguration(
217 long exportImportConfigurationId) {
218 return exportImportConfigurationPersistence.fetchByPrimaryKey(exportImportConfigurationId);
219 }
220
221
228 @Override
229 public ExportImportConfiguration getExportImportConfiguration(
230 long exportImportConfigurationId) throws PortalException {
231 return exportImportConfigurationPersistence.findByPrimaryKey(exportImportConfigurationId);
232 }
233
234 @Override
235 public ActionableDynamicQuery getActionableDynamicQuery() {
236 ActionableDynamicQuery actionableDynamicQuery = new DefaultActionableDynamicQuery();
237
238 actionableDynamicQuery.setBaseLocalService(com.liferay.portlet.exportimport.service.ExportImportConfigurationLocalServiceUtil.getService());
239 actionableDynamicQuery.setClass(ExportImportConfiguration.class);
240 actionableDynamicQuery.setClassLoader(getClassLoader());
241
242 actionableDynamicQuery.setPrimaryKeyPropertyName(
243 "exportImportConfigurationId");
244
245 return actionableDynamicQuery;
246 }
247
248 protected void initActionableDynamicQuery(
249 ActionableDynamicQuery actionableDynamicQuery) {
250 actionableDynamicQuery.setBaseLocalService(com.liferay.portlet.exportimport.service.ExportImportConfigurationLocalServiceUtil.getService());
251 actionableDynamicQuery.setClass(ExportImportConfiguration.class);
252 actionableDynamicQuery.setClassLoader(getClassLoader());
253
254 actionableDynamicQuery.setPrimaryKeyPropertyName(
255 "exportImportConfigurationId");
256 }
257
258
261 @Override
262 public PersistedModel deletePersistedModel(PersistedModel persistedModel)
263 throws PortalException {
264 return exportImportConfigurationLocalService.deleteExportImportConfiguration((ExportImportConfiguration)persistedModel);
265 }
266
267 @Override
268 public PersistedModel getPersistedModel(Serializable primaryKeyObj)
269 throws PortalException {
270 return exportImportConfigurationPersistence.findByPrimaryKey(primaryKeyObj);
271 }
272
273
284 @Override
285 public List<ExportImportConfiguration> getExportImportConfigurations(
286 int start, int end) {
287 return exportImportConfigurationPersistence.findAll(start, end);
288 }
289
290
295 @Override
296 public int getExportImportConfigurationsCount() {
297 return exportImportConfigurationPersistence.countAll();
298 }
299
300
306 @Indexable(type = IndexableType.REINDEX)
307 @Override
308 public ExportImportConfiguration updateExportImportConfiguration(
309 ExportImportConfiguration exportImportConfiguration) {
310 return exportImportConfigurationPersistence.update(exportImportConfiguration);
311 }
312
313
318 public com.liferay.portlet.exportimport.service.ExportImportLocalService getExportImportLocalService() {
319 return exportImportLocalService;
320 }
321
322
327 public void setExportImportLocalService(
328 com.liferay.portlet.exportimport.service.ExportImportLocalService exportImportLocalService) {
329 this.exportImportLocalService = exportImportLocalService;
330 }
331
332
337 public com.liferay.portlet.exportimport.service.ExportImportService getExportImportService() {
338 return exportImportService;
339 }
340
341
346 public void setExportImportService(
347 com.liferay.portlet.exportimport.service.ExportImportService exportImportService) {
348 this.exportImportService = exportImportService;
349 }
350
351
356 public ExportImportConfigurationLocalService getExportImportConfigurationLocalService() {
357 return exportImportConfigurationLocalService;
358 }
359
360
365 public void setExportImportConfigurationLocalService(
366 ExportImportConfigurationLocalService exportImportConfigurationLocalService) {
367 this.exportImportConfigurationLocalService = exportImportConfigurationLocalService;
368 }
369
370
375 public com.liferay.portlet.exportimport.service.ExportImportConfigurationService getExportImportConfigurationService() {
376 return exportImportConfigurationService;
377 }
378
379
384 public void setExportImportConfigurationService(
385 com.liferay.portlet.exportimport.service.ExportImportConfigurationService exportImportConfigurationService) {
386 this.exportImportConfigurationService = exportImportConfigurationService;
387 }
388
389
394 public ExportImportConfigurationPersistence getExportImportConfigurationPersistence() {
395 return exportImportConfigurationPersistence;
396 }
397
398
403 public void setExportImportConfigurationPersistence(
404 ExportImportConfigurationPersistence exportImportConfigurationPersistence) {
405 this.exportImportConfigurationPersistence = exportImportConfigurationPersistence;
406 }
407
408
413 public com.liferay.portlet.exportimport.service.StagingLocalService getStagingLocalService() {
414 return stagingLocalService;
415 }
416
417
422 public void setStagingLocalService(
423 com.liferay.portlet.exportimport.service.StagingLocalService stagingLocalService) {
424 this.stagingLocalService = stagingLocalService;
425 }
426
427
432 public com.liferay.portlet.exportimport.service.StagingService getStagingService() {
433 return stagingService;
434 }
435
436
441 public void setStagingService(
442 com.liferay.portlet.exportimport.service.StagingService stagingService) {
443 this.stagingService = stagingService;
444 }
445
446
451 public com.liferay.counter.service.CounterLocalService getCounterLocalService() {
452 return counterLocalService;
453 }
454
455
460 public void setCounterLocalService(
461 com.liferay.counter.service.CounterLocalService counterLocalService) {
462 this.counterLocalService = counterLocalService;
463 }
464
465
470 public com.liferay.portal.service.ClassNameLocalService getClassNameLocalService() {
471 return classNameLocalService;
472 }
473
474
479 public void setClassNameLocalService(
480 com.liferay.portal.service.ClassNameLocalService classNameLocalService) {
481 this.classNameLocalService = classNameLocalService;
482 }
483
484
489 public com.liferay.portal.service.ClassNameService getClassNameService() {
490 return classNameService;
491 }
492
493
498 public void setClassNameService(
499 com.liferay.portal.service.ClassNameService classNameService) {
500 this.classNameService = classNameService;
501 }
502
503
508 public ClassNamePersistence getClassNamePersistence() {
509 return classNamePersistence;
510 }
511
512
517 public void setClassNamePersistence(
518 ClassNamePersistence classNamePersistence) {
519 this.classNamePersistence = classNamePersistence;
520 }
521
522
527 public com.liferay.portal.service.ResourceLocalService getResourceLocalService() {
528 return resourceLocalService;
529 }
530
531
536 public void setResourceLocalService(
537 com.liferay.portal.service.ResourceLocalService resourceLocalService) {
538 this.resourceLocalService = resourceLocalService;
539 }
540
541
546 public com.liferay.portal.service.UserLocalService getUserLocalService() {
547 return userLocalService;
548 }
549
550
555 public void setUserLocalService(
556 com.liferay.portal.service.UserLocalService userLocalService) {
557 this.userLocalService = userLocalService;
558 }
559
560
565 public com.liferay.portal.service.UserService getUserService() {
566 return userService;
567 }
568
569
574 public void setUserService(
575 com.liferay.portal.service.UserService userService) {
576 this.userService = userService;
577 }
578
579
584 public UserPersistence getUserPersistence() {
585 return userPersistence;
586 }
587
588
593 public void setUserPersistence(UserPersistence userPersistence) {
594 this.userPersistence = userPersistence;
595 }
596
597
602 public UserFinder getUserFinder() {
603 return userFinder;
604 }
605
606
611 public void setUserFinder(UserFinder userFinder) {
612 this.userFinder = userFinder;
613 }
614
615
620 public com.liferay.portlet.trash.service.TrashEntryLocalService getTrashEntryLocalService() {
621 return trashEntryLocalService;
622 }
623
624
629 public void setTrashEntryLocalService(
630 com.liferay.portlet.trash.service.TrashEntryLocalService trashEntryLocalService) {
631 this.trashEntryLocalService = trashEntryLocalService;
632 }
633
634
639 public com.liferay.portlet.trash.service.TrashEntryService getTrashEntryService() {
640 return trashEntryService;
641 }
642
643
648 public void setTrashEntryService(
649 com.liferay.portlet.trash.service.TrashEntryService trashEntryService) {
650 this.trashEntryService = trashEntryService;
651 }
652
653
658 public TrashEntryPersistence getTrashEntryPersistence() {
659 return trashEntryPersistence;
660 }
661
662
667 public void setTrashEntryPersistence(
668 TrashEntryPersistence trashEntryPersistence) {
669 this.trashEntryPersistence = trashEntryPersistence;
670 }
671
672 public void afterPropertiesSet() {
673 persistedModelLocalServiceRegistry.register("com.liferay.portlet.exportimport.model.ExportImportConfiguration",
674 exportImportConfigurationLocalService);
675 }
676
677 public void destroy() {
678 persistedModelLocalServiceRegistry.unregister(
679 "com.liferay.portlet.exportimport.model.ExportImportConfiguration");
680 }
681
682
687 @Override
688 public String getBeanIdentifier() {
689 return _beanIdentifier;
690 }
691
692
697 @Override
698 public void setBeanIdentifier(String beanIdentifier) {
699 _beanIdentifier = beanIdentifier;
700 }
701
702 protected Class<?> getModelClass() {
703 return ExportImportConfiguration.class;
704 }
705
706 protected String getModelClassName() {
707 return ExportImportConfiguration.class.getName();
708 }
709
710
715 protected void runSQL(String sql) {
716 try {
717 DataSource dataSource = exportImportConfigurationPersistence.getDataSource();
718
719 DB db = DBFactoryUtil.getDB();
720
721 sql = db.buildSQL(sql);
722 sql = PortalUtil.transformSQL(sql);
723
724 SqlUpdate sqlUpdate = SqlUpdateFactoryUtil.getSqlUpdate(dataSource,
725 sql, new int[0]);
726
727 sqlUpdate.update();
728 }
729 catch (Exception e) {
730 throw new SystemException(e);
731 }
732 }
733
734 @BeanReference(type = com.liferay.portlet.exportimport.service.ExportImportLocalService.class)
735 protected com.liferay.portlet.exportimport.service.ExportImportLocalService exportImportLocalService;
736 @BeanReference(type = com.liferay.portlet.exportimport.service.ExportImportService.class)
737 protected com.liferay.portlet.exportimport.service.ExportImportService exportImportService;
738 @BeanReference(type = com.liferay.portlet.exportimport.service.ExportImportConfigurationLocalService.class)
739 protected ExportImportConfigurationLocalService exportImportConfigurationLocalService;
740 @BeanReference(type = com.liferay.portlet.exportimport.service.ExportImportConfigurationService.class)
741 protected com.liferay.portlet.exportimport.service.ExportImportConfigurationService exportImportConfigurationService;
742 @BeanReference(type = ExportImportConfigurationPersistence.class)
743 protected ExportImportConfigurationPersistence exportImportConfigurationPersistence;
744 @BeanReference(type = com.liferay.portlet.exportimport.service.StagingLocalService.class)
745 protected com.liferay.portlet.exportimport.service.StagingLocalService stagingLocalService;
746 @BeanReference(type = com.liferay.portlet.exportimport.service.StagingService.class)
747 protected com.liferay.portlet.exportimport.service.StagingService stagingService;
748 @BeanReference(type = com.liferay.counter.service.CounterLocalService.class)
749 protected com.liferay.counter.service.CounterLocalService counterLocalService;
750 @BeanReference(type = com.liferay.portal.service.ClassNameLocalService.class)
751 protected com.liferay.portal.service.ClassNameLocalService classNameLocalService;
752 @BeanReference(type = com.liferay.portal.service.ClassNameService.class)
753 protected com.liferay.portal.service.ClassNameService classNameService;
754 @BeanReference(type = ClassNamePersistence.class)
755 protected ClassNamePersistence classNamePersistence;
756 @BeanReference(type = com.liferay.portal.service.ResourceLocalService.class)
757 protected com.liferay.portal.service.ResourceLocalService resourceLocalService;
758 @BeanReference(type = com.liferay.portal.service.UserLocalService.class)
759 protected com.liferay.portal.service.UserLocalService userLocalService;
760 @BeanReference(type = com.liferay.portal.service.UserService.class)
761 protected com.liferay.portal.service.UserService userService;
762 @BeanReference(type = UserPersistence.class)
763 protected UserPersistence userPersistence;
764 @BeanReference(type = UserFinder.class)
765 protected UserFinder userFinder;
766 @BeanReference(type = com.liferay.portlet.trash.service.TrashEntryLocalService.class)
767 protected com.liferay.portlet.trash.service.TrashEntryLocalService trashEntryLocalService;
768 @BeanReference(type = com.liferay.portlet.trash.service.TrashEntryService.class)
769 protected com.liferay.portlet.trash.service.TrashEntryService trashEntryService;
770 @BeanReference(type = TrashEntryPersistence.class)
771 protected TrashEntryPersistence trashEntryPersistence;
772 @BeanReference(type = PersistedModelLocalServiceRegistry.class)
773 protected PersistedModelLocalServiceRegistry persistedModelLocalServiceRegistry;
774 private String _beanIdentifier;
775 }