1   /**
2    * Copyright (c) 2000-2009 Liferay, Inc. All rights reserved.
3    *
4    *
5    *
6    *
7    * The contents of this file are subject to the terms of the Liferay Enterprise
8    * Subscription License ("License"). You may not use this file except in
9    * compliance with the License. You can obtain a copy of the License by
10   * contacting Liferay, Inc. See the License for the specific language governing
11   * permissions and limitations under the License, including but not limited to
12   * distribution rights 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.announcements.service.base;
24  
25  import com.liferay.counter.service.CounterLocalService;
26  import com.liferay.counter.service.CounterService;
27  
28  import com.liferay.portal.PortalException;
29  import com.liferay.portal.SystemException;
30  import com.liferay.portal.kernel.annotation.BeanReference;
31  import com.liferay.portal.kernel.dao.orm.DynamicQuery;
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.ResourceFinder;
37  import com.liferay.portal.service.persistence.ResourcePersistence;
38  import com.liferay.portal.service.persistence.UserFinder;
39  import com.liferay.portal.service.persistence.UserPersistence;
40  import com.liferay.portal.util.PortalUtil;
41  
42  import com.liferay.portlet.announcements.model.AnnouncementsDelivery;
43  import com.liferay.portlet.announcements.service.AnnouncementsDeliveryLocalService;
44  import com.liferay.portlet.announcements.service.AnnouncementsDeliveryService;
45  import com.liferay.portlet.announcements.service.AnnouncementsEntryLocalService;
46  import com.liferay.portlet.announcements.service.AnnouncementsEntryService;
47  import com.liferay.portlet.announcements.service.AnnouncementsFlagLocalService;
48  import com.liferay.portlet.announcements.service.AnnouncementsFlagService;
49  import com.liferay.portlet.announcements.service.persistence.AnnouncementsDeliveryPersistence;
50  import com.liferay.portlet.announcements.service.persistence.AnnouncementsEntryFinder;
51  import com.liferay.portlet.announcements.service.persistence.AnnouncementsEntryPersistence;
52  import com.liferay.portlet.announcements.service.persistence.AnnouncementsFlagPersistence;
53  
54  import java.util.List;
55  
56  /**
57   * <a href="AnnouncementsDeliveryLocalServiceBaseImpl.java.html"><b><i>View
58   * Source</i></b></a>
59   *
60   * @author Brian Wing Shun Chan
61   */
62  public abstract class AnnouncementsDeliveryLocalServiceBaseImpl
63      implements AnnouncementsDeliveryLocalService {
64      public AnnouncementsDelivery addAnnouncementsDelivery(
65          AnnouncementsDelivery announcementsDelivery) throws SystemException {
66          announcementsDelivery.setNew(true);
67  
68          return announcementsDeliveryPersistence.update(announcementsDelivery,
69              false);
70      }
71  
72      public AnnouncementsDelivery createAnnouncementsDelivery(long deliveryId) {
73          return announcementsDeliveryPersistence.create(deliveryId);
74      }
75  
76      public void deleteAnnouncementsDelivery(long deliveryId)
77          throws PortalException, SystemException {
78          announcementsDeliveryPersistence.remove(deliveryId);
79      }
80  
81      public void deleteAnnouncementsDelivery(
82          AnnouncementsDelivery announcementsDelivery) throws SystemException {
83          announcementsDeliveryPersistence.remove(announcementsDelivery);
84      }
85  
86      public List<Object> dynamicQuery(DynamicQuery dynamicQuery)
87          throws SystemException {
88          return announcementsDeliveryPersistence.findWithDynamicQuery(dynamicQuery);
89      }
90  
91      public List<Object> dynamicQuery(DynamicQuery dynamicQuery, int start,
92          int end) throws SystemException {
93          return announcementsDeliveryPersistence.findWithDynamicQuery(dynamicQuery,
94              start, end);
95      }
96  
97      public AnnouncementsDelivery getAnnouncementsDelivery(long deliveryId)
98          throws PortalException, SystemException {
99          return announcementsDeliveryPersistence.findByPrimaryKey(deliveryId);
100     }
101 
102     public List<AnnouncementsDelivery> getAnnouncementsDeliveries(int start,
103         int end) throws SystemException {
104         return announcementsDeliveryPersistence.findAll(start, end);
105     }
106 
107     public int getAnnouncementsDeliveriesCount() throws SystemException {
108         return announcementsDeliveryPersistence.countAll();
109     }
110 
111     public AnnouncementsDelivery updateAnnouncementsDelivery(
112         AnnouncementsDelivery announcementsDelivery) throws SystemException {
113         announcementsDelivery.setNew(false);
114 
115         return announcementsDeliveryPersistence.update(announcementsDelivery,
116             true);
117     }
118 
119     public AnnouncementsDelivery updateAnnouncementsDelivery(
120         AnnouncementsDelivery announcementsDelivery, boolean merge)
121         throws SystemException {
122         announcementsDelivery.setNew(false);
123 
124         return announcementsDeliveryPersistence.update(announcementsDelivery,
125             merge);
126     }
127 
128     public AnnouncementsDeliveryLocalService getAnnouncementsDeliveryLocalService() {
129         return announcementsDeliveryLocalService;
130     }
131 
132     public void setAnnouncementsDeliveryLocalService(
133         AnnouncementsDeliveryLocalService announcementsDeliveryLocalService) {
134         this.announcementsDeliveryLocalService = announcementsDeliveryLocalService;
135     }
136 
137     public AnnouncementsDeliveryService getAnnouncementsDeliveryService() {
138         return announcementsDeliveryService;
139     }
140 
141     public void setAnnouncementsDeliveryService(
142         AnnouncementsDeliveryService announcementsDeliveryService) {
143         this.announcementsDeliveryService = announcementsDeliveryService;
144     }
145 
146     public AnnouncementsDeliveryPersistence getAnnouncementsDeliveryPersistence() {
147         return announcementsDeliveryPersistence;
148     }
149 
150     public void setAnnouncementsDeliveryPersistence(
151         AnnouncementsDeliveryPersistence announcementsDeliveryPersistence) {
152         this.announcementsDeliveryPersistence = announcementsDeliveryPersistence;
153     }
154 
155     public AnnouncementsEntryLocalService getAnnouncementsEntryLocalService() {
156         return announcementsEntryLocalService;
157     }
158 
159     public void setAnnouncementsEntryLocalService(
160         AnnouncementsEntryLocalService announcementsEntryLocalService) {
161         this.announcementsEntryLocalService = announcementsEntryLocalService;
162     }
163 
164     public AnnouncementsEntryService getAnnouncementsEntryService() {
165         return announcementsEntryService;
166     }
167 
168     public void setAnnouncementsEntryService(
169         AnnouncementsEntryService announcementsEntryService) {
170         this.announcementsEntryService = announcementsEntryService;
171     }
172 
173     public AnnouncementsEntryPersistence getAnnouncementsEntryPersistence() {
174         return announcementsEntryPersistence;
175     }
176 
177     public void setAnnouncementsEntryPersistence(
178         AnnouncementsEntryPersistence announcementsEntryPersistence) {
179         this.announcementsEntryPersistence = announcementsEntryPersistence;
180     }
181 
182     public AnnouncementsEntryFinder getAnnouncementsEntryFinder() {
183         return announcementsEntryFinder;
184     }
185 
186     public void setAnnouncementsEntryFinder(
187         AnnouncementsEntryFinder announcementsEntryFinder) {
188         this.announcementsEntryFinder = announcementsEntryFinder;
189     }
190 
191     public AnnouncementsFlagLocalService getAnnouncementsFlagLocalService() {
192         return announcementsFlagLocalService;
193     }
194 
195     public void setAnnouncementsFlagLocalService(
196         AnnouncementsFlagLocalService announcementsFlagLocalService) {
197         this.announcementsFlagLocalService = announcementsFlagLocalService;
198     }
199 
200     public AnnouncementsFlagService getAnnouncementsFlagService() {
201         return announcementsFlagService;
202     }
203 
204     public void setAnnouncementsFlagService(
205         AnnouncementsFlagService announcementsFlagService) {
206         this.announcementsFlagService = announcementsFlagService;
207     }
208 
209     public AnnouncementsFlagPersistence getAnnouncementsFlagPersistence() {
210         return announcementsFlagPersistence;
211     }
212 
213     public void setAnnouncementsFlagPersistence(
214         AnnouncementsFlagPersistence announcementsFlagPersistence) {
215         this.announcementsFlagPersistence = announcementsFlagPersistence;
216     }
217 
218     public CounterLocalService getCounterLocalService() {
219         return counterLocalService;
220     }
221 
222     public void setCounterLocalService(CounterLocalService counterLocalService) {
223         this.counterLocalService = counterLocalService;
224     }
225 
226     public CounterService getCounterService() {
227         return counterService;
228     }
229 
230     public void setCounterService(CounterService counterService) {
231         this.counterService = counterService;
232     }
233 
234     public ResourceLocalService getResourceLocalService() {
235         return resourceLocalService;
236     }
237 
238     public void setResourceLocalService(
239         ResourceLocalService resourceLocalService) {
240         this.resourceLocalService = resourceLocalService;
241     }
242 
243     public ResourceService getResourceService() {
244         return resourceService;
245     }
246 
247     public void setResourceService(ResourceService resourceService) {
248         this.resourceService = resourceService;
249     }
250 
251     public ResourcePersistence getResourcePersistence() {
252         return resourcePersistence;
253     }
254 
255     public void setResourcePersistence(ResourcePersistence resourcePersistence) {
256         this.resourcePersistence = resourcePersistence;
257     }
258 
259     public ResourceFinder getResourceFinder() {
260         return resourceFinder;
261     }
262 
263     public void setResourceFinder(ResourceFinder resourceFinder) {
264         this.resourceFinder = resourceFinder;
265     }
266 
267     public UserLocalService getUserLocalService() {
268         return userLocalService;
269     }
270 
271     public void setUserLocalService(UserLocalService userLocalService) {
272         this.userLocalService = userLocalService;
273     }
274 
275     public UserService getUserService() {
276         return userService;
277     }
278 
279     public void setUserService(UserService userService) {
280         this.userService = userService;
281     }
282 
283     public UserPersistence getUserPersistence() {
284         return userPersistence;
285     }
286 
287     public void setUserPersistence(UserPersistence userPersistence) {
288         this.userPersistence = userPersistence;
289     }
290 
291     public UserFinder getUserFinder() {
292         return userFinder;
293     }
294 
295     public void setUserFinder(UserFinder userFinder) {
296         this.userFinder = userFinder;
297     }
298 
299     protected void runSQL(String sql) throws SystemException {
300         try {
301             PortalUtil.runSQL(sql);
302         }
303         catch (Exception e) {
304             throw new SystemException(e);
305         }
306     }
307 
308     @BeanReference(name = "com.liferay.portlet.announcements.service.AnnouncementsDeliveryLocalService.impl")
309     protected AnnouncementsDeliveryLocalService announcementsDeliveryLocalService;
310     @BeanReference(name = "com.liferay.portlet.announcements.service.AnnouncementsDeliveryService.impl")
311     protected AnnouncementsDeliveryService announcementsDeliveryService;
312     @BeanReference(name = "com.liferay.portlet.announcements.service.persistence.AnnouncementsDeliveryPersistence.impl")
313     protected AnnouncementsDeliveryPersistence announcementsDeliveryPersistence;
314     @BeanReference(name = "com.liferay.portlet.announcements.service.AnnouncementsEntryLocalService.impl")
315     protected AnnouncementsEntryLocalService announcementsEntryLocalService;
316     @BeanReference(name = "com.liferay.portlet.announcements.service.AnnouncementsEntryService.impl")
317     protected AnnouncementsEntryService announcementsEntryService;
318     @BeanReference(name = "com.liferay.portlet.announcements.service.persistence.AnnouncementsEntryPersistence.impl")
319     protected AnnouncementsEntryPersistence announcementsEntryPersistence;
320     @BeanReference(name = "com.liferay.portlet.announcements.service.persistence.AnnouncementsEntryFinder.impl")
321     protected AnnouncementsEntryFinder announcementsEntryFinder;
322     @BeanReference(name = "com.liferay.portlet.announcements.service.AnnouncementsFlagLocalService.impl")
323     protected AnnouncementsFlagLocalService announcementsFlagLocalService;
324     @BeanReference(name = "com.liferay.portlet.announcements.service.AnnouncementsFlagService.impl")
325     protected AnnouncementsFlagService announcementsFlagService;
326     @BeanReference(name = "com.liferay.portlet.announcements.service.persistence.AnnouncementsFlagPersistence.impl")
327     protected AnnouncementsFlagPersistence announcementsFlagPersistence;
328     @BeanReference(name = "com.liferay.counter.service.CounterLocalService.impl")
329     protected CounterLocalService counterLocalService;
330     @BeanReference(name = "com.liferay.counter.service.CounterService.impl")
331     protected CounterService counterService;
332     @BeanReference(name = "com.liferay.portal.service.ResourceLocalService.impl")
333     protected ResourceLocalService resourceLocalService;
334     @BeanReference(name = "com.liferay.portal.service.ResourceService.impl")
335     protected ResourceService resourceService;
336     @BeanReference(name = "com.liferay.portal.service.persistence.ResourcePersistence.impl")
337     protected ResourcePersistence resourcePersistence;
338     @BeanReference(name = "com.liferay.portal.service.persistence.ResourceFinder.impl")
339     protected ResourceFinder resourceFinder;
340     @BeanReference(name = "com.liferay.portal.service.UserLocalService.impl")
341     protected UserLocalService userLocalService;
342     @BeanReference(name = "com.liferay.portal.service.UserService.impl")
343     protected UserService userService;
344     @BeanReference(name = "com.liferay.portal.service.persistence.UserPersistence.impl")
345     protected UserPersistence userPersistence;
346     @BeanReference(name = "com.liferay.portal.service.persistence.UserFinder.impl")
347     protected UserFinder userFinder;
348 }