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.UserLocalService;
037 import com.liferay.portal.service.UserService;
038 import com.liferay.portal.service.persistence.GroupFinder;
039 import com.liferay.portal.service.persistence.GroupPersistence;
040 import com.liferay.portal.service.persistence.UserFinder;
041 import com.liferay.portal.service.persistence.UserPersistence;
042
043 import com.liferay.portlet.blogs.model.BlogsStatsUser;
044 import com.liferay.portlet.blogs.service.BlogsEntryLocalService;
045 import com.liferay.portlet.blogs.service.BlogsEntryService;
046 import com.liferay.portlet.blogs.service.BlogsStatsUserLocalService;
047 import com.liferay.portlet.blogs.service.persistence.BlogsEntryFinder;
048 import com.liferay.portlet.blogs.service.persistence.BlogsEntryPersistence;
049 import com.liferay.portlet.blogs.service.persistence.BlogsStatsUserFinder;
050 import com.liferay.portlet.blogs.service.persistence.BlogsStatsUserPersistence;
051
052 import java.io.Serializable;
053
054 import java.util.List;
055
056 import javax.sql.DataSource;
057
058
070 public abstract class BlogsStatsUserLocalServiceBaseImpl
071 extends BaseLocalServiceImpl implements BlogsStatsUserLocalService,
072 IdentifiableBean {
073
078
079
086 @Indexable(type = IndexableType.REINDEX)
087 public BlogsStatsUser addBlogsStatsUser(BlogsStatsUser blogsStatsUser)
088 throws SystemException {
089 blogsStatsUser.setNew(true);
090
091 return blogsStatsUserPersistence.update(blogsStatsUser);
092 }
093
094
100 public BlogsStatsUser createBlogsStatsUser(long statsUserId) {
101 return blogsStatsUserPersistence.create(statsUserId);
102 }
103
104
112 @Indexable(type = IndexableType.DELETE)
113 public BlogsStatsUser deleteBlogsStatsUser(long statsUserId)
114 throws PortalException, SystemException {
115 return blogsStatsUserPersistence.remove(statsUserId);
116 }
117
118
125 @Indexable(type = IndexableType.DELETE)
126 public BlogsStatsUser deleteBlogsStatsUser(BlogsStatsUser blogsStatsUser)
127 throws SystemException {
128 return blogsStatsUserPersistence.remove(blogsStatsUser);
129 }
130
131 public DynamicQuery dynamicQuery() {
132 Class<?> clazz = getClass();
133
134 return DynamicQueryFactoryUtil.forClass(BlogsStatsUser.class,
135 clazz.getClassLoader());
136 }
137
138
145 @SuppressWarnings("rawtypes")
146 public List dynamicQuery(DynamicQuery dynamicQuery)
147 throws SystemException {
148 return blogsStatsUserPersistence.findWithDynamicQuery(dynamicQuery);
149 }
150
151
164 @SuppressWarnings("rawtypes")
165 public List dynamicQuery(DynamicQuery dynamicQuery, int start, int end)
166 throws SystemException {
167 return blogsStatsUserPersistence.findWithDynamicQuery(dynamicQuery,
168 start, end);
169 }
170
171
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 public long dynamicQueryCount(DynamicQuery dynamicQuery)
200 throws SystemException {
201 return blogsStatsUserPersistence.countWithDynamicQuery(dynamicQuery);
202 }
203
204 public BlogsStatsUser fetchBlogsStatsUser(long statsUserId)
205 throws SystemException {
206 return blogsStatsUserPersistence.fetchByPrimaryKey(statsUserId);
207 }
208
209
217 public BlogsStatsUser getBlogsStatsUser(long statsUserId)
218 throws PortalException, SystemException {
219 return blogsStatsUserPersistence.findByPrimaryKey(statsUserId);
220 }
221
222 public PersistedModel getPersistedModel(Serializable primaryKeyObj)
223 throws PortalException, SystemException {
224 return blogsStatsUserPersistence.findByPrimaryKey(primaryKeyObj);
225 }
226
227
239 public List<BlogsStatsUser> getBlogsStatsUsers(int start, int end)
240 throws SystemException {
241 return blogsStatsUserPersistence.findAll(start, end);
242 }
243
244
250 public int getBlogsStatsUsersCount() throws SystemException {
251 return blogsStatsUserPersistence.countAll();
252 }
253
254
261 @Indexable(type = IndexableType.REINDEX)
262 public BlogsStatsUser updateBlogsStatsUser(BlogsStatsUser blogsStatsUser)
263 throws SystemException {
264 return blogsStatsUserPersistence.update(blogsStatsUser);
265 }
266
267
272 public BlogsEntryLocalService getBlogsEntryLocalService() {
273 return blogsEntryLocalService;
274 }
275
276
281 public void setBlogsEntryLocalService(
282 BlogsEntryLocalService blogsEntryLocalService) {
283 this.blogsEntryLocalService = blogsEntryLocalService;
284 }
285
286
291 public BlogsEntryService getBlogsEntryService() {
292 return blogsEntryService;
293 }
294
295
300 public void setBlogsEntryService(BlogsEntryService blogsEntryService) {
301 this.blogsEntryService = blogsEntryService;
302 }
303
304
309 public BlogsEntryPersistence getBlogsEntryPersistence() {
310 return blogsEntryPersistence;
311 }
312
313
318 public void setBlogsEntryPersistence(
319 BlogsEntryPersistence blogsEntryPersistence) {
320 this.blogsEntryPersistence = blogsEntryPersistence;
321 }
322
323
328 public BlogsEntryFinder getBlogsEntryFinder() {
329 return blogsEntryFinder;
330 }
331
332
337 public void setBlogsEntryFinder(BlogsEntryFinder blogsEntryFinder) {
338 this.blogsEntryFinder = blogsEntryFinder;
339 }
340
341
346 public BlogsStatsUserLocalService getBlogsStatsUserLocalService() {
347 return blogsStatsUserLocalService;
348 }
349
350
355 public void setBlogsStatsUserLocalService(
356 BlogsStatsUserLocalService blogsStatsUserLocalService) {
357 this.blogsStatsUserLocalService = blogsStatsUserLocalService;
358 }
359
360
365 public BlogsStatsUserPersistence getBlogsStatsUserPersistence() {
366 return blogsStatsUserPersistence;
367 }
368
369
374 public void setBlogsStatsUserPersistence(
375 BlogsStatsUserPersistence blogsStatsUserPersistence) {
376 this.blogsStatsUserPersistence = blogsStatsUserPersistence;
377 }
378
379
384 public BlogsStatsUserFinder getBlogsStatsUserFinder() {
385 return blogsStatsUserFinder;
386 }
387
388
393 public void setBlogsStatsUserFinder(
394 BlogsStatsUserFinder blogsStatsUserFinder) {
395 this.blogsStatsUserFinder = blogsStatsUserFinder;
396 }
397
398
403 public CounterLocalService getCounterLocalService() {
404 return counterLocalService;
405 }
406
407
412 public void setCounterLocalService(CounterLocalService counterLocalService) {
413 this.counterLocalService = counterLocalService;
414 }
415
416
421 public GroupLocalService getGroupLocalService() {
422 return groupLocalService;
423 }
424
425
430 public void setGroupLocalService(GroupLocalService groupLocalService) {
431 this.groupLocalService = groupLocalService;
432 }
433
434
439 public GroupService getGroupService() {
440 return groupService;
441 }
442
443
448 public void setGroupService(GroupService groupService) {
449 this.groupService = groupService;
450 }
451
452
457 public GroupPersistence getGroupPersistence() {
458 return groupPersistence;
459 }
460
461
466 public void setGroupPersistence(GroupPersistence groupPersistence) {
467 this.groupPersistence = groupPersistence;
468 }
469
470
475 public GroupFinder getGroupFinder() {
476 return groupFinder;
477 }
478
479
484 public void setGroupFinder(GroupFinder groupFinder) {
485 this.groupFinder = groupFinder;
486 }
487
488
493 public ResourceLocalService getResourceLocalService() {
494 return resourceLocalService;
495 }
496
497
502 public void setResourceLocalService(
503 ResourceLocalService resourceLocalService) {
504 this.resourceLocalService = resourceLocalService;
505 }
506
507
512 public UserLocalService getUserLocalService() {
513 return userLocalService;
514 }
515
516
521 public void setUserLocalService(UserLocalService userLocalService) {
522 this.userLocalService = userLocalService;
523 }
524
525
530 public UserService getUserService() {
531 return userService;
532 }
533
534
539 public void setUserService(UserService userService) {
540 this.userService = userService;
541 }
542
543
548 public UserPersistence getUserPersistence() {
549 return userPersistence;
550 }
551
552
557 public void setUserPersistence(UserPersistence userPersistence) {
558 this.userPersistence = userPersistence;
559 }
560
561
566 public UserFinder getUserFinder() {
567 return userFinder;
568 }
569
570
575 public void setUserFinder(UserFinder userFinder) {
576 this.userFinder = userFinder;
577 }
578
579 public void afterPropertiesSet() {
580 persistedModelLocalServiceRegistry.register("com.liferay.portlet.blogs.model.BlogsStatsUser",
581 blogsStatsUserLocalService);
582 }
583
584 public void destroy() {
585 persistedModelLocalServiceRegistry.unregister(
586 "com.liferay.portlet.blogs.model.BlogsStatsUser");
587 }
588
589
594 public String getBeanIdentifier() {
595 return _beanIdentifier;
596 }
597
598
603 public void setBeanIdentifier(String beanIdentifier) {
604 _beanIdentifier = beanIdentifier;
605 }
606
607 protected Class<?> getModelClass() {
608 return BlogsStatsUser.class;
609 }
610
611 protected String getModelClassName() {
612 return BlogsStatsUser.class.getName();
613 }
614
615
620 protected void runSQL(String sql) throws SystemException {
621 try {
622 DataSource dataSource = blogsStatsUserPersistence.getDataSource();
623
624 SqlUpdate sqlUpdate = SqlUpdateFactoryUtil.getSqlUpdate(dataSource,
625 sql, new int[0]);
626
627 sqlUpdate.update();
628 }
629 catch (Exception e) {
630 throw new SystemException(e);
631 }
632 }
633
634 @BeanReference(type = BlogsEntryLocalService.class)
635 protected BlogsEntryLocalService blogsEntryLocalService;
636 @BeanReference(type = BlogsEntryService.class)
637 protected BlogsEntryService blogsEntryService;
638 @BeanReference(type = BlogsEntryPersistence.class)
639 protected BlogsEntryPersistence blogsEntryPersistence;
640 @BeanReference(type = BlogsEntryFinder.class)
641 protected BlogsEntryFinder blogsEntryFinder;
642 @BeanReference(type = BlogsStatsUserLocalService.class)
643 protected BlogsStatsUserLocalService blogsStatsUserLocalService;
644 @BeanReference(type = BlogsStatsUserPersistence.class)
645 protected BlogsStatsUserPersistence blogsStatsUserPersistence;
646 @BeanReference(type = BlogsStatsUserFinder.class)
647 protected BlogsStatsUserFinder blogsStatsUserFinder;
648 @BeanReference(type = CounterLocalService.class)
649 protected CounterLocalService counterLocalService;
650 @BeanReference(type = GroupLocalService.class)
651 protected GroupLocalService groupLocalService;
652 @BeanReference(type = GroupService.class)
653 protected GroupService groupService;
654 @BeanReference(type = GroupPersistence.class)
655 protected GroupPersistence groupPersistence;
656 @BeanReference(type = GroupFinder.class)
657 protected GroupFinder groupFinder;
658 @BeanReference(type = ResourceLocalService.class)
659 protected ResourceLocalService resourceLocalService;
660 @BeanReference(type = UserLocalService.class)
661 protected UserLocalService userLocalService;
662 @BeanReference(type = UserService.class)
663 protected UserService userService;
664 @BeanReference(type = UserPersistence.class)
665 protected UserPersistence userPersistence;
666 @BeanReference(type = UserFinder.class)
667 protected UserFinder userFinder;
668 @BeanReference(type = PersistedModelLocalServiceRegistry.class)
669 protected PersistedModelLocalServiceRegistry persistedModelLocalServiceRegistry;
670 private String _beanIdentifier;
671 }