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