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