1
19
20 package com.liferay.portlet.ratings.service.base;
21
22 import com.liferay.counter.service.CounterLocalService;
23 import com.liferay.counter.service.CounterService;
24
25 import com.liferay.portal.PortalException;
26 import com.liferay.portal.SystemException;
27 import com.liferay.portal.kernel.annotation.BeanReference;
28 import com.liferay.portal.kernel.dao.orm.DynamicQuery;
29
30 import com.liferay.portlet.ratings.model.RatingsStats;
31 import com.liferay.portlet.ratings.service.RatingsEntryLocalService;
32 import com.liferay.portlet.ratings.service.RatingsEntryService;
33 import com.liferay.portlet.ratings.service.RatingsStatsLocalService;
34 import com.liferay.portlet.ratings.service.persistence.RatingsEntryPersistence;
35 import com.liferay.portlet.ratings.service.persistence.RatingsStatsPersistence;
36
37 import java.util.List;
38
39
45 public abstract class RatingsStatsLocalServiceBaseImpl
46 implements RatingsStatsLocalService {
47 public RatingsStats addRatingsStats(RatingsStats ratingsStats)
48 throws SystemException {
49 ratingsStats.setNew(true);
50
51 return ratingsStatsPersistence.update(ratingsStats, false);
52 }
53
54 public RatingsStats createRatingsStats(long statsId) {
55 return ratingsStatsPersistence.create(statsId);
56 }
57
58 public void deleteRatingsStats(long statsId)
59 throws PortalException, SystemException {
60 ratingsStatsPersistence.remove(statsId);
61 }
62
63 public void deleteRatingsStats(RatingsStats ratingsStats)
64 throws SystemException {
65 ratingsStatsPersistence.remove(ratingsStats);
66 }
67
68 public List<Object> dynamicQuery(DynamicQuery dynamicQuery)
69 throws SystemException {
70 return ratingsStatsPersistence.findWithDynamicQuery(dynamicQuery);
71 }
72
73 public List<Object> dynamicQuery(DynamicQuery dynamicQuery, int start,
74 int end) throws SystemException {
75 return ratingsStatsPersistence.findWithDynamicQuery(dynamicQuery,
76 start, end);
77 }
78
79 public RatingsStats getRatingsStats(long statsId)
80 throws PortalException, SystemException {
81 return ratingsStatsPersistence.findByPrimaryKey(statsId);
82 }
83
84 public List<RatingsStats> getRatingsStatses(int start, int end)
85 throws SystemException {
86 return ratingsStatsPersistence.findAll(start, end);
87 }
88
89 public int getRatingsStatsesCount() throws SystemException {
90 return ratingsStatsPersistence.countAll();
91 }
92
93 public RatingsStats updateRatingsStats(RatingsStats ratingsStats)
94 throws SystemException {
95 ratingsStats.setNew(false);
96
97 return ratingsStatsPersistence.update(ratingsStats, true);
98 }
99
100 public RatingsEntryLocalService getRatingsEntryLocalService() {
101 return ratingsEntryLocalService;
102 }
103
104 public void setRatingsEntryLocalService(
105 RatingsEntryLocalService ratingsEntryLocalService) {
106 this.ratingsEntryLocalService = ratingsEntryLocalService;
107 }
108
109 public RatingsEntryService getRatingsEntryService() {
110 return ratingsEntryService;
111 }
112
113 public void setRatingsEntryService(RatingsEntryService ratingsEntryService) {
114 this.ratingsEntryService = ratingsEntryService;
115 }
116
117 public RatingsEntryPersistence getRatingsEntryPersistence() {
118 return ratingsEntryPersistence;
119 }
120
121 public void setRatingsEntryPersistence(
122 RatingsEntryPersistence ratingsEntryPersistence) {
123 this.ratingsEntryPersistence = ratingsEntryPersistence;
124 }
125
126 public RatingsStatsLocalService getRatingsStatsLocalService() {
127 return ratingsStatsLocalService;
128 }
129
130 public void setRatingsStatsLocalService(
131 RatingsStatsLocalService ratingsStatsLocalService) {
132 this.ratingsStatsLocalService = ratingsStatsLocalService;
133 }
134
135 public RatingsStatsPersistence getRatingsStatsPersistence() {
136 return ratingsStatsPersistence;
137 }
138
139 public void setRatingsStatsPersistence(
140 RatingsStatsPersistence ratingsStatsPersistence) {
141 this.ratingsStatsPersistence = ratingsStatsPersistence;
142 }
143
144 public CounterLocalService getCounterLocalService() {
145 return counterLocalService;
146 }
147
148 public void setCounterLocalService(CounterLocalService counterLocalService) {
149 this.counterLocalService = counterLocalService;
150 }
151
152 public CounterService getCounterService() {
153 return counterService;
154 }
155
156 public void setCounterService(CounterService counterService) {
157 this.counterService = counterService;
158 }
159
160 @BeanReference(name = "com.liferay.portlet.ratings.service.RatingsEntryLocalService.impl")
161 protected RatingsEntryLocalService ratingsEntryLocalService;
162 @BeanReference(name = "com.liferay.portlet.ratings.service.RatingsEntryService.impl")
163 protected RatingsEntryService ratingsEntryService;
164 @BeanReference(name = "com.liferay.portlet.ratings.service.persistence.RatingsEntryPersistence.impl")
165 protected RatingsEntryPersistence ratingsEntryPersistence;
166 @BeanReference(name = "com.liferay.portlet.ratings.service.RatingsStatsLocalService.impl")
167 protected RatingsStatsLocalService ratingsStatsLocalService;
168 @BeanReference(name = "com.liferay.portlet.ratings.service.persistence.RatingsStatsPersistence.impl")
169 protected RatingsStatsPersistence ratingsStatsPersistence;
170 @BeanReference(name = "com.liferay.counter.service.CounterLocalService.impl")
171 protected CounterLocalService counterLocalService;
172 @BeanReference(name = "com.liferay.counter.service.CounterService.impl")
173 protected CounterService counterService;
174 }