001
014
015 package com.liferay.portlet.blogs.service.base;
016
017 import com.liferay.counter.service.CounterLocalService;
018
019 import com.liferay.portal.kernel.bean.BeanReference;
020 import com.liferay.portal.kernel.bean.IdentifiableBean;
021 import com.liferay.portal.kernel.dao.jdbc.SqlUpdate;
022 import com.liferay.portal.kernel.dao.jdbc.SqlUpdateFactoryUtil;
023 import com.liferay.portal.kernel.dao.orm.DynamicQuery;
024 import com.liferay.portal.kernel.dao.orm.DynamicQueryFactoryUtil;
025 import com.liferay.portal.kernel.exception.PortalException;
026 import com.liferay.portal.kernel.exception.SystemException;
027 import com.liferay.portal.kernel.search.Indexable;
028 import com.liferay.portal.kernel.search.IndexableType;
029 import com.liferay.portal.kernel.util.OrderByComparator;
030 import com.liferay.portal.model.PersistedModel;
031 import com.liferay.portal.service.BaseLocalServiceImpl;
032 import com.liferay.portal.service.GroupLocalService;
033 import com.liferay.portal.service.GroupService;
034 import com.liferay.portal.service.PersistedModelLocalServiceRegistry;
035 import com.liferay.portal.service.ResourceLocalService;
036 import com.liferay.portal.service.ResourceService;
037 import com.liferay.portal.service.UserLocalService;
038 import com.liferay.portal.service.UserService;
039 import com.liferay.portal.service.persistence.GroupFinder;
040 import com.liferay.portal.service.persistence.GroupPersistence;
041 import com.liferay.portal.service.persistence.ResourceFinder;
042 import com.liferay.portal.service.persistence.ResourcePersistence;
043 import com.liferay.portal.service.persistence.UserFinder;
044 import com.liferay.portal.service.persistence.UserPersistence;
045
046 import com.liferay.portlet.blogs.model.BlogsStatsUser;
047 import com.liferay.portlet.blogs.service.BlogsEntryLocalService;
048 import com.liferay.portlet.blogs.service.BlogsEntryService;
049 import com.liferay.portlet.blogs.service.BlogsStatsUserLocalService;
050 import com.liferay.portlet.blogs.service.persistence.BlogsEntryFinder;
051 import com.liferay.portlet.blogs.service.persistence.BlogsEntryPersistence;
052 import com.liferay.portlet.blogs.service.persistence.BlogsStatsUserFinder;
053 import com.liferay.portlet.blogs.service.persistence.BlogsStatsUserPersistence;
054
055 import java.io.Serializable;
056
057 import java.util.List;
058
059 import javax.sql.DataSource;
060
061
073 public abstract class BlogsStatsUserLocalServiceBaseImpl
074 extends BaseLocalServiceImpl implements BlogsStatsUserLocalService,
075 IdentifiableBean {
076
081
082
089 @Indexable(type = IndexableType.REINDEX)
090 public BlogsStatsUser addBlogsStatsUser(BlogsStatsUser blogsStatsUser)
091 throws SystemException {
092 blogsStatsUser.setNew(true);
093
094 return blogsStatsUserPersistence.update(blogsStatsUser, false);
095 }
096
097
103 public BlogsStatsUser createBlogsStatsUser(long statsUserId) {
104 return blogsStatsUserPersistence.create(statsUserId);
105 }
106
107
115 @Indexable(type = IndexableType.DELETE)
116 public BlogsStatsUser deleteBlogsStatsUser(long statsUserId)
117 throws PortalException, SystemException {
118 return blogsStatsUserPersistence.remove(statsUserId);
119 }
120
121
128 @Indexable(type = IndexableType.DELETE)
129 public BlogsStatsUser deleteBlogsStatsUser(BlogsStatsUser blogsStatsUser)
130 throws SystemException {
131 return blogsStatsUserPersistence.remove(blogsStatsUser);
132 }
133
134 public DynamicQuery dynamicQuery() {
135 Class<?> clazz = getClass();
136
137 return DynamicQueryFactoryUtil.forClass(BlogsStatsUser.class,
138 clazz.getClassLoader());
139 }
140
141
148 @SuppressWarnings("rawtypes")
149 public List dynamicQuery(DynamicQuery dynamicQuery)
150 throws SystemException {
151 return blogsStatsUserPersistence.findWithDynamicQuery(dynamicQuery);
152 }
153
154
167 @SuppressWarnings("rawtypes")
168 public List dynamicQuery(DynamicQuery dynamicQuery, int start, int end)
169 throws SystemException {
170 return blogsStatsUserPersistence.findWithDynamicQuery(dynamicQuery,
171 start, end);
172 }
173
174
188 @SuppressWarnings("rawtypes")
189 public List dynamicQuery(DynamicQuery dynamicQuery, int start, int end,
190 OrderByComparator orderByComparator) throws SystemException {
191 return blogsStatsUserPersistence.findWithDynamicQuery(dynamicQuery,
192 start, end, orderByComparator);
193 }
194
195
202 public long dynamicQueryCount(DynamicQuery dynamicQuery)
203 throws SystemException {
204 return blogsStatsUserPersistence.countWithDynamicQuery(dynamicQuery);
205 }
206
207 public BlogsStatsUser fetchBlogsStatsUser(long statsUserId)
208 throws SystemException {
209 return blogsStatsUserPersistence.fetchByPrimaryKey(statsUserId);
210 }
211
212
220 public BlogsStatsUser getBlogsStatsUser(long statsUserId)
221 throws PortalException, SystemException {
222 return blogsStatsUserPersistence.findByPrimaryKey(statsUserId);
223 }
224
225 public PersistedModel getPersistedModel(Serializable primaryKeyObj)
226 throws PortalException, SystemException {
227 return blogsStatsUserPersistence.findByPrimaryKey(primaryKeyObj);
228 }
229
230
242 public List<BlogsStatsUser> getBlogsStatsUsers(int start, int end)
243 throws SystemException {
244 return blogsStatsUserPersistence.findAll(start, end);
245 }
246
247
253 public int getBlogsStatsUsersCount() throws SystemException {
254 return blogsStatsUserPersistence.countAll();
255 }
256
257
264 @Indexable(type = IndexableType.REINDEX)
265 public BlogsStatsUser updateBlogsStatsUser(BlogsStatsUser blogsStatsUser)
266 throws SystemException {
267 return updateBlogsStatsUser(blogsStatsUser, true);
268 }
269
270
278 @Indexable(type = IndexableType.REINDEX)
279 public BlogsStatsUser updateBlogsStatsUser(BlogsStatsUser blogsStatsUser,
280 boolean merge) throws SystemException {
281 blogsStatsUser.setNew(false);
282
283 return blogsStatsUserPersistence.update(blogsStatsUser, merge);
284 }
285
286
291 public BlogsEntryLocalService getBlogsEntryLocalService() {
292 return blogsEntryLocalService;
293 }
294
295
300 public void setBlogsEntryLocalService(
301 BlogsEntryLocalService blogsEntryLocalService) {
302 this.blogsEntryLocalService = blogsEntryLocalService;
303 }
304
305
310 public BlogsEntryService getBlogsEntryService() {
311 return blogsEntryService;
312 }
313
314
319 public void setBlogsEntryService(BlogsEntryService blogsEntryService) {
320 this.blogsEntryService = blogsEntryService;
321 }
322
323
328 public BlogsEntryPersistence getBlogsEntryPersistence() {
329 return blogsEntryPersistence;
330 }
331
332
337 public void setBlogsEntryPersistence(
338 BlogsEntryPersistence blogsEntryPersistence) {
339 this.blogsEntryPersistence = blogsEntryPersistence;
340 }
341
342
347 public BlogsEntryFinder getBlogsEntryFinder() {
348 return blogsEntryFinder;
349 }
350
351
356 public void setBlogsEntryFinder(BlogsEntryFinder blogsEntryFinder) {
357 this.blogsEntryFinder = blogsEntryFinder;
358 }
359
360
365 public BlogsStatsUserLocalService getBlogsStatsUserLocalService() {
366 return blogsStatsUserLocalService;
367 }
368
369
374 public void setBlogsStatsUserLocalService(
375 BlogsStatsUserLocalService blogsStatsUserLocalService) {
376 this.blogsStatsUserLocalService = blogsStatsUserLocalService;
377 }
378
379
384 public BlogsStatsUserPersistence getBlogsStatsUserPersistence() {
385 return blogsStatsUserPersistence;
386 }
387
388
393 public void setBlogsStatsUserPersistence(
394 BlogsStatsUserPersistence blogsStatsUserPersistence) {
395 this.blogsStatsUserPersistence = blogsStatsUserPersistence;
396 }
397
398
403 public BlogsStatsUserFinder getBlogsStatsUserFinder() {
404 return blogsStatsUserFinder;
405 }
406
407
412 public void setBlogsStatsUserFinder(
413 BlogsStatsUserFinder blogsStatsUserFinder) {
414 this.blogsStatsUserFinder = blogsStatsUserFinder;
415 }
416
417
422 public CounterLocalService getCounterLocalService() {
423 return counterLocalService;
424 }
425
426
431 public void setCounterLocalService(CounterLocalService counterLocalService) {
432 this.counterLocalService = counterLocalService;
433 }
434
435
440 public GroupLocalService getGroupLocalService() {
441 return groupLocalService;
442 }
443
444
449 public void setGroupLocalService(GroupLocalService groupLocalService) {
450 this.groupLocalService = groupLocalService;
451 }
452
453
458 public GroupService getGroupService() {
459 return groupService;
460 }
461
462
467 public void setGroupService(GroupService groupService) {
468 this.groupService = groupService;
469 }
470
471
476 public GroupPersistence getGroupPersistence() {
477 return groupPersistence;
478 }
479
480
485 public void setGroupPersistence(GroupPersistence groupPersistence) {
486 this.groupPersistence = groupPersistence;
487 }
488
489
494 public GroupFinder getGroupFinder() {
495 return groupFinder;
496 }
497
498
503 public void setGroupFinder(GroupFinder groupFinder) {
504 this.groupFinder = groupFinder;
505 }
506
507
512 public ResourceLocalService getResourceLocalService() {
513 return resourceLocalService;
514 }
515
516
521 public void setResourceLocalService(
522 ResourceLocalService resourceLocalService) {
523 this.resourceLocalService = resourceLocalService;
524 }
525
526
531 public ResourceService getResourceService() {
532 return resourceService;
533 }
534
535
540 public void setResourceService(ResourceService resourceService) {
541 this.resourceService = resourceService;
542 }
543
544
549 public ResourcePersistence getResourcePersistence() {
550 return resourcePersistence;
551 }
552
553
558 public void setResourcePersistence(ResourcePersistence resourcePersistence) {
559 this.resourcePersistence = resourcePersistence;
560 }
561
562
567 public ResourceFinder getResourceFinder() {
568 return resourceFinder;
569 }
570
571
576 public void setResourceFinder(ResourceFinder resourceFinder) {
577 this.resourceFinder = resourceFinder;
578 }
579
580
585 public UserLocalService getUserLocalService() {
586 return userLocalService;
587 }
588
589
594 public void setUserLocalService(UserLocalService userLocalService) {
595 this.userLocalService = userLocalService;
596 }
597
598
603 public UserService getUserService() {
604 return userService;
605 }
606
607
612 public void setUserService(UserService userService) {
613 this.userService = userService;
614 }
615
616
621 public UserPersistence getUserPersistence() {
622 return userPersistence;
623 }
624
625
630 public void setUserPersistence(UserPersistence userPersistence) {
631 this.userPersistence = userPersistence;
632 }
633
634
639 public UserFinder getUserFinder() {
640 return userFinder;
641 }
642
643
648 public void setUserFinder(UserFinder userFinder) {
649 this.userFinder = userFinder;
650 }
651
652 public void afterPropertiesSet() {
653 persistedModelLocalServiceRegistry.register("com.liferay.portlet.blogs.model.BlogsStatsUser",
654 blogsStatsUserLocalService);
655 }
656
657 public void destroy() {
658 persistedModelLocalServiceRegistry.unregister(
659 "com.liferay.portlet.blogs.model.BlogsStatsUser");
660 }
661
662
667 public String getBeanIdentifier() {
668 return _beanIdentifier;
669 }
670
671
676 public void setBeanIdentifier(String beanIdentifier) {
677 _beanIdentifier = beanIdentifier;
678 }
679
680 protected Class<?> getModelClass() {
681 return BlogsStatsUser.class;
682 }
683
684 protected String getModelClassName() {
685 return BlogsStatsUser.class.getName();
686 }
687
688
693 protected void runSQL(String sql) throws SystemException {
694 try {
695 DataSource dataSource = blogsStatsUserPersistence.getDataSource();
696
697 SqlUpdate sqlUpdate = SqlUpdateFactoryUtil.getSqlUpdate(dataSource,
698 sql, new int[0]);
699
700 sqlUpdate.update();
701 }
702 catch (Exception e) {
703 throw new SystemException(e);
704 }
705 }
706
707 @BeanReference(type = BlogsEntryLocalService.class)
708 protected BlogsEntryLocalService blogsEntryLocalService;
709 @BeanReference(type = BlogsEntryService.class)
710 protected BlogsEntryService blogsEntryService;
711 @BeanReference(type = BlogsEntryPersistence.class)
712 protected BlogsEntryPersistence blogsEntryPersistence;
713 @BeanReference(type = BlogsEntryFinder.class)
714 protected BlogsEntryFinder blogsEntryFinder;
715 @BeanReference(type = BlogsStatsUserLocalService.class)
716 protected BlogsStatsUserLocalService blogsStatsUserLocalService;
717 @BeanReference(type = BlogsStatsUserPersistence.class)
718 protected BlogsStatsUserPersistence blogsStatsUserPersistence;
719 @BeanReference(type = BlogsStatsUserFinder.class)
720 protected BlogsStatsUserFinder blogsStatsUserFinder;
721 @BeanReference(type = CounterLocalService.class)
722 protected CounterLocalService counterLocalService;
723 @BeanReference(type = GroupLocalService.class)
724 protected GroupLocalService groupLocalService;
725 @BeanReference(type = GroupService.class)
726 protected GroupService groupService;
727 @BeanReference(type = GroupPersistence.class)
728 protected GroupPersistence groupPersistence;
729 @BeanReference(type = GroupFinder.class)
730 protected GroupFinder groupFinder;
731 @BeanReference(type = ResourceLocalService.class)
732 protected ResourceLocalService resourceLocalService;
733 @BeanReference(type = ResourceService.class)
734 protected ResourceService resourceService;
735 @BeanReference(type = ResourcePersistence.class)
736 protected ResourcePersistence resourcePersistence;
737 @BeanReference(type = ResourceFinder.class)
738 protected ResourceFinder resourceFinder;
739 @BeanReference(type = UserLocalService.class)
740 protected UserLocalService userLocalService;
741 @BeanReference(type = UserService.class)
742 protected UserService userService;
743 @BeanReference(type = UserPersistence.class)
744 protected UserPersistence userPersistence;
745 @BeanReference(type = UserFinder.class)
746 protected UserFinder userFinder;
747 @BeanReference(type = PersistedModelLocalServiceRegistry.class)
748 protected PersistedModelLocalServiceRegistry persistedModelLocalServiceRegistry;
749 private String _beanIdentifier;
750 }