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