1   /**
2    * Copyright (c) 2000-2009 Liferay, Inc. All rights reserved.
3    *
4    * Permission is hereby granted, free of charge, to any person obtaining a copy
5    * of this software and associated documentation files (the "Software"), to deal
6    * in the Software without restriction, including without limitation the rights
7    * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8    * copies of the Software, and to permit persons to whom the Software is
9    * furnished to do so, subject to the following conditions:
10   *
11   * The above copyright notice and this permission notice shall be included in
12   * all copies or substantial portions of the Software.
13   *
14   * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15   * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16   * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17   * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18   * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19   * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20   * SOFTWARE.
21   */
22  
23  package com.liferay.portlet.calendar.service.base;
24  
25  import com.liferay.counter.service.CounterLocalService;
26  import com.liferay.counter.service.CounterService;
27  
28  import com.liferay.mail.service.MailService;
29  
30  import com.liferay.portal.PortalException;
31  import com.liferay.portal.SystemException;
32  import com.liferay.portal.kernel.annotation.BeanReference;
33  import com.liferay.portal.kernel.dao.orm.DynamicQuery;
34  import com.liferay.portal.service.CompanyLocalService;
35  import com.liferay.portal.service.CompanyService;
36  import com.liferay.portal.service.PortletPreferencesLocalService;
37  import com.liferay.portal.service.PortletPreferencesService;
38  import com.liferay.portal.service.ResourceLocalService;
39  import com.liferay.portal.service.ResourceService;
40  import com.liferay.portal.service.UserLocalService;
41  import com.liferay.portal.service.UserService;
42  import com.liferay.portal.service.persistence.CompanyPersistence;
43  import com.liferay.portal.service.persistence.PortletPreferencesFinder;
44  import com.liferay.portal.service.persistence.PortletPreferencesPersistence;
45  import com.liferay.portal.service.persistence.ResourceFinder;
46  import com.liferay.portal.service.persistence.ResourcePersistence;
47  import com.liferay.portal.service.persistence.UserFinder;
48  import com.liferay.portal.service.persistence.UserPersistence;
49  import com.liferay.portal.util.PortalUtil;
50  
51  import com.liferay.portlet.calendar.model.CalEvent;
52  import com.liferay.portlet.calendar.service.CalEventLocalService;
53  import com.liferay.portlet.calendar.service.CalEventService;
54  import com.liferay.portlet.calendar.service.persistence.CalEventFinder;
55  import com.liferay.portlet.calendar.service.persistence.CalEventPersistence;
56  import com.liferay.portlet.expando.service.ExpandoValueLocalService;
57  import com.liferay.portlet.expando.service.ExpandoValueService;
58  import com.liferay.portlet.expando.service.persistence.ExpandoValuePersistence;
59  import com.liferay.portlet.social.service.SocialActivityLocalService;
60  import com.liferay.portlet.social.service.persistence.SocialActivityFinder;
61  import com.liferay.portlet.social.service.persistence.SocialActivityPersistence;
62  import com.liferay.portlet.tags.service.TagsAssetLocalService;
63  import com.liferay.portlet.tags.service.TagsAssetService;
64  import com.liferay.portlet.tags.service.TagsEntryLocalService;
65  import com.liferay.portlet.tags.service.TagsEntryService;
66  import com.liferay.portlet.tags.service.persistence.TagsAssetFinder;
67  import com.liferay.portlet.tags.service.persistence.TagsAssetPersistence;
68  import com.liferay.portlet.tags.service.persistence.TagsEntryFinder;
69  import com.liferay.portlet.tags.service.persistence.TagsEntryPersistence;
70  
71  import java.util.List;
72  
73  /**
74   * <a href="CalEventLocalServiceBaseImpl.java.html"><b><i>View Source</i></b></a>
75   *
76   * @author Brian Wing Shun Chan
77   *
78   */
79  public abstract class CalEventLocalServiceBaseImpl
80      implements CalEventLocalService {
81      public CalEvent addCalEvent(CalEvent calEvent) throws SystemException {
82          calEvent.setNew(true);
83  
84          return calEventPersistence.update(calEvent, false);
85      }
86  
87      public CalEvent createCalEvent(long eventId) {
88          return calEventPersistence.create(eventId);
89      }
90  
91      public void deleteCalEvent(long eventId)
92          throws PortalException, SystemException {
93          calEventPersistence.remove(eventId);
94      }
95  
96      public void deleteCalEvent(CalEvent calEvent) throws SystemException {
97          calEventPersistence.remove(calEvent);
98      }
99  
100     public List<Object> dynamicQuery(DynamicQuery dynamicQuery)
101         throws SystemException {
102         return calEventPersistence.findWithDynamicQuery(dynamicQuery);
103     }
104 
105     public List<Object> dynamicQuery(DynamicQuery dynamicQuery, int start,
106         int end) throws SystemException {
107         return calEventPersistence.findWithDynamicQuery(dynamicQuery, start, end);
108     }
109 
110     public CalEvent getCalEvent(long eventId)
111         throws PortalException, SystemException {
112         return calEventPersistence.findByPrimaryKey(eventId);
113     }
114 
115     public List<CalEvent> getCalEvents(int start, int end)
116         throws SystemException {
117         return calEventPersistence.findAll(start, end);
118     }
119 
120     public int getCalEventsCount() throws SystemException {
121         return calEventPersistence.countAll();
122     }
123 
124     public CalEvent updateCalEvent(CalEvent calEvent) throws SystemException {
125         calEvent.setNew(false);
126 
127         return calEventPersistence.update(calEvent, true);
128     }
129 
130     public CalEvent updateCalEvent(CalEvent calEvent, boolean merge)
131         throws SystemException {
132         calEvent.setNew(false);
133 
134         return calEventPersistence.update(calEvent, merge);
135     }
136 
137     public CalEventLocalService getCalEventLocalService() {
138         return calEventLocalService;
139     }
140 
141     public void setCalEventLocalService(
142         CalEventLocalService calEventLocalService) {
143         this.calEventLocalService = calEventLocalService;
144     }
145 
146     public CalEventService getCalEventService() {
147         return calEventService;
148     }
149 
150     public void setCalEventService(CalEventService calEventService) {
151         this.calEventService = calEventService;
152     }
153 
154     public CalEventPersistence getCalEventPersistence() {
155         return calEventPersistence;
156     }
157 
158     public void setCalEventPersistence(CalEventPersistence calEventPersistence) {
159         this.calEventPersistence = calEventPersistence;
160     }
161 
162     public CalEventFinder getCalEventFinder() {
163         return calEventFinder;
164     }
165 
166     public void setCalEventFinder(CalEventFinder calEventFinder) {
167         this.calEventFinder = calEventFinder;
168     }
169 
170     public CounterLocalService getCounterLocalService() {
171         return counterLocalService;
172     }
173 
174     public void setCounterLocalService(CounterLocalService counterLocalService) {
175         this.counterLocalService = counterLocalService;
176     }
177 
178     public CounterService getCounterService() {
179         return counterService;
180     }
181 
182     public void setCounterService(CounterService counterService) {
183         this.counterService = counterService;
184     }
185 
186     public MailService getMailService() {
187         return mailService;
188     }
189 
190     public void setMailService(MailService mailService) {
191         this.mailService = mailService;
192     }
193 
194     public CompanyLocalService getCompanyLocalService() {
195         return companyLocalService;
196     }
197 
198     public void setCompanyLocalService(CompanyLocalService companyLocalService) {
199         this.companyLocalService = companyLocalService;
200     }
201 
202     public CompanyService getCompanyService() {
203         return companyService;
204     }
205 
206     public void setCompanyService(CompanyService companyService) {
207         this.companyService = companyService;
208     }
209 
210     public CompanyPersistence getCompanyPersistence() {
211         return companyPersistence;
212     }
213 
214     public void setCompanyPersistence(CompanyPersistence companyPersistence) {
215         this.companyPersistence = companyPersistence;
216     }
217 
218     public PortletPreferencesLocalService getPortletPreferencesLocalService() {
219         return portletPreferencesLocalService;
220     }
221 
222     public void setPortletPreferencesLocalService(
223         PortletPreferencesLocalService portletPreferencesLocalService) {
224         this.portletPreferencesLocalService = portletPreferencesLocalService;
225     }
226 
227     public PortletPreferencesService getPortletPreferencesService() {
228         return portletPreferencesService;
229     }
230 
231     public void setPortletPreferencesService(
232         PortletPreferencesService portletPreferencesService) {
233         this.portletPreferencesService = portletPreferencesService;
234     }
235 
236     public PortletPreferencesPersistence getPortletPreferencesPersistence() {
237         return portletPreferencesPersistence;
238     }
239 
240     public void setPortletPreferencesPersistence(
241         PortletPreferencesPersistence portletPreferencesPersistence) {
242         this.portletPreferencesPersistence = portletPreferencesPersistence;
243     }
244 
245     public PortletPreferencesFinder getPortletPreferencesFinder() {
246         return portletPreferencesFinder;
247     }
248 
249     public void setPortletPreferencesFinder(
250         PortletPreferencesFinder portletPreferencesFinder) {
251         this.portletPreferencesFinder = portletPreferencesFinder;
252     }
253 
254     public ResourceLocalService getResourceLocalService() {
255         return resourceLocalService;
256     }
257 
258     public void setResourceLocalService(
259         ResourceLocalService resourceLocalService) {
260         this.resourceLocalService = resourceLocalService;
261     }
262 
263     public ResourceService getResourceService() {
264         return resourceService;
265     }
266 
267     public void setResourceService(ResourceService resourceService) {
268         this.resourceService = resourceService;
269     }
270 
271     public ResourcePersistence getResourcePersistence() {
272         return resourcePersistence;
273     }
274 
275     public void setResourcePersistence(ResourcePersistence resourcePersistence) {
276         this.resourcePersistence = resourcePersistence;
277     }
278 
279     public ResourceFinder getResourceFinder() {
280         return resourceFinder;
281     }
282 
283     public void setResourceFinder(ResourceFinder resourceFinder) {
284         this.resourceFinder = resourceFinder;
285     }
286 
287     public ExpandoValueLocalService getExpandoValueLocalService() {
288         return expandoValueLocalService;
289     }
290 
291     public void setExpandoValueLocalService(
292         ExpandoValueLocalService expandoValueLocalService) {
293         this.expandoValueLocalService = expandoValueLocalService;
294     }
295 
296     public ExpandoValueService getExpandoValueService() {
297         return expandoValueService;
298     }
299 
300     public void setExpandoValueService(ExpandoValueService expandoValueService) {
301         this.expandoValueService = expandoValueService;
302     }
303 
304     public ExpandoValuePersistence getExpandoValuePersistence() {
305         return expandoValuePersistence;
306     }
307 
308     public void setExpandoValuePersistence(
309         ExpandoValuePersistence expandoValuePersistence) {
310         this.expandoValuePersistence = expandoValuePersistence;
311     }
312 
313     public SocialActivityLocalService getSocialActivityLocalService() {
314         return socialActivityLocalService;
315     }
316 
317     public void setSocialActivityLocalService(
318         SocialActivityLocalService socialActivityLocalService) {
319         this.socialActivityLocalService = socialActivityLocalService;
320     }
321 
322     public SocialActivityPersistence getSocialActivityPersistence() {
323         return socialActivityPersistence;
324     }
325 
326     public void setSocialActivityPersistence(
327         SocialActivityPersistence socialActivityPersistence) {
328         this.socialActivityPersistence = socialActivityPersistence;
329     }
330 
331     public SocialActivityFinder getSocialActivityFinder() {
332         return socialActivityFinder;
333     }
334 
335     public void setSocialActivityFinder(
336         SocialActivityFinder socialActivityFinder) {
337         this.socialActivityFinder = socialActivityFinder;
338     }
339 
340     public TagsAssetLocalService getTagsAssetLocalService() {
341         return tagsAssetLocalService;
342     }
343 
344     public void setTagsAssetLocalService(
345         TagsAssetLocalService tagsAssetLocalService) {
346         this.tagsAssetLocalService = tagsAssetLocalService;
347     }
348 
349     public TagsAssetService getTagsAssetService() {
350         return tagsAssetService;
351     }
352 
353     public void setTagsAssetService(TagsAssetService tagsAssetService) {
354         this.tagsAssetService = tagsAssetService;
355     }
356 
357     public TagsAssetPersistence getTagsAssetPersistence() {
358         return tagsAssetPersistence;
359     }
360 
361     public void setTagsAssetPersistence(
362         TagsAssetPersistence tagsAssetPersistence) {
363         this.tagsAssetPersistence = tagsAssetPersistence;
364     }
365 
366     public TagsAssetFinder getTagsAssetFinder() {
367         return tagsAssetFinder;
368     }
369 
370     public void setTagsAssetFinder(TagsAssetFinder tagsAssetFinder) {
371         this.tagsAssetFinder = tagsAssetFinder;
372     }
373 
374     public TagsEntryLocalService getTagsEntryLocalService() {
375         return tagsEntryLocalService;
376     }
377 
378     public void setTagsEntryLocalService(
379         TagsEntryLocalService tagsEntryLocalService) {
380         this.tagsEntryLocalService = tagsEntryLocalService;
381     }
382 
383     public TagsEntryService getTagsEntryService() {
384         return tagsEntryService;
385     }
386 
387     public void setTagsEntryService(TagsEntryService tagsEntryService) {
388         this.tagsEntryService = tagsEntryService;
389     }
390 
391     public TagsEntryPersistence getTagsEntryPersistence() {
392         return tagsEntryPersistence;
393     }
394 
395     public void setTagsEntryPersistence(
396         TagsEntryPersistence tagsEntryPersistence) {
397         this.tagsEntryPersistence = tagsEntryPersistence;
398     }
399 
400     public TagsEntryFinder getTagsEntryFinder() {
401         return tagsEntryFinder;
402     }
403 
404     public void setTagsEntryFinder(TagsEntryFinder tagsEntryFinder) {
405         this.tagsEntryFinder = tagsEntryFinder;
406     }
407 
408     public UserLocalService getUserLocalService() {
409         return userLocalService;
410     }
411 
412     public void setUserLocalService(UserLocalService userLocalService) {
413         this.userLocalService = userLocalService;
414     }
415 
416     public UserService getUserService() {
417         return userService;
418     }
419 
420     public void setUserService(UserService userService) {
421         this.userService = userService;
422     }
423 
424     public UserPersistence getUserPersistence() {
425         return userPersistence;
426     }
427 
428     public void setUserPersistence(UserPersistence userPersistence) {
429         this.userPersistence = userPersistence;
430     }
431 
432     public UserFinder getUserFinder() {
433         return userFinder;
434     }
435 
436     public void setUserFinder(UserFinder userFinder) {
437         this.userFinder = userFinder;
438     }
439 
440     protected void runSQL(String sql) throws SystemException {
441         try {
442             PortalUtil.runSQL(sql);
443         }
444         catch (Exception e) {
445             throw new SystemException(e);
446         }
447     }
448 
449     @BeanReference(name = "com.liferay.portlet.calendar.service.CalEventLocalService.impl")
450     protected CalEventLocalService calEventLocalService;
451     @BeanReference(name = "com.liferay.portlet.calendar.service.CalEventService.impl")
452     protected CalEventService calEventService;
453     @BeanReference(name = "com.liferay.portlet.calendar.service.persistence.CalEventPersistence.impl")
454     protected CalEventPersistence calEventPersistence;
455     @BeanReference(name = "com.liferay.portlet.calendar.service.persistence.CalEventFinder.impl")
456     protected CalEventFinder calEventFinder;
457     @BeanReference(name = "com.liferay.counter.service.CounterLocalService.impl")
458     protected CounterLocalService counterLocalService;
459     @BeanReference(name = "com.liferay.counter.service.CounterService.impl")
460     protected CounterService counterService;
461     @BeanReference(name = "com.liferay.mail.service.MailService.impl")
462     protected MailService mailService;
463     @BeanReference(name = "com.liferay.portal.service.CompanyLocalService.impl")
464     protected CompanyLocalService companyLocalService;
465     @BeanReference(name = "com.liferay.portal.service.CompanyService.impl")
466     protected CompanyService companyService;
467     @BeanReference(name = "com.liferay.portal.service.persistence.CompanyPersistence.impl")
468     protected CompanyPersistence companyPersistence;
469     @BeanReference(name = "com.liferay.portal.service.PortletPreferencesLocalService.impl")
470     protected PortletPreferencesLocalService portletPreferencesLocalService;
471     @BeanReference(name = "com.liferay.portal.service.PortletPreferencesService.impl")
472     protected PortletPreferencesService portletPreferencesService;
473     @BeanReference(name = "com.liferay.portal.service.persistence.PortletPreferencesPersistence.impl")
474     protected PortletPreferencesPersistence portletPreferencesPersistence;
475     @BeanReference(name = "com.liferay.portal.service.persistence.PortletPreferencesFinder.impl")
476     protected PortletPreferencesFinder portletPreferencesFinder;
477     @BeanReference(name = "com.liferay.portal.service.ResourceLocalService.impl")
478     protected ResourceLocalService resourceLocalService;
479     @BeanReference(name = "com.liferay.portal.service.ResourceService.impl")
480     protected ResourceService resourceService;
481     @BeanReference(name = "com.liferay.portal.service.persistence.ResourcePersistence.impl")
482     protected ResourcePersistence resourcePersistence;
483     @BeanReference(name = "com.liferay.portal.service.persistence.ResourceFinder.impl")
484     protected ResourceFinder resourceFinder;
485     @BeanReference(name = "com.liferay.portlet.expando.service.ExpandoValueLocalService.impl")
486     protected ExpandoValueLocalService expandoValueLocalService;
487     @BeanReference(name = "com.liferay.portlet.expando.service.ExpandoValueService.impl")
488     protected ExpandoValueService expandoValueService;
489     @BeanReference(name = "com.liferay.portlet.expando.service.persistence.ExpandoValuePersistence.impl")
490     protected ExpandoValuePersistence expandoValuePersistence;
491     @BeanReference(name = "com.liferay.portlet.social.service.SocialActivityLocalService.impl")
492     protected SocialActivityLocalService socialActivityLocalService;
493     @BeanReference(name = "com.liferay.portlet.social.service.persistence.SocialActivityPersistence.impl")
494     protected SocialActivityPersistence socialActivityPersistence;
495     @BeanReference(name = "com.liferay.portlet.social.service.persistence.SocialActivityFinder.impl")
496     protected SocialActivityFinder socialActivityFinder;
497     @BeanReference(name = "com.liferay.portlet.tags.service.TagsAssetLocalService.impl")
498     protected TagsAssetLocalService tagsAssetLocalService;
499     @BeanReference(name = "com.liferay.portlet.tags.service.TagsAssetService.impl")
500     protected TagsAssetService tagsAssetService;
501     @BeanReference(name = "com.liferay.portlet.tags.service.persistence.TagsAssetPersistence.impl")
502     protected TagsAssetPersistence tagsAssetPersistence;
503     @BeanReference(name = "com.liferay.portlet.tags.service.persistence.TagsAssetFinder.impl")
504     protected TagsAssetFinder tagsAssetFinder;
505     @BeanReference(name = "com.liferay.portlet.tags.service.TagsEntryLocalService.impl")
506     protected TagsEntryLocalService tagsEntryLocalService;
507     @BeanReference(name = "com.liferay.portlet.tags.service.TagsEntryService.impl")
508     protected TagsEntryService tagsEntryService;
509     @BeanReference(name = "com.liferay.portlet.tags.service.persistence.TagsEntryPersistence.impl")
510     protected TagsEntryPersistence tagsEntryPersistence;
511     @BeanReference(name = "com.liferay.portlet.tags.service.persistence.TagsEntryFinder.impl")
512     protected TagsEntryFinder tagsEntryFinder;
513     @BeanReference(name = "com.liferay.portal.service.UserLocalService.impl")
514     protected UserLocalService userLocalService;
515     @BeanReference(name = "com.liferay.portal.service.UserService.impl")
516     protected UserService userService;
517     @BeanReference(name = "com.liferay.portal.service.persistence.UserPersistence.impl")
518     protected UserPersistence userPersistence;
519     @BeanReference(name = "com.liferay.portal.service.persistence.UserFinder.impl")
520     protected UserFinder userFinder;
521 }