1
14
15 package com.liferay.portlet.calendar.service.base;
16
17 import com.liferay.counter.service.CounterLocalService;
18 import com.liferay.counter.service.CounterService;
19
20 import com.liferay.mail.service.MailService;
21
22 import com.liferay.portal.PortalException;
23 import com.liferay.portal.SystemException;
24 import com.liferay.portal.kernel.annotation.BeanReference;
25 import com.liferay.portal.kernel.dao.db.DB;
26 import com.liferay.portal.kernel.dao.db.DBFactoryUtil;
27 import com.liferay.portal.kernel.dao.orm.DynamicQuery;
28 import com.liferay.portal.service.CompanyLocalService;
29 import com.liferay.portal.service.CompanyService;
30 import com.liferay.portal.service.PortletPreferencesLocalService;
31 import com.liferay.portal.service.PortletPreferencesService;
32 import com.liferay.portal.service.ResourceLocalService;
33 import com.liferay.portal.service.ResourceService;
34 import com.liferay.portal.service.UserLocalService;
35 import com.liferay.portal.service.UserService;
36 import com.liferay.portal.service.persistence.CompanyPersistence;
37 import com.liferay.portal.service.persistence.PortletPreferencesFinder;
38 import com.liferay.portal.service.persistence.PortletPreferencesPersistence;
39 import com.liferay.portal.service.persistence.ResourceFinder;
40 import com.liferay.portal.service.persistence.ResourcePersistence;
41 import com.liferay.portal.service.persistence.UserFinder;
42 import com.liferay.portal.service.persistence.UserPersistence;
43
44 import com.liferay.portlet.calendar.model.CalEvent;
45 import com.liferay.portlet.calendar.service.CalEventLocalService;
46 import com.liferay.portlet.calendar.service.CalEventService;
47 import com.liferay.portlet.calendar.service.persistence.CalEventFinder;
48 import com.liferay.portlet.calendar.service.persistence.CalEventPersistence;
49 import com.liferay.portlet.social.service.SocialActivityLocalService;
50 import com.liferay.portlet.social.service.persistence.SocialActivityFinder;
51 import com.liferay.portlet.social.service.persistence.SocialActivityPersistence;
52
53 import java.util.List;
54
55
61 public abstract class CalEventLocalServiceBaseImpl
62 implements CalEventLocalService {
63 public CalEvent addCalEvent(CalEvent calEvent) throws SystemException {
64 calEvent.setNew(true);
65
66 return calEventPersistence.update(calEvent, false);
67 }
68
69 public CalEvent createCalEvent(long eventId) {
70 return calEventPersistence.create(eventId);
71 }
72
73 public void deleteCalEvent(long eventId)
74 throws PortalException, SystemException {
75 calEventPersistence.remove(eventId);
76 }
77
78 public void deleteCalEvent(CalEvent calEvent) throws SystemException {
79 calEventPersistence.remove(calEvent);
80 }
81
82 public List<Object> dynamicQuery(DynamicQuery dynamicQuery)
83 throws SystemException {
84 return calEventPersistence.findWithDynamicQuery(dynamicQuery);
85 }
86
87 public List<Object> dynamicQuery(DynamicQuery dynamicQuery, int start,
88 int end) throws SystemException {
89 return calEventPersistence.findWithDynamicQuery(dynamicQuery, start, end);
90 }
91
92 public CalEvent getCalEvent(long eventId)
93 throws PortalException, SystemException {
94 return calEventPersistence.findByPrimaryKey(eventId);
95 }
96
97 public List<CalEvent> getCalEvents(int start, int end)
98 throws SystemException {
99 return calEventPersistence.findAll(start, end);
100 }
101
102 public int getCalEventsCount() throws SystemException {
103 return calEventPersistence.countAll();
104 }
105
106 public CalEvent updateCalEvent(CalEvent calEvent) throws SystemException {
107 calEvent.setNew(false);
108
109 return calEventPersistence.update(calEvent, true);
110 }
111
112 public CalEvent updateCalEvent(CalEvent calEvent, boolean merge)
113 throws SystemException {
114 calEvent.setNew(false);
115
116 return calEventPersistence.update(calEvent, merge);
117 }
118
119 public CalEventLocalService getCalEventLocalService() {
120 return calEventLocalService;
121 }
122
123 public void setCalEventLocalService(
124 CalEventLocalService calEventLocalService) {
125 this.calEventLocalService = calEventLocalService;
126 }
127
128 public CalEventService getCalEventService() {
129 return calEventService;
130 }
131
132 public void setCalEventService(CalEventService calEventService) {
133 this.calEventService = calEventService;
134 }
135
136 public CalEventPersistence getCalEventPersistence() {
137 return calEventPersistence;
138 }
139
140 public void setCalEventPersistence(CalEventPersistence calEventPersistence) {
141 this.calEventPersistence = calEventPersistence;
142 }
143
144 public CalEventFinder getCalEventFinder() {
145 return calEventFinder;
146 }
147
148 public void setCalEventFinder(CalEventFinder calEventFinder) {
149 this.calEventFinder = calEventFinder;
150 }
151
152 public CounterLocalService getCounterLocalService() {
153 return counterLocalService;
154 }
155
156 public void setCounterLocalService(CounterLocalService counterLocalService) {
157 this.counterLocalService = counterLocalService;
158 }
159
160 public CounterService getCounterService() {
161 return counterService;
162 }
163
164 public void setCounterService(CounterService counterService) {
165 this.counterService = counterService;
166 }
167
168 public MailService getMailService() {
169 return mailService;
170 }
171
172 public void setMailService(MailService mailService) {
173 this.mailService = mailService;
174 }
175
176 public CompanyLocalService getCompanyLocalService() {
177 return companyLocalService;
178 }
179
180 public void setCompanyLocalService(CompanyLocalService companyLocalService) {
181 this.companyLocalService = companyLocalService;
182 }
183
184 public CompanyService getCompanyService() {
185 return companyService;
186 }
187
188 public void setCompanyService(CompanyService companyService) {
189 this.companyService = companyService;
190 }
191
192 public CompanyPersistence getCompanyPersistence() {
193 return companyPersistence;
194 }
195
196 public void setCompanyPersistence(CompanyPersistence companyPersistence) {
197 this.companyPersistence = companyPersistence;
198 }
199
200 public PortletPreferencesLocalService getPortletPreferencesLocalService() {
201 return portletPreferencesLocalService;
202 }
203
204 public void setPortletPreferencesLocalService(
205 PortletPreferencesLocalService portletPreferencesLocalService) {
206 this.portletPreferencesLocalService = portletPreferencesLocalService;
207 }
208
209 public PortletPreferencesService getPortletPreferencesService() {
210 return portletPreferencesService;
211 }
212
213 public void setPortletPreferencesService(
214 PortletPreferencesService portletPreferencesService) {
215 this.portletPreferencesService = portletPreferencesService;
216 }
217
218 public PortletPreferencesPersistence getPortletPreferencesPersistence() {
219 return portletPreferencesPersistence;
220 }
221
222 public void setPortletPreferencesPersistence(
223 PortletPreferencesPersistence portletPreferencesPersistence) {
224 this.portletPreferencesPersistence = portletPreferencesPersistence;
225 }
226
227 public PortletPreferencesFinder getPortletPreferencesFinder() {
228 return portletPreferencesFinder;
229 }
230
231 public void setPortletPreferencesFinder(
232 PortletPreferencesFinder portletPreferencesFinder) {
233 this.portletPreferencesFinder = portletPreferencesFinder;
234 }
235
236 public ResourceLocalService getResourceLocalService() {
237 return resourceLocalService;
238 }
239
240 public void setResourceLocalService(
241 ResourceLocalService resourceLocalService) {
242 this.resourceLocalService = resourceLocalService;
243 }
244
245 public ResourceService getResourceService() {
246 return resourceService;
247 }
248
249 public void setResourceService(ResourceService resourceService) {
250 this.resourceService = resourceService;
251 }
252
253 public ResourcePersistence getResourcePersistence() {
254 return resourcePersistence;
255 }
256
257 public void setResourcePersistence(ResourcePersistence resourcePersistence) {
258 this.resourcePersistence = resourcePersistence;
259 }
260
261 public ResourceFinder getResourceFinder() {
262 return resourceFinder;
263 }
264
265 public void setResourceFinder(ResourceFinder resourceFinder) {
266 this.resourceFinder = resourceFinder;
267 }
268
269 public UserLocalService getUserLocalService() {
270 return userLocalService;
271 }
272
273 public void setUserLocalService(UserLocalService userLocalService) {
274 this.userLocalService = userLocalService;
275 }
276
277 public UserService getUserService() {
278 return userService;
279 }
280
281 public void setUserService(UserService userService) {
282 this.userService = userService;
283 }
284
285 public UserPersistence getUserPersistence() {
286 return userPersistence;
287 }
288
289 public void setUserPersistence(UserPersistence userPersistence) {
290 this.userPersistence = userPersistence;
291 }
292
293 public UserFinder getUserFinder() {
294 return userFinder;
295 }
296
297 public void setUserFinder(UserFinder userFinder) {
298 this.userFinder = userFinder;
299 }
300
301 public SocialActivityLocalService getSocialActivityLocalService() {
302 return socialActivityLocalService;
303 }
304
305 public void setSocialActivityLocalService(
306 SocialActivityLocalService socialActivityLocalService) {
307 this.socialActivityLocalService = socialActivityLocalService;
308 }
309
310 public SocialActivityPersistence getSocialActivityPersistence() {
311 return socialActivityPersistence;
312 }
313
314 public void setSocialActivityPersistence(
315 SocialActivityPersistence socialActivityPersistence) {
316 this.socialActivityPersistence = socialActivityPersistence;
317 }
318
319 public SocialActivityFinder getSocialActivityFinder() {
320 return socialActivityFinder;
321 }
322
323 public void setSocialActivityFinder(
324 SocialActivityFinder socialActivityFinder) {
325 this.socialActivityFinder = socialActivityFinder;
326 }
327
328 protected void runSQL(String sql) throws SystemException {
329 try {
330 DB db = DBFactoryUtil.getDB();
331
332 db.runSQL(sql);
333 }
334 catch (Exception e) {
335 throw new SystemException(e);
336 }
337 }
338
339 @BeanReference(name = "com.liferay.portlet.calendar.service.CalEventLocalService")
340 protected CalEventLocalService calEventLocalService;
341 @BeanReference(name = "com.liferay.portlet.calendar.service.CalEventService")
342 protected CalEventService calEventService;
343 @BeanReference(name = "com.liferay.portlet.calendar.service.persistence.CalEventPersistence")
344 protected CalEventPersistence calEventPersistence;
345 @BeanReference(name = "com.liferay.portlet.calendar.service.persistence.CalEventFinder")
346 protected CalEventFinder calEventFinder;
347 @BeanReference(name = "com.liferay.counter.service.CounterLocalService")
348 protected CounterLocalService counterLocalService;
349 @BeanReference(name = "com.liferay.counter.service.CounterService")
350 protected CounterService counterService;
351 @BeanReference(name = "com.liferay.mail.service.MailService")
352 protected MailService mailService;
353 @BeanReference(name = "com.liferay.portal.service.CompanyLocalService")
354 protected CompanyLocalService companyLocalService;
355 @BeanReference(name = "com.liferay.portal.service.CompanyService")
356 protected CompanyService companyService;
357 @BeanReference(name = "com.liferay.portal.service.persistence.CompanyPersistence")
358 protected CompanyPersistence companyPersistence;
359 @BeanReference(name = "com.liferay.portal.service.PortletPreferencesLocalService")
360 protected PortletPreferencesLocalService portletPreferencesLocalService;
361 @BeanReference(name = "com.liferay.portal.service.PortletPreferencesService")
362 protected PortletPreferencesService portletPreferencesService;
363 @BeanReference(name = "com.liferay.portal.service.persistence.PortletPreferencesPersistence")
364 protected PortletPreferencesPersistence portletPreferencesPersistence;
365 @BeanReference(name = "com.liferay.portal.service.persistence.PortletPreferencesFinder")
366 protected PortletPreferencesFinder portletPreferencesFinder;
367 @BeanReference(name = "com.liferay.portal.service.ResourceLocalService")
368 protected ResourceLocalService resourceLocalService;
369 @BeanReference(name = "com.liferay.portal.service.ResourceService")
370 protected ResourceService resourceService;
371 @BeanReference(name = "com.liferay.portal.service.persistence.ResourcePersistence")
372 protected ResourcePersistence resourcePersistence;
373 @BeanReference(name = "com.liferay.portal.service.persistence.ResourceFinder")
374 protected ResourceFinder resourceFinder;
375 @BeanReference(name = "com.liferay.portal.service.UserLocalService")
376 protected UserLocalService userLocalService;
377 @BeanReference(name = "com.liferay.portal.service.UserService")
378 protected UserService userService;
379 @BeanReference(name = "com.liferay.portal.service.persistence.UserPersistence")
380 protected UserPersistence userPersistence;
381 @BeanReference(name = "com.liferay.portal.service.persistence.UserFinder")
382 protected UserFinder userFinder;
383 @BeanReference(name = "com.liferay.portlet.social.service.SocialActivityLocalService")
384 protected SocialActivityLocalService socialActivityLocalService;
385 @BeanReference(name = "com.liferay.portlet.social.service.persistence.SocialActivityPersistence")
386 protected SocialActivityPersistence socialActivityPersistence;
387 @BeanReference(name = "com.liferay.portlet.social.service.persistence.SocialActivityFinder")
388 protected SocialActivityFinder socialActivityFinder;
389 }