001
014
015 package com.liferay.portal.service.base;
016
017 import aQute.bnd.annotation.ProviderType;
018
019 import com.liferay.portal.kernel.bean.BeanReference;
020 import com.liferay.portal.kernel.dao.db.DB;
021 import com.liferay.portal.kernel.dao.db.DBManagerUtil;
022 import com.liferay.portal.kernel.dao.jdbc.SqlUpdate;
023 import com.liferay.portal.kernel.dao.jdbc.SqlUpdateFactoryUtil;
024 import com.liferay.portal.kernel.dao.orm.ActionableDynamicQuery;
025 import com.liferay.portal.kernel.dao.orm.DefaultActionableDynamicQuery;
026 import com.liferay.portal.kernel.dao.orm.DynamicQuery;
027 import com.liferay.portal.kernel.dao.orm.DynamicQueryFactoryUtil;
028 import com.liferay.portal.kernel.dao.orm.IndexableActionableDynamicQuery;
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.module.framework.service.IdentifiableOSGiService;
033 import com.liferay.portal.kernel.search.Indexable;
034 import com.liferay.portal.kernel.search.IndexableType;
035 import com.liferay.portal.kernel.util.OrderByComparator;
036 import com.liferay.portal.model.LayoutSetBranch;
037 import com.liferay.portal.model.PersistedModel;
038 import com.liferay.portal.service.BaseLocalServiceImpl;
039 import com.liferay.portal.service.LayoutSetBranchLocalService;
040 import com.liferay.portal.service.PersistedModelLocalServiceRegistry;
041 import com.liferay.portal.service.persistence.ImagePersistence;
042 import com.liferay.portal.service.persistence.LayoutBranchPersistence;
043 import com.liferay.portal.service.persistence.LayoutFinder;
044 import com.liferay.portal.service.persistence.LayoutPersistence;
045 import com.liferay.portal.service.persistence.LayoutRevisionPersistence;
046 import com.liferay.portal.service.persistence.LayoutSetBranchPersistence;
047 import com.liferay.portal.service.persistence.LayoutSetPersistence;
048 import com.liferay.portal.service.persistence.RecentLayoutSetBranchPersistence;
049 import com.liferay.portal.service.persistence.UserFinder;
050 import com.liferay.portal.service.persistence.UserPersistence;
051 import com.liferay.portal.util.PortalUtil;
052
053 import java.io.Serializable;
054
055 import java.util.List;
056
057 import javax.sql.DataSource;
058
059
071 @ProviderType
072 public abstract class LayoutSetBranchLocalServiceBaseImpl
073 extends BaseLocalServiceImpl implements LayoutSetBranchLocalService,
074 IdentifiableOSGiService {
075
080
081
087 @Indexable(type = IndexableType.REINDEX)
088 @Override
089 public LayoutSetBranch addLayoutSetBranch(LayoutSetBranch layoutSetBranch) {
090 layoutSetBranch.setNew(true);
091
092 return layoutSetBranchPersistence.update(layoutSetBranch);
093 }
094
095
101 @Override
102 public LayoutSetBranch createLayoutSetBranch(long layoutSetBranchId) {
103 return layoutSetBranchPersistence.create(layoutSetBranchId);
104 }
105
106
113 @Indexable(type = IndexableType.DELETE)
114 @Override
115 public LayoutSetBranch deleteLayoutSetBranch(long layoutSetBranchId)
116 throws PortalException {
117 return layoutSetBranchPersistence.remove(layoutSetBranchId);
118 }
119
120
127 @Indexable(type = IndexableType.DELETE)
128 @Override
129 public LayoutSetBranch deleteLayoutSetBranch(
130 LayoutSetBranch layoutSetBranch) throws PortalException {
131 return layoutSetBranchPersistence.remove(layoutSetBranch);
132 }
133
134 @Override
135 public DynamicQuery dynamicQuery() {
136 Class<?> clazz = getClass();
137
138 return DynamicQueryFactoryUtil.forClass(LayoutSetBranch.class,
139 clazz.getClassLoader());
140 }
141
142
148 @Override
149 public <T> List<T> dynamicQuery(DynamicQuery dynamicQuery) {
150 return layoutSetBranchPersistence.findWithDynamicQuery(dynamicQuery);
151 }
152
153
165 @Override
166 public <T> List<T> dynamicQuery(DynamicQuery dynamicQuery, int start,
167 int end) {
168 return layoutSetBranchPersistence.findWithDynamicQuery(dynamicQuery,
169 start, end);
170 }
171
172
185 @Override
186 public <T> List<T> dynamicQuery(DynamicQuery dynamicQuery, int start,
187 int end, OrderByComparator<T> orderByComparator) {
188 return layoutSetBranchPersistence.findWithDynamicQuery(dynamicQuery,
189 start, end, orderByComparator);
190 }
191
192
198 @Override
199 public long dynamicQueryCount(DynamicQuery dynamicQuery) {
200 return layoutSetBranchPersistence.countWithDynamicQuery(dynamicQuery);
201 }
202
203
210 @Override
211 public long dynamicQueryCount(DynamicQuery dynamicQuery,
212 Projection projection) {
213 return layoutSetBranchPersistence.countWithDynamicQuery(dynamicQuery,
214 projection);
215 }
216
217 @Override
218 public LayoutSetBranch fetchLayoutSetBranch(long layoutSetBranchId) {
219 return layoutSetBranchPersistence.fetchByPrimaryKey(layoutSetBranchId);
220 }
221
222
229 @Override
230 public LayoutSetBranch getLayoutSetBranch(long layoutSetBranchId)
231 throws PortalException {
232 return layoutSetBranchPersistence.findByPrimaryKey(layoutSetBranchId);
233 }
234
235 @Override
236 public ActionableDynamicQuery getActionableDynamicQuery() {
237 ActionableDynamicQuery actionableDynamicQuery = new DefaultActionableDynamicQuery();
238
239 actionableDynamicQuery.setBaseLocalService(com.liferay.portal.service.LayoutSetBranchLocalServiceUtil.getService());
240 actionableDynamicQuery.setClassLoader(getClassLoader());
241 actionableDynamicQuery.setModelClass(LayoutSetBranch.class);
242
243 actionableDynamicQuery.setPrimaryKeyPropertyName("layoutSetBranchId");
244
245 return actionableDynamicQuery;
246 }
247
248 @Override
249 public IndexableActionableDynamicQuery getIndexableActionableDynamicQuery() {
250 IndexableActionableDynamicQuery indexableActionableDynamicQuery = new IndexableActionableDynamicQuery();
251
252 indexableActionableDynamicQuery.setBaseLocalService(com.liferay.portal.service.LayoutSetBranchLocalServiceUtil.getService());
253 indexableActionableDynamicQuery.setClassLoader(getClassLoader());
254 indexableActionableDynamicQuery.setModelClass(LayoutSetBranch.class);
255
256 indexableActionableDynamicQuery.setPrimaryKeyPropertyName(
257 "layoutSetBranchId");
258
259 return indexableActionableDynamicQuery;
260 }
261
262 protected void initActionableDynamicQuery(
263 ActionableDynamicQuery actionableDynamicQuery) {
264 actionableDynamicQuery.setBaseLocalService(com.liferay.portal.service.LayoutSetBranchLocalServiceUtil.getService());
265 actionableDynamicQuery.setClassLoader(getClassLoader());
266 actionableDynamicQuery.setModelClass(LayoutSetBranch.class);
267
268 actionableDynamicQuery.setPrimaryKeyPropertyName("layoutSetBranchId");
269 }
270
271
274 @Override
275 public PersistedModel deletePersistedModel(PersistedModel persistedModel)
276 throws PortalException {
277 return layoutSetBranchLocalService.deleteLayoutSetBranch((LayoutSetBranch)persistedModel);
278 }
279
280 @Override
281 public PersistedModel getPersistedModel(Serializable primaryKeyObj)
282 throws PortalException {
283 return layoutSetBranchPersistence.findByPrimaryKey(primaryKeyObj);
284 }
285
286
297 @Override
298 public List<LayoutSetBranch> getLayoutSetBranchs(int start, int end) {
299 return layoutSetBranchPersistence.findAll(start, end);
300 }
301
302
307 @Override
308 public int getLayoutSetBranchsCount() {
309 return layoutSetBranchPersistence.countAll();
310 }
311
312
318 @Indexable(type = IndexableType.REINDEX)
319 @Override
320 public LayoutSetBranch updateLayoutSetBranch(
321 LayoutSetBranch layoutSetBranch) {
322 return layoutSetBranchPersistence.update(layoutSetBranch);
323 }
324
325
330 public LayoutSetBranchLocalService getLayoutSetBranchLocalService() {
331 return layoutSetBranchLocalService;
332 }
333
334
339 public void setLayoutSetBranchLocalService(
340 LayoutSetBranchLocalService layoutSetBranchLocalService) {
341 this.layoutSetBranchLocalService = layoutSetBranchLocalService;
342 }
343
344
349 public LayoutSetBranchPersistence getLayoutSetBranchPersistence() {
350 return layoutSetBranchPersistence;
351 }
352
353
358 public void setLayoutSetBranchPersistence(
359 LayoutSetBranchPersistence layoutSetBranchPersistence) {
360 this.layoutSetBranchPersistence = layoutSetBranchPersistence;
361 }
362
363
368 public com.liferay.counter.service.CounterLocalService getCounterLocalService() {
369 return counterLocalService;
370 }
371
372
377 public void setCounterLocalService(
378 com.liferay.counter.service.CounterLocalService counterLocalService) {
379 this.counterLocalService = counterLocalService;
380 }
381
382
387 public com.liferay.portal.service.ImageLocalService getImageLocalService() {
388 return imageLocalService;
389 }
390
391
396 public void setImageLocalService(
397 com.liferay.portal.service.ImageLocalService imageLocalService) {
398 this.imageLocalService = imageLocalService;
399 }
400
401
406 public ImagePersistence getImagePersistence() {
407 return imagePersistence;
408 }
409
410
415 public void setImagePersistence(ImagePersistence imagePersistence) {
416 this.imagePersistence = imagePersistence;
417 }
418
419
424 public com.liferay.portal.service.LayoutLocalService getLayoutLocalService() {
425 return layoutLocalService;
426 }
427
428
433 public void setLayoutLocalService(
434 com.liferay.portal.service.LayoutLocalService layoutLocalService) {
435 this.layoutLocalService = layoutLocalService;
436 }
437
438
443 public LayoutPersistence getLayoutPersistence() {
444 return layoutPersistence;
445 }
446
447
452 public void setLayoutPersistence(LayoutPersistence layoutPersistence) {
453 this.layoutPersistence = layoutPersistence;
454 }
455
456
461 public LayoutFinder getLayoutFinder() {
462 return layoutFinder;
463 }
464
465
470 public void setLayoutFinder(LayoutFinder layoutFinder) {
471 this.layoutFinder = layoutFinder;
472 }
473
474
479 public com.liferay.portal.service.LayoutBranchLocalService getLayoutBranchLocalService() {
480 return layoutBranchLocalService;
481 }
482
483
488 public void setLayoutBranchLocalService(
489 com.liferay.portal.service.LayoutBranchLocalService layoutBranchLocalService) {
490 this.layoutBranchLocalService = layoutBranchLocalService;
491 }
492
493
498 public LayoutBranchPersistence getLayoutBranchPersistence() {
499 return layoutBranchPersistence;
500 }
501
502
507 public void setLayoutBranchPersistence(
508 LayoutBranchPersistence layoutBranchPersistence) {
509 this.layoutBranchPersistence = layoutBranchPersistence;
510 }
511
512
517 public com.liferay.portal.service.LayoutRevisionLocalService getLayoutRevisionLocalService() {
518 return layoutRevisionLocalService;
519 }
520
521
526 public void setLayoutRevisionLocalService(
527 com.liferay.portal.service.LayoutRevisionLocalService layoutRevisionLocalService) {
528 this.layoutRevisionLocalService = layoutRevisionLocalService;
529 }
530
531
536 public LayoutRevisionPersistence getLayoutRevisionPersistence() {
537 return layoutRevisionPersistence;
538 }
539
540
545 public void setLayoutRevisionPersistence(
546 LayoutRevisionPersistence layoutRevisionPersistence) {
547 this.layoutRevisionPersistence = layoutRevisionPersistence;
548 }
549
550
555 public com.liferay.portal.service.LayoutSetLocalService getLayoutSetLocalService() {
556 return layoutSetLocalService;
557 }
558
559
564 public void setLayoutSetLocalService(
565 com.liferay.portal.service.LayoutSetLocalService layoutSetLocalService) {
566 this.layoutSetLocalService = layoutSetLocalService;
567 }
568
569
574 public LayoutSetPersistence getLayoutSetPersistence() {
575 return layoutSetPersistence;
576 }
577
578
583 public void setLayoutSetPersistence(
584 LayoutSetPersistence layoutSetPersistence) {
585 this.layoutSetPersistence = layoutSetPersistence;
586 }
587
588
593 public com.liferay.portal.service.RecentLayoutSetBranchLocalService getRecentLayoutSetBranchLocalService() {
594 return recentLayoutSetBranchLocalService;
595 }
596
597
602 public void setRecentLayoutSetBranchLocalService(
603 com.liferay.portal.service.RecentLayoutSetBranchLocalService recentLayoutSetBranchLocalService) {
604 this.recentLayoutSetBranchLocalService = recentLayoutSetBranchLocalService;
605 }
606
607
612 public RecentLayoutSetBranchPersistence getRecentLayoutSetBranchPersistence() {
613 return recentLayoutSetBranchPersistence;
614 }
615
616
621 public void setRecentLayoutSetBranchPersistence(
622 RecentLayoutSetBranchPersistence recentLayoutSetBranchPersistence) {
623 this.recentLayoutSetBranchPersistence = recentLayoutSetBranchPersistence;
624 }
625
626
631 public com.liferay.portal.service.ResourceLocalService getResourceLocalService() {
632 return resourceLocalService;
633 }
634
635
640 public void setResourceLocalService(
641 com.liferay.portal.service.ResourceLocalService resourceLocalService) {
642 this.resourceLocalService = resourceLocalService;
643 }
644
645
650 public com.liferay.portal.service.UserLocalService getUserLocalService() {
651 return userLocalService;
652 }
653
654
659 public void setUserLocalService(
660 com.liferay.portal.service.UserLocalService userLocalService) {
661 this.userLocalService = userLocalService;
662 }
663
664
669 public UserPersistence getUserPersistence() {
670 return userPersistence;
671 }
672
673
678 public void setUserPersistence(UserPersistence userPersistence) {
679 this.userPersistence = userPersistence;
680 }
681
682
687 public UserFinder getUserFinder() {
688 return userFinder;
689 }
690
691
696 public void setUserFinder(UserFinder userFinder) {
697 this.userFinder = userFinder;
698 }
699
700 public void afterPropertiesSet() {
701 persistedModelLocalServiceRegistry.register("com.liferay.portal.model.LayoutSetBranch",
702 layoutSetBranchLocalService);
703 }
704
705 public void destroy() {
706 persistedModelLocalServiceRegistry.unregister(
707 "com.liferay.portal.model.LayoutSetBranch");
708 }
709
710
715 @Override
716 public String getOSGiServiceIdentifier() {
717 return LayoutSetBranchLocalService.class.getName();
718 }
719
720 protected Class<?> getModelClass() {
721 return LayoutSetBranch.class;
722 }
723
724 protected String getModelClassName() {
725 return LayoutSetBranch.class.getName();
726 }
727
728
733 protected void runSQL(String sql) {
734 try {
735 DataSource dataSource = layoutSetBranchPersistence.getDataSource();
736
737 DB db = DBManagerUtil.getDB();
738
739 sql = db.buildSQL(sql);
740 sql = PortalUtil.transformSQL(sql);
741
742 SqlUpdate sqlUpdate = SqlUpdateFactoryUtil.getSqlUpdate(dataSource,
743 sql, new int[0]);
744
745 sqlUpdate.update();
746 }
747 catch (Exception e) {
748 throw new SystemException(e);
749 }
750 }
751
752 @BeanReference(type = com.liferay.portal.service.LayoutSetBranchLocalService.class)
753 protected LayoutSetBranchLocalService layoutSetBranchLocalService;
754 @BeanReference(type = LayoutSetBranchPersistence.class)
755 protected LayoutSetBranchPersistence layoutSetBranchPersistence;
756 @BeanReference(type = com.liferay.counter.service.CounterLocalService.class)
757 protected com.liferay.counter.service.CounterLocalService counterLocalService;
758 @BeanReference(type = com.liferay.portal.service.ImageLocalService.class)
759 protected com.liferay.portal.service.ImageLocalService imageLocalService;
760 @BeanReference(type = ImagePersistence.class)
761 protected ImagePersistence imagePersistence;
762 @BeanReference(type = com.liferay.portal.service.LayoutLocalService.class)
763 protected com.liferay.portal.service.LayoutLocalService layoutLocalService;
764 @BeanReference(type = LayoutPersistence.class)
765 protected LayoutPersistence layoutPersistence;
766 @BeanReference(type = LayoutFinder.class)
767 protected LayoutFinder layoutFinder;
768 @BeanReference(type = com.liferay.portal.service.LayoutBranchLocalService.class)
769 protected com.liferay.portal.service.LayoutBranchLocalService layoutBranchLocalService;
770 @BeanReference(type = LayoutBranchPersistence.class)
771 protected LayoutBranchPersistence layoutBranchPersistence;
772 @BeanReference(type = com.liferay.portal.service.LayoutRevisionLocalService.class)
773 protected com.liferay.portal.service.LayoutRevisionLocalService layoutRevisionLocalService;
774 @BeanReference(type = LayoutRevisionPersistence.class)
775 protected LayoutRevisionPersistence layoutRevisionPersistence;
776 @BeanReference(type = com.liferay.portal.service.LayoutSetLocalService.class)
777 protected com.liferay.portal.service.LayoutSetLocalService layoutSetLocalService;
778 @BeanReference(type = LayoutSetPersistence.class)
779 protected LayoutSetPersistence layoutSetPersistence;
780 @BeanReference(type = com.liferay.portal.service.RecentLayoutSetBranchLocalService.class)
781 protected com.liferay.portal.service.RecentLayoutSetBranchLocalService recentLayoutSetBranchLocalService;
782 @BeanReference(type = RecentLayoutSetBranchPersistence.class)
783 protected RecentLayoutSetBranchPersistence recentLayoutSetBranchPersistence;
784 @BeanReference(type = com.liferay.portal.service.ResourceLocalService.class)
785 protected com.liferay.portal.service.ResourceLocalService resourceLocalService;
786 @BeanReference(type = com.liferay.portal.service.UserLocalService.class)
787 protected com.liferay.portal.service.UserLocalService userLocalService;
788 @BeanReference(type = UserPersistence.class)
789 protected UserPersistence userPersistence;
790 @BeanReference(type = UserFinder.class)
791 protected UserFinder userFinder;
792 @BeanReference(type = PersistedModelLocalServiceRegistry.class)
793 protected PersistedModelLocalServiceRegistry persistedModelLocalServiceRegistry;
794 }