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