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.annotation.BeanReference;
020 import com.liferay.portal.kernel.dao.jdbc.SqlUpdate;
021 import com.liferay.portal.kernel.dao.jdbc.SqlUpdateFactoryUtil;
022 import com.liferay.portal.kernel.dao.orm.DynamicQuery;
023 import com.liferay.portal.kernel.exception.PortalException;
024 import com.liferay.portal.kernel.exception.SystemException;
025 import com.liferay.portal.kernel.util.OrderByComparator;
026 import com.liferay.portal.service.GroupLocalService;
027 import com.liferay.portal.service.GroupService;
028 import com.liferay.portal.service.ResourceLocalService;
029 import com.liferay.portal.service.ResourceService;
030 import com.liferay.portal.service.UserLocalService;
031 import com.liferay.portal.service.UserService;
032 import com.liferay.portal.service.persistence.GroupFinder;
033 import com.liferay.portal.service.persistence.GroupPersistence;
034 import com.liferay.portal.service.persistence.ResourceFinder;
035 import com.liferay.portal.service.persistence.ResourcePersistence;
036 import com.liferay.portal.service.persistence.UserFinder;
037 import com.liferay.portal.service.persistence.UserPersistence;
038
039 import com.liferay.portlet.blogs.model.BlogsStatsUser;
040 import com.liferay.portlet.blogs.service.BlogsEntryLocalService;
041 import com.liferay.portlet.blogs.service.BlogsEntryService;
042 import com.liferay.portlet.blogs.service.BlogsStatsUserLocalService;
043 import com.liferay.portlet.blogs.service.persistence.BlogsEntryFinder;
044 import com.liferay.portlet.blogs.service.persistence.BlogsEntryPersistence;
045 import com.liferay.portlet.blogs.service.persistence.BlogsStatsUserFinder;
046 import com.liferay.portlet.blogs.service.persistence.BlogsStatsUserPersistence;
047
048 import java.util.List;
049
050 import javax.sql.DataSource;
051
052
068 public abstract class BlogsStatsUserLocalServiceBaseImpl
069 implements BlogsStatsUserLocalService {
070
077 public BlogsStatsUser addBlogsStatsUser(BlogsStatsUser blogsStatsUser)
078 throws SystemException {
079 blogsStatsUser.setNew(true);
080
081 return blogsStatsUserPersistence.update(blogsStatsUser, false);
082 }
083
084
090 public BlogsStatsUser createBlogsStatsUser(long statsUserId) {
091 return blogsStatsUserPersistence.create(statsUserId);
092 }
093
094
101 public void deleteBlogsStatsUser(long statsUserId)
102 throws PortalException, SystemException {
103 blogsStatsUserPersistence.remove(statsUserId);
104 }
105
106
112 public void deleteBlogsStatsUser(BlogsStatsUser blogsStatsUser)
113 throws SystemException {
114 blogsStatsUserPersistence.remove(blogsStatsUser);
115 }
116
117
124 @SuppressWarnings("rawtypes")
125 public List dynamicQuery(DynamicQuery dynamicQuery)
126 throws SystemException {
127 return blogsStatsUserPersistence.findWithDynamicQuery(dynamicQuery);
128 }
129
130
143 @SuppressWarnings("rawtypes")
144 public List dynamicQuery(DynamicQuery dynamicQuery, int start, int end)
145 throws SystemException {
146 return blogsStatsUserPersistence.findWithDynamicQuery(dynamicQuery,
147 start, end);
148 }
149
150
164 @SuppressWarnings("rawtypes")
165 public List dynamicQuery(DynamicQuery dynamicQuery, int start, int end,
166 OrderByComparator orderByComparator) throws SystemException {
167 return blogsStatsUserPersistence.findWithDynamicQuery(dynamicQuery,
168 start, end, orderByComparator);
169 }
170
171
178 public long dynamicQueryCount(DynamicQuery dynamicQuery)
179 throws SystemException {
180 return blogsStatsUserPersistence.countWithDynamicQuery(dynamicQuery);
181 }
182
183
191 public BlogsStatsUser getBlogsStatsUser(long statsUserId)
192 throws PortalException, SystemException {
193 return blogsStatsUserPersistence.findByPrimaryKey(statsUserId);
194 }
195
196
208 public List<BlogsStatsUser> getBlogsStatsUsers(int start, int end)
209 throws SystemException {
210 return blogsStatsUserPersistence.findAll(start, end);
211 }
212
213
219 public int getBlogsStatsUsersCount() throws SystemException {
220 return blogsStatsUserPersistence.countAll();
221 }
222
223
230 public BlogsStatsUser updateBlogsStatsUser(BlogsStatsUser blogsStatsUser)
231 throws SystemException {
232 blogsStatsUser.setNew(false);
233
234 return blogsStatsUserPersistence.update(blogsStatsUser, true);
235 }
236
237
245 public BlogsStatsUser updateBlogsStatsUser(BlogsStatsUser blogsStatsUser,
246 boolean merge) throws SystemException {
247 blogsStatsUser.setNew(false);
248
249 return blogsStatsUserPersistence.update(blogsStatsUser, merge);
250 }
251
252
257 public BlogsEntryLocalService getBlogsEntryLocalService() {
258 return blogsEntryLocalService;
259 }
260
261
266 public void setBlogsEntryLocalService(
267 BlogsEntryLocalService blogsEntryLocalService) {
268 this.blogsEntryLocalService = blogsEntryLocalService;
269 }
270
271
276 public BlogsEntryService getBlogsEntryService() {
277 return blogsEntryService;
278 }
279
280
285 public void setBlogsEntryService(BlogsEntryService blogsEntryService) {
286 this.blogsEntryService = blogsEntryService;
287 }
288
289
294 public BlogsEntryPersistence getBlogsEntryPersistence() {
295 return blogsEntryPersistence;
296 }
297
298
303 public void setBlogsEntryPersistence(
304 BlogsEntryPersistence blogsEntryPersistence) {
305 this.blogsEntryPersistence = blogsEntryPersistence;
306 }
307
308
313 public BlogsEntryFinder getBlogsEntryFinder() {
314 return blogsEntryFinder;
315 }
316
317
322 public void setBlogsEntryFinder(BlogsEntryFinder blogsEntryFinder) {
323 this.blogsEntryFinder = blogsEntryFinder;
324 }
325
326
331 public BlogsStatsUserLocalService getBlogsStatsUserLocalService() {
332 return blogsStatsUserLocalService;
333 }
334
335
340 public void setBlogsStatsUserLocalService(
341 BlogsStatsUserLocalService blogsStatsUserLocalService) {
342 this.blogsStatsUserLocalService = blogsStatsUserLocalService;
343 }
344
345
350 public BlogsStatsUserPersistence getBlogsStatsUserPersistence() {
351 return blogsStatsUserPersistence;
352 }
353
354
359 public void setBlogsStatsUserPersistence(
360 BlogsStatsUserPersistence blogsStatsUserPersistence) {
361 this.blogsStatsUserPersistence = blogsStatsUserPersistence;
362 }
363
364
369 public BlogsStatsUserFinder getBlogsStatsUserFinder() {
370 return blogsStatsUserFinder;
371 }
372
373
378 public void setBlogsStatsUserFinder(
379 BlogsStatsUserFinder blogsStatsUserFinder) {
380 this.blogsStatsUserFinder = blogsStatsUserFinder;
381 }
382
383
388 public CounterLocalService getCounterLocalService() {
389 return counterLocalService;
390 }
391
392
397 public void setCounterLocalService(CounterLocalService counterLocalService) {
398 this.counterLocalService = counterLocalService;
399 }
400
401
406 public GroupLocalService getGroupLocalService() {
407 return groupLocalService;
408 }
409
410
415 public void setGroupLocalService(GroupLocalService groupLocalService) {
416 this.groupLocalService = groupLocalService;
417 }
418
419
424 public GroupService getGroupService() {
425 return groupService;
426 }
427
428
433 public void setGroupService(GroupService groupService) {
434 this.groupService = groupService;
435 }
436
437
442 public GroupPersistence getGroupPersistence() {
443 return groupPersistence;
444 }
445
446
451 public void setGroupPersistence(GroupPersistence groupPersistence) {
452 this.groupPersistence = groupPersistence;
453 }
454
455
460 public GroupFinder getGroupFinder() {
461 return groupFinder;
462 }
463
464
469 public void setGroupFinder(GroupFinder groupFinder) {
470 this.groupFinder = groupFinder;
471 }
472
473
478 public ResourceLocalService getResourceLocalService() {
479 return resourceLocalService;
480 }
481
482
487 public void setResourceLocalService(
488 ResourceLocalService resourceLocalService) {
489 this.resourceLocalService = resourceLocalService;
490 }
491
492
497 public ResourceService getResourceService() {
498 return resourceService;
499 }
500
501
506 public void setResourceService(ResourceService resourceService) {
507 this.resourceService = resourceService;
508 }
509
510
515 public ResourcePersistence getResourcePersistence() {
516 return resourcePersistence;
517 }
518
519
524 public void setResourcePersistence(ResourcePersistence resourcePersistence) {
525 this.resourcePersistence = resourcePersistence;
526 }
527
528
533 public ResourceFinder getResourceFinder() {
534 return resourceFinder;
535 }
536
537
542 public void setResourceFinder(ResourceFinder resourceFinder) {
543 this.resourceFinder = resourceFinder;
544 }
545
546
551 public UserLocalService getUserLocalService() {
552 return userLocalService;
553 }
554
555
560 public void setUserLocalService(UserLocalService userLocalService) {
561 this.userLocalService = userLocalService;
562 }
563
564
569 public UserService getUserService() {
570 return userService;
571 }
572
573
578 public void setUserService(UserService userService) {
579 this.userService = userService;
580 }
581
582
587 public UserPersistence getUserPersistence() {
588 return userPersistence;
589 }
590
591
596 public void setUserPersistence(UserPersistence userPersistence) {
597 this.userPersistence = userPersistence;
598 }
599
600
605 public UserFinder getUserFinder() {
606 return userFinder;
607 }
608
609
614 public void setUserFinder(UserFinder userFinder) {
615 this.userFinder = userFinder;
616 }
617
618
623 protected void runSQL(String sql) throws SystemException {
624 try {
625 DataSource dataSource = blogsStatsUserPersistence.getDataSource();
626
627 SqlUpdate sqlUpdate = SqlUpdateFactoryUtil.getSqlUpdate(dataSource,
628 sql, new int[0]);
629
630 sqlUpdate.update();
631 }
632 catch (Exception e) {
633 throw new SystemException(e);
634 }
635 }
636
637 @BeanReference(type = BlogsEntryLocalService.class)
638 protected BlogsEntryLocalService blogsEntryLocalService;
639 @BeanReference(type = BlogsEntryService.class)
640 protected BlogsEntryService blogsEntryService;
641 @BeanReference(type = BlogsEntryPersistence.class)
642 protected BlogsEntryPersistence blogsEntryPersistence;
643 @BeanReference(type = BlogsEntryFinder.class)
644 protected BlogsEntryFinder blogsEntryFinder;
645 @BeanReference(type = BlogsStatsUserLocalService.class)
646 protected BlogsStatsUserLocalService blogsStatsUserLocalService;
647 @BeanReference(type = BlogsStatsUserPersistence.class)
648 protected BlogsStatsUserPersistence blogsStatsUserPersistence;
649 @BeanReference(type = BlogsStatsUserFinder.class)
650 protected BlogsStatsUserFinder blogsStatsUserFinder;
651 @BeanReference(type = CounterLocalService.class)
652 protected CounterLocalService counterLocalService;
653 @BeanReference(type = GroupLocalService.class)
654 protected GroupLocalService groupLocalService;
655 @BeanReference(type = GroupService.class)
656 protected GroupService groupService;
657 @BeanReference(type = GroupPersistence.class)
658 protected GroupPersistence groupPersistence;
659 @BeanReference(type = GroupFinder.class)
660 protected GroupFinder groupFinder;
661 @BeanReference(type = ResourceLocalService.class)
662 protected ResourceLocalService resourceLocalService;
663 @BeanReference(type = ResourceService.class)
664 protected ResourceService resourceService;
665 @BeanReference(type = ResourcePersistence.class)
666 protected ResourcePersistence resourcePersistence;
667 @BeanReference(type = ResourceFinder.class)
668 protected ResourceFinder resourceFinder;
669 @BeanReference(type = UserLocalService.class)
670 protected UserLocalService userLocalService;
671 @BeanReference(type = UserService.class)
672 protected UserService userService;
673 @BeanReference(type = UserPersistence.class)
674 protected UserPersistence userPersistence;
675 @BeanReference(type = UserFinder.class)
676 protected UserFinder userFinder;
677 }