1
14
15 package com.liferay.portlet.blogs.service.base;
16
17 import com.liferay.counter.service.CounterLocalService;
18 import com.liferay.counter.service.CounterService;
19
20 import com.liferay.portal.PortalException;
21 import com.liferay.portal.SystemException;
22 import com.liferay.portal.kernel.annotation.BeanReference;
23 import com.liferay.portal.kernel.dao.jdbc.SqlUpdate;
24 import com.liferay.portal.kernel.dao.jdbc.SqlUpdateFactoryUtil;
25 import com.liferay.portal.kernel.dao.orm.DynamicQuery;
26 import com.liferay.portal.kernel.util.OrderByComparator;
27 import com.liferay.portal.service.GroupLocalService;
28 import com.liferay.portal.service.GroupService;
29 import com.liferay.portal.service.ResourceLocalService;
30 import com.liferay.portal.service.ResourceService;
31 import com.liferay.portal.service.UserLocalService;
32 import com.liferay.portal.service.UserService;
33 import com.liferay.portal.service.persistence.GroupFinder;
34 import com.liferay.portal.service.persistence.GroupPersistence;
35 import com.liferay.portal.service.persistence.ResourceFinder;
36 import com.liferay.portal.service.persistence.ResourcePersistence;
37 import com.liferay.portal.service.persistence.UserFinder;
38 import com.liferay.portal.service.persistence.UserPersistence;
39
40 import com.liferay.portlet.blogs.model.BlogsStatsUser;
41 import com.liferay.portlet.blogs.service.BlogsEntryLocalService;
42 import com.liferay.portlet.blogs.service.BlogsEntryService;
43 import com.liferay.portlet.blogs.service.BlogsStatsUserLocalService;
44 import com.liferay.portlet.blogs.service.persistence.BlogsEntryFinder;
45 import com.liferay.portlet.blogs.service.persistence.BlogsEntryPersistence;
46 import com.liferay.portlet.blogs.service.persistence.BlogsStatsUserFinder;
47 import com.liferay.portlet.blogs.service.persistence.BlogsStatsUserPersistence;
48
49 import java.util.List;
50
51 import javax.sql.DataSource;
52
53
59 public abstract class BlogsStatsUserLocalServiceBaseImpl
60 implements BlogsStatsUserLocalService {
61 public BlogsStatsUser addBlogsStatsUser(BlogsStatsUser blogsStatsUser)
62 throws SystemException {
63 blogsStatsUser.setNew(true);
64
65 return blogsStatsUserPersistence.update(blogsStatsUser, false);
66 }
67
68 public BlogsStatsUser createBlogsStatsUser(long statsUserId) {
69 return blogsStatsUserPersistence.create(statsUserId);
70 }
71
72 public void deleteBlogsStatsUser(long statsUserId)
73 throws PortalException, SystemException {
74 blogsStatsUserPersistence.remove(statsUserId);
75 }
76
77 public void deleteBlogsStatsUser(BlogsStatsUser blogsStatsUser)
78 throws SystemException {
79 blogsStatsUserPersistence.remove(blogsStatsUser);
80 }
81
82 @SuppressWarnings("rawtypes")
83 public List dynamicQuery(DynamicQuery dynamicQuery)
84 throws SystemException {
85 return blogsStatsUserPersistence.findWithDynamicQuery(dynamicQuery);
86 }
87
88 @SuppressWarnings("rawtypes")
89 public List dynamicQuery(DynamicQuery dynamicQuery, int start, int end)
90 throws SystemException {
91 return blogsStatsUserPersistence.findWithDynamicQuery(dynamicQuery,
92 start, end);
93 }
94
95 @SuppressWarnings("rawtypes")
96 public List dynamicQuery(DynamicQuery dynamicQuery, int start, int end,
97 OrderByComparator orderByComparator) throws SystemException {
98 return blogsStatsUserPersistence.findWithDynamicQuery(dynamicQuery,
99 start, end, orderByComparator);
100 }
101
102 public int dynamicQueryCount(DynamicQuery dynamicQuery)
103 throws SystemException {
104 return blogsStatsUserPersistence.countWithDynamicQuery(dynamicQuery);
105 }
106
107 public BlogsStatsUser getBlogsStatsUser(long statsUserId)
108 throws PortalException, SystemException {
109 return blogsStatsUserPersistence.findByPrimaryKey(statsUserId);
110 }
111
112 public List<BlogsStatsUser> getBlogsStatsUsers(int start, int end)
113 throws SystemException {
114 return blogsStatsUserPersistence.findAll(start, end);
115 }
116
117 public int getBlogsStatsUsersCount() throws SystemException {
118 return blogsStatsUserPersistence.countAll();
119 }
120
121 public BlogsStatsUser updateBlogsStatsUser(BlogsStatsUser blogsStatsUser)
122 throws SystemException {
123 blogsStatsUser.setNew(false);
124
125 return blogsStatsUserPersistence.update(blogsStatsUser, true);
126 }
127
128 public BlogsStatsUser updateBlogsStatsUser(BlogsStatsUser blogsStatsUser,
129 boolean merge) throws SystemException {
130 blogsStatsUser.setNew(false);
131
132 return blogsStatsUserPersistence.update(blogsStatsUser, merge);
133 }
134
135 public BlogsEntryLocalService getBlogsEntryLocalService() {
136 return blogsEntryLocalService;
137 }
138
139 public void setBlogsEntryLocalService(
140 BlogsEntryLocalService blogsEntryLocalService) {
141 this.blogsEntryLocalService = blogsEntryLocalService;
142 }
143
144 public BlogsEntryService getBlogsEntryService() {
145 return blogsEntryService;
146 }
147
148 public void setBlogsEntryService(BlogsEntryService blogsEntryService) {
149 this.blogsEntryService = blogsEntryService;
150 }
151
152 public BlogsEntryPersistence getBlogsEntryPersistence() {
153 return blogsEntryPersistence;
154 }
155
156 public void setBlogsEntryPersistence(
157 BlogsEntryPersistence blogsEntryPersistence) {
158 this.blogsEntryPersistence = blogsEntryPersistence;
159 }
160
161 public BlogsEntryFinder getBlogsEntryFinder() {
162 return blogsEntryFinder;
163 }
164
165 public void setBlogsEntryFinder(BlogsEntryFinder blogsEntryFinder) {
166 this.blogsEntryFinder = blogsEntryFinder;
167 }
168
169 public BlogsStatsUserLocalService getBlogsStatsUserLocalService() {
170 return blogsStatsUserLocalService;
171 }
172
173 public void setBlogsStatsUserLocalService(
174 BlogsStatsUserLocalService blogsStatsUserLocalService) {
175 this.blogsStatsUserLocalService = blogsStatsUserLocalService;
176 }
177
178 public BlogsStatsUserPersistence getBlogsStatsUserPersistence() {
179 return blogsStatsUserPersistence;
180 }
181
182 public void setBlogsStatsUserPersistence(
183 BlogsStatsUserPersistence blogsStatsUserPersistence) {
184 this.blogsStatsUserPersistence = blogsStatsUserPersistence;
185 }
186
187 public BlogsStatsUserFinder getBlogsStatsUserFinder() {
188 return blogsStatsUserFinder;
189 }
190
191 public void setBlogsStatsUserFinder(
192 BlogsStatsUserFinder blogsStatsUserFinder) {
193 this.blogsStatsUserFinder = blogsStatsUserFinder;
194 }
195
196 public CounterLocalService getCounterLocalService() {
197 return counterLocalService;
198 }
199
200 public void setCounterLocalService(CounterLocalService counterLocalService) {
201 this.counterLocalService = counterLocalService;
202 }
203
204 public CounterService getCounterService() {
205 return counterService;
206 }
207
208 public void setCounterService(CounterService counterService) {
209 this.counterService = counterService;
210 }
211
212 public GroupLocalService getGroupLocalService() {
213 return groupLocalService;
214 }
215
216 public void setGroupLocalService(GroupLocalService groupLocalService) {
217 this.groupLocalService = groupLocalService;
218 }
219
220 public GroupService getGroupService() {
221 return groupService;
222 }
223
224 public void setGroupService(GroupService groupService) {
225 this.groupService = groupService;
226 }
227
228 public GroupPersistence getGroupPersistence() {
229 return groupPersistence;
230 }
231
232 public void setGroupPersistence(GroupPersistence groupPersistence) {
233 this.groupPersistence = groupPersistence;
234 }
235
236 public GroupFinder getGroupFinder() {
237 return groupFinder;
238 }
239
240 public void setGroupFinder(GroupFinder groupFinder) {
241 this.groupFinder = groupFinder;
242 }
243
244 public ResourceLocalService getResourceLocalService() {
245 return resourceLocalService;
246 }
247
248 public void setResourceLocalService(
249 ResourceLocalService resourceLocalService) {
250 this.resourceLocalService = resourceLocalService;
251 }
252
253 public ResourceService getResourceService() {
254 return resourceService;
255 }
256
257 public void setResourceService(ResourceService resourceService) {
258 this.resourceService = resourceService;
259 }
260
261 public ResourcePersistence getResourcePersistence() {
262 return resourcePersistence;
263 }
264
265 public void setResourcePersistence(ResourcePersistence resourcePersistence) {
266 this.resourcePersistence = resourcePersistence;
267 }
268
269 public ResourceFinder getResourceFinder() {
270 return resourceFinder;
271 }
272
273 public void setResourceFinder(ResourceFinder resourceFinder) {
274 this.resourceFinder = resourceFinder;
275 }
276
277 public UserLocalService getUserLocalService() {
278 return userLocalService;
279 }
280
281 public void setUserLocalService(UserLocalService userLocalService) {
282 this.userLocalService = userLocalService;
283 }
284
285 public UserService getUserService() {
286 return userService;
287 }
288
289 public void setUserService(UserService userService) {
290 this.userService = userService;
291 }
292
293 public UserPersistence getUserPersistence() {
294 return userPersistence;
295 }
296
297 public void setUserPersistence(UserPersistence userPersistence) {
298 this.userPersistence = userPersistence;
299 }
300
301 public UserFinder getUserFinder() {
302 return userFinder;
303 }
304
305 public void setUserFinder(UserFinder userFinder) {
306 this.userFinder = userFinder;
307 }
308
309 protected void runSQL(String sql) throws SystemException {
310 try {
311 DataSource dataSource = blogsStatsUserPersistence.getDataSource();
312
313 SqlUpdate sqlUpdate = SqlUpdateFactoryUtil.getSqlUpdate(dataSource,
314 sql, new int[0]);
315
316 sqlUpdate.update(new Object[0]);
317 }
318 catch (Exception e) {
319 throw new SystemException(e);
320 }
321 }
322
323 @BeanReference(type = BlogsEntryLocalService.class)
324 protected BlogsEntryLocalService blogsEntryLocalService;
325 @BeanReference(type = BlogsEntryService.class)
326 protected BlogsEntryService blogsEntryService;
327 @BeanReference(type = BlogsEntryPersistence.class)
328 protected BlogsEntryPersistence blogsEntryPersistence;
329 @BeanReference(type = BlogsEntryFinder.class)
330 protected BlogsEntryFinder blogsEntryFinder;
331 @BeanReference(type = BlogsStatsUserLocalService.class)
332 protected BlogsStatsUserLocalService blogsStatsUserLocalService;
333 @BeanReference(type = BlogsStatsUserPersistence.class)
334 protected BlogsStatsUserPersistence blogsStatsUserPersistence;
335 @BeanReference(type = BlogsStatsUserFinder.class)
336 protected BlogsStatsUserFinder blogsStatsUserFinder;
337 @BeanReference(type = CounterLocalService.class)
338 protected CounterLocalService counterLocalService;
339 @BeanReference(type = CounterService.class)
340 protected CounterService counterService;
341 @BeanReference(type = GroupLocalService.class)
342 protected GroupLocalService groupLocalService;
343 @BeanReference(type = GroupService.class)
344 protected GroupService groupService;
345 @BeanReference(type = GroupPersistence.class)
346 protected GroupPersistence groupPersistence;
347 @BeanReference(type = GroupFinder.class)
348 protected GroupFinder groupFinder;
349 @BeanReference(type = ResourceLocalService.class)
350 protected ResourceLocalService resourceLocalService;
351 @BeanReference(type = ResourceService.class)
352 protected ResourceService resourceService;
353 @BeanReference(type = ResourcePersistence.class)
354 protected ResourcePersistence resourcePersistence;
355 @BeanReference(type = ResourceFinder.class)
356 protected ResourceFinder resourceFinder;
357 @BeanReference(type = UserLocalService.class)
358 protected UserLocalService userLocalService;
359 @BeanReference(type = UserService.class)
360 protected UserService userService;
361 @BeanReference(type = UserPersistence.class)
362 protected UserPersistence userPersistence;
363 @BeanReference(type = UserFinder.class)
364 protected UserFinder userFinder;
365 }