1   /**
2    * Copyright (c) 2000-2010 Liferay, Inc. All rights reserved.
3    *
4    * This library is free software; you can redistribute it and/or modify it under
5    * the terms of the GNU Lesser General Public License as published by the Free
6    * Software Foundation; either version 2.1 of the License, or (at your option)
7    * any later version.
8    *
9    * This library is distributed in the hope that it will be useful, but WITHOUT
10   * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
11   * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
12   * details.
13   */
14  
15  package com.liferay.portlet.softwarecatalog.service.base;
16  
17  import com.liferay.counter.service.CounterLocalService;
18  import com.liferay.counter.service.CounterService;
19  
20  import com.liferay.portal.kernel.annotation.BeanReference;
21  import com.liferay.portal.kernel.dao.db.DB;
22  import com.liferay.portal.kernel.dao.db.DBFactoryUtil;
23  import com.liferay.portal.kernel.dao.orm.DynamicQuery;
24  import com.liferay.portal.kernel.exception.PortalException;
25  import com.liferay.portal.kernel.exception.SystemException;
26  import com.liferay.portal.service.ImageLocalService;
27  import com.liferay.portal.service.ResourceLocalService;
28  import com.liferay.portal.service.ResourceService;
29  import com.liferay.portal.service.UserLocalService;
30  import com.liferay.portal.service.UserService;
31  import com.liferay.portal.service.persistence.ImagePersistence;
32  import com.liferay.portal.service.persistence.ResourceFinder;
33  import com.liferay.portal.service.persistence.ResourcePersistence;
34  import com.liferay.portal.service.persistence.UserFinder;
35  import com.liferay.portal.service.persistence.UserPersistence;
36  
37  import com.liferay.portlet.softwarecatalog.model.SCProductScreenshot;
38  import com.liferay.portlet.softwarecatalog.service.SCFrameworkVersionLocalService;
39  import com.liferay.portlet.softwarecatalog.service.SCFrameworkVersionService;
40  import com.liferay.portlet.softwarecatalog.service.SCLicenseLocalService;
41  import com.liferay.portlet.softwarecatalog.service.SCLicenseService;
42  import com.liferay.portlet.softwarecatalog.service.SCProductEntryLocalService;
43  import com.liferay.portlet.softwarecatalog.service.SCProductEntryService;
44  import com.liferay.portlet.softwarecatalog.service.SCProductScreenshotLocalService;
45  import com.liferay.portlet.softwarecatalog.service.SCProductVersionLocalService;
46  import com.liferay.portlet.softwarecatalog.service.SCProductVersionService;
47  import com.liferay.portlet.softwarecatalog.service.persistence.SCFrameworkVersionPersistence;
48  import com.liferay.portlet.softwarecatalog.service.persistence.SCLicensePersistence;
49  import com.liferay.portlet.softwarecatalog.service.persistence.SCProductEntryPersistence;
50  import com.liferay.portlet.softwarecatalog.service.persistence.SCProductScreenshotPersistence;
51  import com.liferay.portlet.softwarecatalog.service.persistence.SCProductVersionPersistence;
52  
53  import java.util.List;
54  
55  /**
56   * <a href="SCProductScreenshotLocalServiceBaseImpl.java.html"><b><i>View Source
57   * </i></b></a>
58   *
59   * @author Brian Wing Shun Chan
60   */
61  public abstract class SCProductScreenshotLocalServiceBaseImpl
62      implements SCProductScreenshotLocalService {
63      public SCProductScreenshot addSCProductScreenshot(
64          SCProductScreenshot scProductScreenshot) throws SystemException {
65          scProductScreenshot.setNew(true);
66  
67          return scProductScreenshotPersistence.update(scProductScreenshot, false);
68      }
69  
70      public SCProductScreenshot createSCProductScreenshot(
71          long productScreenshotId) {
72          return scProductScreenshotPersistence.create(productScreenshotId);
73      }
74  
75      public void deleteSCProductScreenshot(long productScreenshotId)
76          throws PortalException, SystemException {
77          scProductScreenshotPersistence.remove(productScreenshotId);
78      }
79  
80      public void deleteSCProductScreenshot(
81          SCProductScreenshot scProductScreenshot) throws SystemException {
82          scProductScreenshotPersistence.remove(scProductScreenshot);
83      }
84  
85      public List<Object> dynamicQuery(DynamicQuery dynamicQuery)
86          throws SystemException {
87          return scProductScreenshotPersistence.findWithDynamicQuery(dynamicQuery);
88      }
89  
90      public List<Object> dynamicQuery(DynamicQuery dynamicQuery, int start,
91          int end) throws SystemException {
92          return scProductScreenshotPersistence.findWithDynamicQuery(dynamicQuery,
93              start, end);
94      }
95  
96      public SCProductScreenshot getSCProductScreenshot(long productScreenshotId)
97          throws PortalException, SystemException {
98          return scProductScreenshotPersistence.findByPrimaryKey(productScreenshotId);
99      }
100 
101     public List<SCProductScreenshot> getSCProductScreenshots(int start, int end)
102         throws SystemException {
103         return scProductScreenshotPersistence.findAll(start, end);
104     }
105 
106     public int getSCProductScreenshotsCount() throws SystemException {
107         return scProductScreenshotPersistence.countAll();
108     }
109 
110     public SCProductScreenshot updateSCProductScreenshot(
111         SCProductScreenshot scProductScreenshot) throws SystemException {
112         scProductScreenshot.setNew(false);
113 
114         return scProductScreenshotPersistence.update(scProductScreenshot, true);
115     }
116 
117     public SCProductScreenshot updateSCProductScreenshot(
118         SCProductScreenshot scProductScreenshot, boolean merge)
119         throws SystemException {
120         scProductScreenshot.setNew(false);
121 
122         return scProductScreenshotPersistence.update(scProductScreenshot, merge);
123     }
124 
125     public SCLicenseLocalService getSCLicenseLocalService() {
126         return scLicenseLocalService;
127     }
128 
129     public void setSCLicenseLocalService(
130         SCLicenseLocalService scLicenseLocalService) {
131         this.scLicenseLocalService = scLicenseLocalService;
132     }
133 
134     public SCLicenseService getSCLicenseService() {
135         return scLicenseService;
136     }
137 
138     public void setSCLicenseService(SCLicenseService scLicenseService) {
139         this.scLicenseService = scLicenseService;
140     }
141 
142     public SCLicensePersistence getSCLicensePersistence() {
143         return scLicensePersistence;
144     }
145 
146     public void setSCLicensePersistence(
147         SCLicensePersistence scLicensePersistence) {
148         this.scLicensePersistence = scLicensePersistence;
149     }
150 
151     public SCFrameworkVersionLocalService getSCFrameworkVersionLocalService() {
152         return scFrameworkVersionLocalService;
153     }
154 
155     public void setSCFrameworkVersionLocalService(
156         SCFrameworkVersionLocalService scFrameworkVersionLocalService) {
157         this.scFrameworkVersionLocalService = scFrameworkVersionLocalService;
158     }
159 
160     public SCFrameworkVersionService getSCFrameworkVersionService() {
161         return scFrameworkVersionService;
162     }
163 
164     public void setSCFrameworkVersionService(
165         SCFrameworkVersionService scFrameworkVersionService) {
166         this.scFrameworkVersionService = scFrameworkVersionService;
167     }
168 
169     public SCFrameworkVersionPersistence getSCFrameworkVersionPersistence() {
170         return scFrameworkVersionPersistence;
171     }
172 
173     public void setSCFrameworkVersionPersistence(
174         SCFrameworkVersionPersistence scFrameworkVersionPersistence) {
175         this.scFrameworkVersionPersistence = scFrameworkVersionPersistence;
176     }
177 
178     public SCProductEntryLocalService getSCProductEntryLocalService() {
179         return scProductEntryLocalService;
180     }
181 
182     public void setSCProductEntryLocalService(
183         SCProductEntryLocalService scProductEntryLocalService) {
184         this.scProductEntryLocalService = scProductEntryLocalService;
185     }
186 
187     public SCProductEntryService getSCProductEntryService() {
188         return scProductEntryService;
189     }
190 
191     public void setSCProductEntryService(
192         SCProductEntryService scProductEntryService) {
193         this.scProductEntryService = scProductEntryService;
194     }
195 
196     public SCProductEntryPersistence getSCProductEntryPersistence() {
197         return scProductEntryPersistence;
198     }
199 
200     public void setSCProductEntryPersistence(
201         SCProductEntryPersistence scProductEntryPersistence) {
202         this.scProductEntryPersistence = scProductEntryPersistence;
203     }
204 
205     public SCProductScreenshotLocalService getSCProductScreenshotLocalService() {
206         return scProductScreenshotLocalService;
207     }
208 
209     public void setSCProductScreenshotLocalService(
210         SCProductScreenshotLocalService scProductScreenshotLocalService) {
211         this.scProductScreenshotLocalService = scProductScreenshotLocalService;
212     }
213 
214     public SCProductScreenshotPersistence getSCProductScreenshotPersistence() {
215         return scProductScreenshotPersistence;
216     }
217 
218     public void setSCProductScreenshotPersistence(
219         SCProductScreenshotPersistence scProductScreenshotPersistence) {
220         this.scProductScreenshotPersistence = scProductScreenshotPersistence;
221     }
222 
223     public SCProductVersionLocalService getSCProductVersionLocalService() {
224         return scProductVersionLocalService;
225     }
226 
227     public void setSCProductVersionLocalService(
228         SCProductVersionLocalService scProductVersionLocalService) {
229         this.scProductVersionLocalService = scProductVersionLocalService;
230     }
231 
232     public SCProductVersionService getSCProductVersionService() {
233         return scProductVersionService;
234     }
235 
236     public void setSCProductVersionService(
237         SCProductVersionService scProductVersionService) {
238         this.scProductVersionService = scProductVersionService;
239     }
240 
241     public SCProductVersionPersistence getSCProductVersionPersistence() {
242         return scProductVersionPersistence;
243     }
244 
245     public void setSCProductVersionPersistence(
246         SCProductVersionPersistence scProductVersionPersistence) {
247         this.scProductVersionPersistence = scProductVersionPersistence;
248     }
249 
250     public CounterLocalService getCounterLocalService() {
251         return counterLocalService;
252     }
253 
254     public void setCounterLocalService(CounterLocalService counterLocalService) {
255         this.counterLocalService = counterLocalService;
256     }
257 
258     public CounterService getCounterService() {
259         return counterService;
260     }
261 
262     public void setCounterService(CounterService counterService) {
263         this.counterService = counterService;
264     }
265 
266     public ImageLocalService getImageLocalService() {
267         return imageLocalService;
268     }
269 
270     public void setImageLocalService(ImageLocalService imageLocalService) {
271         this.imageLocalService = imageLocalService;
272     }
273 
274     public ImagePersistence getImagePersistence() {
275         return imagePersistence;
276     }
277 
278     public void setImagePersistence(ImagePersistence imagePersistence) {
279         this.imagePersistence = imagePersistence;
280     }
281 
282     public ResourceLocalService getResourceLocalService() {
283         return resourceLocalService;
284     }
285 
286     public void setResourceLocalService(
287         ResourceLocalService resourceLocalService) {
288         this.resourceLocalService = resourceLocalService;
289     }
290 
291     public ResourceService getResourceService() {
292         return resourceService;
293     }
294 
295     public void setResourceService(ResourceService resourceService) {
296         this.resourceService = resourceService;
297     }
298 
299     public ResourcePersistence getResourcePersistence() {
300         return resourcePersistence;
301     }
302 
303     public void setResourcePersistence(ResourcePersistence resourcePersistence) {
304         this.resourcePersistence = resourcePersistence;
305     }
306 
307     public ResourceFinder getResourceFinder() {
308         return resourceFinder;
309     }
310 
311     public void setResourceFinder(ResourceFinder resourceFinder) {
312         this.resourceFinder = resourceFinder;
313     }
314 
315     public UserLocalService getUserLocalService() {
316         return userLocalService;
317     }
318 
319     public void setUserLocalService(UserLocalService userLocalService) {
320         this.userLocalService = userLocalService;
321     }
322 
323     public UserService getUserService() {
324         return userService;
325     }
326 
327     public void setUserService(UserService userService) {
328         this.userService = userService;
329     }
330 
331     public UserPersistence getUserPersistence() {
332         return userPersistence;
333     }
334 
335     public void setUserPersistence(UserPersistence userPersistence) {
336         this.userPersistence = userPersistence;
337     }
338 
339     public UserFinder getUserFinder() {
340         return userFinder;
341     }
342 
343     public void setUserFinder(UserFinder userFinder) {
344         this.userFinder = userFinder;
345     }
346 
347     protected void runSQL(String sql) throws SystemException {
348         try {
349             DB db = DBFactoryUtil.getDB();
350 
351             db.runSQL(sql);
352         }
353         catch (Exception e) {
354             throw new SystemException(e);
355         }
356     }
357 
358     @BeanReference(name = "com.liferay.portlet.softwarecatalog.service.SCLicenseLocalService")
359     protected SCLicenseLocalService scLicenseLocalService;
360     @BeanReference(name = "com.liferay.portlet.softwarecatalog.service.SCLicenseService")
361     protected SCLicenseService scLicenseService;
362     @BeanReference(name = "com.liferay.portlet.softwarecatalog.service.persistence.SCLicensePersistence")
363     protected SCLicensePersistence scLicensePersistence;
364     @BeanReference(name = "com.liferay.portlet.softwarecatalog.service.SCFrameworkVersionLocalService")
365     protected SCFrameworkVersionLocalService scFrameworkVersionLocalService;
366     @BeanReference(name = "com.liferay.portlet.softwarecatalog.service.SCFrameworkVersionService")
367     protected SCFrameworkVersionService scFrameworkVersionService;
368     @BeanReference(name = "com.liferay.portlet.softwarecatalog.service.persistence.SCFrameworkVersionPersistence")
369     protected SCFrameworkVersionPersistence scFrameworkVersionPersistence;
370     @BeanReference(name = "com.liferay.portlet.softwarecatalog.service.SCProductEntryLocalService")
371     protected SCProductEntryLocalService scProductEntryLocalService;
372     @BeanReference(name = "com.liferay.portlet.softwarecatalog.service.SCProductEntryService")
373     protected SCProductEntryService scProductEntryService;
374     @BeanReference(name = "com.liferay.portlet.softwarecatalog.service.persistence.SCProductEntryPersistence")
375     protected SCProductEntryPersistence scProductEntryPersistence;
376     @BeanReference(name = "com.liferay.portlet.softwarecatalog.service.SCProductScreenshotLocalService")
377     protected SCProductScreenshotLocalService scProductScreenshotLocalService;
378     @BeanReference(name = "com.liferay.portlet.softwarecatalog.service.persistence.SCProductScreenshotPersistence")
379     protected SCProductScreenshotPersistence scProductScreenshotPersistence;
380     @BeanReference(name = "com.liferay.portlet.softwarecatalog.service.SCProductVersionLocalService")
381     protected SCProductVersionLocalService scProductVersionLocalService;
382     @BeanReference(name = "com.liferay.portlet.softwarecatalog.service.SCProductVersionService")
383     protected SCProductVersionService scProductVersionService;
384     @BeanReference(name = "com.liferay.portlet.softwarecatalog.service.persistence.SCProductVersionPersistence")
385     protected SCProductVersionPersistence scProductVersionPersistence;
386     @BeanReference(name = "com.liferay.counter.service.CounterLocalService")
387     protected CounterLocalService counterLocalService;
388     @BeanReference(name = "com.liferay.counter.service.CounterService")
389     protected CounterService counterService;
390     @BeanReference(name = "com.liferay.portal.service.ImageLocalService")
391     protected ImageLocalService imageLocalService;
392     @BeanReference(name = "com.liferay.portal.service.persistence.ImagePersistence")
393     protected ImagePersistence imagePersistence;
394     @BeanReference(name = "com.liferay.portal.service.ResourceLocalService")
395     protected ResourceLocalService resourceLocalService;
396     @BeanReference(name = "com.liferay.portal.service.ResourceService")
397     protected ResourceService resourceService;
398     @BeanReference(name = "com.liferay.portal.service.persistence.ResourcePersistence")
399     protected ResourcePersistence resourcePersistence;
400     @BeanReference(name = "com.liferay.portal.service.persistence.ResourceFinder")
401     protected ResourceFinder resourceFinder;
402     @BeanReference(name = "com.liferay.portal.service.UserLocalService")
403     protected UserLocalService userLocalService;
404     @BeanReference(name = "com.liferay.portal.service.UserService")
405     protected UserService userService;
406     @BeanReference(name = "com.liferay.portal.service.persistence.UserPersistence")
407     protected UserPersistence userPersistence;
408     @BeanReference(name = "com.liferay.portal.service.persistence.UserFinder")
409     protected UserFinder userFinder;
410 }