001
014
015 package com.liferay.portlet.blogs.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.jdbc.SqlUpdate;
020 import com.liferay.portal.kernel.dao.jdbc.SqlUpdateFactoryUtil;
021 import com.liferay.portal.kernel.dao.orm.DynamicQuery;
022 import com.liferay.portal.kernel.dao.orm.DynamicQueryFactoryUtil;
023 import com.liferay.portal.kernel.dao.orm.Projection;
024 import com.liferay.portal.kernel.exception.PortalException;
025 import com.liferay.portal.kernel.exception.SystemException;
026 import com.liferay.portal.kernel.search.Indexable;
027 import com.liferay.portal.kernel.search.IndexableType;
028 import com.liferay.portal.kernel.util.OrderByComparator;
029 import com.liferay.portal.model.PersistedModel;
030 import com.liferay.portal.service.BaseLocalServiceImpl;
031 import com.liferay.portal.service.PersistedModelLocalServiceRegistry;
032 import com.liferay.portal.service.persistence.GroupFinder;
033 import com.liferay.portal.service.persistence.GroupPersistence;
034 import com.liferay.portal.service.persistence.UserFinder;
035 import com.liferay.portal.service.persistence.UserPersistence;
036
037 import com.liferay.portlet.blogs.model.BlogsStatsUser;
038 import com.liferay.portlet.blogs.service.BlogsStatsUserLocalService;
039 import com.liferay.portlet.blogs.service.persistence.BlogsEntryFinder;
040 import com.liferay.portlet.blogs.service.persistence.BlogsEntryPersistence;
041 import com.liferay.portlet.blogs.service.persistence.BlogsStatsUserFinder;
042 import com.liferay.portlet.blogs.service.persistence.BlogsStatsUserPersistence;
043
044 import java.io.Serializable;
045
046 import java.util.List;
047
048 import javax.sql.DataSource;
049
050
062 public abstract class BlogsStatsUserLocalServiceBaseImpl
063 extends BaseLocalServiceImpl implements BlogsStatsUserLocalService,
064 IdentifiableBean {
065
070
071
078 @Indexable(type = IndexableType.REINDEX)
079 @Override
080 public BlogsStatsUser addBlogsStatsUser(BlogsStatsUser blogsStatsUser)
081 throws SystemException {
082 blogsStatsUser.setNew(true);
083
084 return blogsStatsUserPersistence.update(blogsStatsUser);
085 }
086
087
093 @Override
094 public BlogsStatsUser createBlogsStatsUser(long statsUserId) {
095 return blogsStatsUserPersistence.create(statsUserId);
096 }
097
098
106 @Indexable(type = IndexableType.DELETE)
107 @Override
108 public BlogsStatsUser deleteBlogsStatsUser(long statsUserId)
109 throws PortalException, SystemException {
110 return blogsStatsUserPersistence.remove(statsUserId);
111 }
112
113
120 @Indexable(type = IndexableType.DELETE)
121 @Override
122 public BlogsStatsUser deleteBlogsStatsUser(BlogsStatsUser blogsStatsUser)
123 throws SystemException {
124 return blogsStatsUserPersistence.remove(blogsStatsUser);
125 }
126
127 @Override
128 public DynamicQuery dynamicQuery() {
129 Class<?> clazz = getClass();
130
131 return DynamicQueryFactoryUtil.forClass(BlogsStatsUser.class,
132 clazz.getClassLoader());
133 }
134
135
142 @Override
143 @SuppressWarnings("rawtypes")
144 public List dynamicQuery(DynamicQuery dynamicQuery)
145 throws SystemException {
146 return blogsStatsUserPersistence.findWithDynamicQuery(dynamicQuery);
147 }
148
149
162 @Override
163 @SuppressWarnings("rawtypes")
164 public List dynamicQuery(DynamicQuery dynamicQuery, int start, int end)
165 throws SystemException {
166 return blogsStatsUserPersistence.findWithDynamicQuery(dynamicQuery,
167 start, end);
168 }
169
170
184 @Override
185 @SuppressWarnings("rawtypes")
186 public List dynamicQuery(DynamicQuery dynamicQuery, int start, int end,
187 OrderByComparator orderByComparator) throws SystemException {
188 return blogsStatsUserPersistence.findWithDynamicQuery(dynamicQuery,
189 start, end, orderByComparator);
190 }
191
192
199 @Override
200 public long dynamicQueryCount(DynamicQuery dynamicQuery)
201 throws SystemException {
202 return blogsStatsUserPersistence.countWithDynamicQuery(dynamicQuery);
203 }
204
205
213 @Override
214 public long dynamicQueryCount(DynamicQuery dynamicQuery,
215 Projection projection) throws SystemException {
216 return blogsStatsUserPersistence.countWithDynamicQuery(dynamicQuery,
217 projection);
218 }
219
220 @Override
221 public BlogsStatsUser fetchBlogsStatsUser(long statsUserId)
222 throws SystemException {
223 return blogsStatsUserPersistence.fetchByPrimaryKey(statsUserId);
224 }
225
226
234 @Override
235 public BlogsStatsUser getBlogsStatsUser(long statsUserId)
236 throws PortalException, SystemException {
237 return blogsStatsUserPersistence.findByPrimaryKey(statsUserId);
238 }
239
240 @Override
241 public PersistedModel getPersistedModel(Serializable primaryKeyObj)
242 throws PortalException, SystemException {
243 return blogsStatsUserPersistence.findByPrimaryKey(primaryKeyObj);
244 }
245
246
258 @Override
259 public List<BlogsStatsUser> getBlogsStatsUsers(int start, int end)
260 throws SystemException {
261 return blogsStatsUserPersistence.findAll(start, end);
262 }
263
264
270 @Override
271 public int getBlogsStatsUsersCount() throws SystemException {
272 return blogsStatsUserPersistence.countAll();
273 }
274
275
282 @Indexable(type = IndexableType.REINDEX)
283 @Override
284 public BlogsStatsUser updateBlogsStatsUser(BlogsStatsUser blogsStatsUser)
285 throws SystemException {
286 return blogsStatsUserPersistence.update(blogsStatsUser);
287 }
288
289
294 public com.liferay.portlet.blogs.service.BlogsEntryLocalService getBlogsEntryLocalService() {
295 return blogsEntryLocalService;
296 }
297
298
303 public void setBlogsEntryLocalService(
304 com.liferay.portlet.blogs.service.BlogsEntryLocalService blogsEntryLocalService) {
305 this.blogsEntryLocalService = blogsEntryLocalService;
306 }
307
308
313 public com.liferay.portlet.blogs.service.BlogsEntryService getBlogsEntryService() {
314 return blogsEntryService;
315 }
316
317
322 public void setBlogsEntryService(
323 com.liferay.portlet.blogs.service.BlogsEntryService blogsEntryService) {
324 this.blogsEntryService = blogsEntryService;
325 }
326
327
332 public BlogsEntryPersistence getBlogsEntryPersistence() {
333 return blogsEntryPersistence;
334 }
335
336
341 public void setBlogsEntryPersistence(
342 BlogsEntryPersistence blogsEntryPersistence) {
343 this.blogsEntryPersistence = blogsEntryPersistence;
344 }
345
346
351 public BlogsEntryFinder getBlogsEntryFinder() {
352 return blogsEntryFinder;
353 }
354
355
360 public void setBlogsEntryFinder(BlogsEntryFinder blogsEntryFinder) {
361 this.blogsEntryFinder = blogsEntryFinder;
362 }
363
364
369 public com.liferay.portlet.blogs.service.BlogsStatsUserLocalService getBlogsStatsUserLocalService() {
370 return blogsStatsUserLocalService;
371 }
372
373
378 public void setBlogsStatsUserLocalService(
379 com.liferay.portlet.blogs.service.BlogsStatsUserLocalService blogsStatsUserLocalService) {
380 this.blogsStatsUserLocalService = blogsStatsUserLocalService;
381 }
382
383
388 public BlogsStatsUserPersistence getBlogsStatsUserPersistence() {
389 return blogsStatsUserPersistence;
390 }
391
392
397 public void setBlogsStatsUserPersistence(
398 BlogsStatsUserPersistence blogsStatsUserPersistence) {
399 this.blogsStatsUserPersistence = blogsStatsUserPersistence;
400 }
401
402
407 public BlogsStatsUserFinder getBlogsStatsUserFinder() {
408 return blogsStatsUserFinder;
409 }
410
411
416 public void setBlogsStatsUserFinder(
417 BlogsStatsUserFinder blogsStatsUserFinder) {
418 this.blogsStatsUserFinder = blogsStatsUserFinder;
419 }
420
421
426 public com.liferay.counter.service.CounterLocalService getCounterLocalService() {
427 return counterLocalService;
428 }
429
430
435 public void setCounterLocalService(
436 com.liferay.counter.service.CounterLocalService counterLocalService) {
437 this.counterLocalService = counterLocalService;
438 }
439
440
445 public com.liferay.portal.service.GroupLocalService getGroupLocalService() {
446 return groupLocalService;
447 }
448
449
454 public void setGroupLocalService(
455 com.liferay.portal.service.GroupLocalService groupLocalService) {
456 this.groupLocalService = groupLocalService;
457 }
458
459
464 public com.liferay.portal.service.GroupService getGroupService() {
465 return groupService;
466 }
467
468
473 public void setGroupService(
474 com.liferay.portal.service.GroupService groupService) {
475 this.groupService = groupService;
476 }
477
478
483 public GroupPersistence getGroupPersistence() {
484 return groupPersistence;
485 }
486
487
492 public void setGroupPersistence(GroupPersistence groupPersistence) {
493 this.groupPersistence = groupPersistence;
494 }
495
496
501 public GroupFinder getGroupFinder() {
502 return groupFinder;
503 }
504
505
510 public void setGroupFinder(GroupFinder groupFinder) {
511 this.groupFinder = groupFinder;
512 }
513
514
519 public com.liferay.portal.service.ResourceLocalService getResourceLocalService() {
520 return resourceLocalService;
521 }
522
523
528 public void setResourceLocalService(
529 com.liferay.portal.service.ResourceLocalService resourceLocalService) {
530 this.resourceLocalService = resourceLocalService;
531 }
532
533
538 public com.liferay.portal.service.UserLocalService getUserLocalService() {
539 return userLocalService;
540 }
541
542
547 public void setUserLocalService(
548 com.liferay.portal.service.UserLocalService userLocalService) {
549 this.userLocalService = userLocalService;
550 }
551
552
557 public com.liferay.portal.service.UserService getUserService() {
558 return userService;
559 }
560
561
566 public void setUserService(
567 com.liferay.portal.service.UserService userService) {
568 this.userService = userService;
569 }
570
571
576 public UserPersistence getUserPersistence() {
577 return userPersistence;
578 }
579
580
585 public void setUserPersistence(UserPersistence userPersistence) {
586 this.userPersistence = userPersistence;
587 }
588
589
594 public UserFinder getUserFinder() {
595 return userFinder;
596 }
597
598
603 public void setUserFinder(UserFinder userFinder) {
604 this.userFinder = userFinder;
605 }
606
607 public void afterPropertiesSet() {
608 persistedModelLocalServiceRegistry.register("com.liferay.portlet.blogs.model.BlogsStatsUser",
609 blogsStatsUserLocalService);
610 }
611
612 public void destroy() {
613 persistedModelLocalServiceRegistry.unregister(
614 "com.liferay.portlet.blogs.model.BlogsStatsUser");
615 }
616
617
622 @Override
623 public String getBeanIdentifier() {
624 return _beanIdentifier;
625 }
626
627
632 @Override
633 public void setBeanIdentifier(String beanIdentifier) {
634 _beanIdentifier = beanIdentifier;
635 }
636
637 protected Class<?> getModelClass() {
638 return BlogsStatsUser.class;
639 }
640
641 protected String getModelClassName() {
642 return BlogsStatsUser.class.getName();
643 }
644
645
650 protected void runSQL(String sql) throws SystemException {
651 try {
652 DataSource dataSource = blogsStatsUserPersistence.getDataSource();
653
654 SqlUpdate sqlUpdate = SqlUpdateFactoryUtil.getSqlUpdate(dataSource,
655 sql, new int[0]);
656
657 sqlUpdate.update();
658 }
659 catch (Exception e) {
660 throw new SystemException(e);
661 }
662 }
663
664 @BeanReference(type = com.liferay.portlet.blogs.service.BlogsEntryLocalService.class)
665 protected com.liferay.portlet.blogs.service.BlogsEntryLocalService blogsEntryLocalService;
666 @BeanReference(type = com.liferay.portlet.blogs.service.BlogsEntryService.class)
667 protected com.liferay.portlet.blogs.service.BlogsEntryService blogsEntryService;
668 @BeanReference(type = BlogsEntryPersistence.class)
669 protected BlogsEntryPersistence blogsEntryPersistence;
670 @BeanReference(type = BlogsEntryFinder.class)
671 protected BlogsEntryFinder blogsEntryFinder;
672 @BeanReference(type = com.liferay.portlet.blogs.service.BlogsStatsUserLocalService.class)
673 protected com.liferay.portlet.blogs.service.BlogsStatsUserLocalService blogsStatsUserLocalService;
674 @BeanReference(type = BlogsStatsUserPersistence.class)
675 protected BlogsStatsUserPersistence blogsStatsUserPersistence;
676 @BeanReference(type = BlogsStatsUserFinder.class)
677 protected BlogsStatsUserFinder blogsStatsUserFinder;
678 @BeanReference(type = com.liferay.counter.service.CounterLocalService.class)
679 protected com.liferay.counter.service.CounterLocalService counterLocalService;
680 @BeanReference(type = com.liferay.portal.service.GroupLocalService.class)
681 protected com.liferay.portal.service.GroupLocalService groupLocalService;
682 @BeanReference(type = com.liferay.portal.service.GroupService.class)
683 protected com.liferay.portal.service.GroupService groupService;
684 @BeanReference(type = GroupPersistence.class)
685 protected GroupPersistence groupPersistence;
686 @BeanReference(type = GroupFinder.class)
687 protected GroupFinder groupFinder;
688 @BeanReference(type = com.liferay.portal.service.ResourceLocalService.class)
689 protected com.liferay.portal.service.ResourceLocalService resourceLocalService;
690 @BeanReference(type = com.liferay.portal.service.UserLocalService.class)
691 protected com.liferay.portal.service.UserLocalService userLocalService;
692 @BeanReference(type = com.liferay.portal.service.UserService.class)
693 protected com.liferay.portal.service.UserService userService;
694 @BeanReference(type = UserPersistence.class)
695 protected UserPersistence userPersistence;
696 @BeanReference(type = UserFinder.class)
697 protected UserFinder userFinder;
698 @BeanReference(type = PersistedModelLocalServiceRegistry.class)
699 protected PersistedModelLocalServiceRegistry persistedModelLocalServiceRegistry;
700 private String _beanIdentifier;
701 }