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