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.softwarecatalog.service.base;
24  
25  import com.liferay.portal.PortalException;
26  import com.liferay.portal.SystemException;
27  import com.liferay.portal.kernel.annotation.BeanReference;
28  import com.liferay.portal.kernel.dao.orm.DynamicQuery;
29  import com.liferay.portal.service.ImageLocalService;
30  import com.liferay.portal.service.persistence.ImagePersistence;
31  import com.liferay.portal.util.PortalUtil;
32  
33  import com.liferay.portlet.softwarecatalog.model.SCProductScreenshot;
34  import com.liferay.portlet.softwarecatalog.service.SCFrameworkVersionLocalService;
35  import com.liferay.portlet.softwarecatalog.service.SCFrameworkVersionService;
36  import com.liferay.portlet.softwarecatalog.service.SCLicenseLocalService;
37  import com.liferay.portlet.softwarecatalog.service.SCLicenseService;
38  import com.liferay.portlet.softwarecatalog.service.SCProductEntryLocalService;
39  import com.liferay.portlet.softwarecatalog.service.SCProductEntryService;
40  import com.liferay.portlet.softwarecatalog.service.SCProductScreenshotLocalService;
41  import com.liferay.portlet.softwarecatalog.service.SCProductVersionLocalService;
42  import com.liferay.portlet.softwarecatalog.service.SCProductVersionService;
43  import com.liferay.portlet.softwarecatalog.service.persistence.SCFrameworkVersionPersistence;
44  import com.liferay.portlet.softwarecatalog.service.persistence.SCLicensePersistence;
45  import com.liferay.portlet.softwarecatalog.service.persistence.SCProductEntryPersistence;
46  import com.liferay.portlet.softwarecatalog.service.persistence.SCProductScreenshotPersistence;
47  import com.liferay.portlet.softwarecatalog.service.persistence.SCProductVersionPersistence;
48  
49  import java.util.List;
50  
51  /**
52   * <a href="SCProductScreenshotLocalServiceBaseImpl.java.html"><b><i>View Source</i></b></a>
53   *
54   * @author Brian Wing Shun Chan
55   *
56   */
57  public abstract class SCProductScreenshotLocalServiceBaseImpl
58      implements SCProductScreenshotLocalService {
59      public SCProductScreenshot addSCProductScreenshot(
60          SCProductScreenshot scProductScreenshot) throws SystemException {
61          scProductScreenshot.setNew(true);
62  
63          return scProductScreenshotPersistence.update(scProductScreenshot, false);
64      }
65  
66      public SCProductScreenshot createSCProductScreenshot(
67          long productScreenshotId) {
68          return scProductScreenshotPersistence.create(productScreenshotId);
69      }
70  
71      public void deleteSCProductScreenshot(long productScreenshotId)
72          throws PortalException, SystemException {
73          scProductScreenshotPersistence.remove(productScreenshotId);
74      }
75  
76      public void deleteSCProductScreenshot(
77          SCProductScreenshot scProductScreenshot) throws SystemException {
78          scProductScreenshotPersistence.remove(scProductScreenshot);
79      }
80  
81      public List<Object> dynamicQuery(DynamicQuery dynamicQuery)
82          throws SystemException {
83          return scProductScreenshotPersistence.findWithDynamicQuery(dynamicQuery);
84      }
85  
86      public List<Object> dynamicQuery(DynamicQuery dynamicQuery, int start,
87          int end) throws SystemException {
88          return scProductScreenshotPersistence.findWithDynamicQuery(dynamicQuery,
89              start, end);
90      }
91  
92      public SCProductScreenshot getSCProductScreenshot(long productScreenshotId)
93          throws PortalException, SystemException {
94          return scProductScreenshotPersistence.findByPrimaryKey(productScreenshotId);
95      }
96  
97      public List<SCProductScreenshot> getSCProductScreenshots(int start, int end)
98          throws SystemException {
99          return scProductScreenshotPersistence.findAll(start, end);
100     }
101 
102     public int getSCProductScreenshotsCount() throws SystemException {
103         return scProductScreenshotPersistence.countAll();
104     }
105 
106     public SCProductScreenshot updateSCProductScreenshot(
107         SCProductScreenshot scProductScreenshot) throws SystemException {
108         scProductScreenshot.setNew(false);
109 
110         return scProductScreenshotPersistence.update(scProductScreenshot, true);
111     }
112 
113     public SCProductScreenshot updateSCProductScreenshot(
114         SCProductScreenshot scProductScreenshot, boolean merge)
115         throws SystemException {
116         scProductScreenshot.setNew(false);
117 
118         return scProductScreenshotPersistence.update(scProductScreenshot, merge);
119     }
120 
121     public SCLicenseLocalService getSCLicenseLocalService() {
122         return scLicenseLocalService;
123     }
124 
125     public void setSCLicenseLocalService(
126         SCLicenseLocalService scLicenseLocalService) {
127         this.scLicenseLocalService = scLicenseLocalService;
128     }
129 
130     public SCLicenseService getSCLicenseService() {
131         return scLicenseService;
132     }
133 
134     public void setSCLicenseService(SCLicenseService scLicenseService) {
135         this.scLicenseService = scLicenseService;
136     }
137 
138     public SCLicensePersistence getSCLicensePersistence() {
139         return scLicensePersistence;
140     }
141 
142     public void setSCLicensePersistence(
143         SCLicensePersistence scLicensePersistence) {
144         this.scLicensePersistence = scLicensePersistence;
145     }
146 
147     public SCFrameworkVersionLocalService getSCFrameworkVersionLocalService() {
148         return scFrameworkVersionLocalService;
149     }
150 
151     public void setSCFrameworkVersionLocalService(
152         SCFrameworkVersionLocalService scFrameworkVersionLocalService) {
153         this.scFrameworkVersionLocalService = scFrameworkVersionLocalService;
154     }
155 
156     public SCFrameworkVersionService getSCFrameworkVersionService() {
157         return scFrameworkVersionService;
158     }
159 
160     public void setSCFrameworkVersionService(
161         SCFrameworkVersionService scFrameworkVersionService) {
162         this.scFrameworkVersionService = scFrameworkVersionService;
163     }
164 
165     public SCFrameworkVersionPersistence getSCFrameworkVersionPersistence() {
166         return scFrameworkVersionPersistence;
167     }
168 
169     public void setSCFrameworkVersionPersistence(
170         SCFrameworkVersionPersistence scFrameworkVersionPersistence) {
171         this.scFrameworkVersionPersistence = scFrameworkVersionPersistence;
172     }
173 
174     public SCProductEntryLocalService getSCProductEntryLocalService() {
175         return scProductEntryLocalService;
176     }
177 
178     public void setSCProductEntryLocalService(
179         SCProductEntryLocalService scProductEntryLocalService) {
180         this.scProductEntryLocalService = scProductEntryLocalService;
181     }
182 
183     public SCProductEntryService getSCProductEntryService() {
184         return scProductEntryService;
185     }
186 
187     public void setSCProductEntryService(
188         SCProductEntryService scProductEntryService) {
189         this.scProductEntryService = scProductEntryService;
190     }
191 
192     public SCProductEntryPersistence getSCProductEntryPersistence() {
193         return scProductEntryPersistence;
194     }
195 
196     public void setSCProductEntryPersistence(
197         SCProductEntryPersistence scProductEntryPersistence) {
198         this.scProductEntryPersistence = scProductEntryPersistence;
199     }
200 
201     public SCProductScreenshotLocalService getSCProductScreenshotLocalService() {
202         return scProductScreenshotLocalService;
203     }
204 
205     public void setSCProductScreenshotLocalService(
206         SCProductScreenshotLocalService scProductScreenshotLocalService) {
207         this.scProductScreenshotLocalService = scProductScreenshotLocalService;
208     }
209 
210     public SCProductScreenshotPersistence getSCProductScreenshotPersistence() {
211         return scProductScreenshotPersistence;
212     }
213 
214     public void setSCProductScreenshotPersistence(
215         SCProductScreenshotPersistence scProductScreenshotPersistence) {
216         this.scProductScreenshotPersistence = scProductScreenshotPersistence;
217     }
218 
219     public SCProductVersionLocalService getSCProductVersionLocalService() {
220         return scProductVersionLocalService;
221     }
222 
223     public void setSCProductVersionLocalService(
224         SCProductVersionLocalService scProductVersionLocalService) {
225         this.scProductVersionLocalService = scProductVersionLocalService;
226     }
227 
228     public SCProductVersionService getSCProductVersionService() {
229         return scProductVersionService;
230     }
231 
232     public void setSCProductVersionService(
233         SCProductVersionService scProductVersionService) {
234         this.scProductVersionService = scProductVersionService;
235     }
236 
237     public SCProductVersionPersistence getSCProductVersionPersistence() {
238         return scProductVersionPersistence;
239     }
240 
241     public void setSCProductVersionPersistence(
242         SCProductVersionPersistence scProductVersionPersistence) {
243         this.scProductVersionPersistence = scProductVersionPersistence;
244     }
245 
246     public ImageLocalService getImageLocalService() {
247         return imageLocalService;
248     }
249 
250     public void setImageLocalService(ImageLocalService imageLocalService) {
251         this.imageLocalService = imageLocalService;
252     }
253 
254     public ImagePersistence getImagePersistence() {
255         return imagePersistence;
256     }
257 
258     public void setImagePersistence(ImagePersistence imagePersistence) {
259         this.imagePersistence = imagePersistence;
260     }
261 
262     protected void runSQL(String sql) throws SystemException {
263         try {
264             PortalUtil.runSQL(sql);
265         }
266         catch (Exception e) {
267             throw new SystemException(e);
268         }
269     }
270 
271     @BeanReference(name = "com.liferay.portlet.softwarecatalog.service.SCLicenseLocalService.impl")
272     protected SCLicenseLocalService scLicenseLocalService;
273     @BeanReference(name = "com.liferay.portlet.softwarecatalog.service.SCLicenseService.impl")
274     protected SCLicenseService scLicenseService;
275     @BeanReference(name = "com.liferay.portlet.softwarecatalog.service.persistence.SCLicensePersistence.impl")
276     protected SCLicensePersistence scLicensePersistence;
277     @BeanReference(name = "com.liferay.portlet.softwarecatalog.service.SCFrameworkVersionLocalService.impl")
278     protected SCFrameworkVersionLocalService scFrameworkVersionLocalService;
279     @BeanReference(name = "com.liferay.portlet.softwarecatalog.service.SCFrameworkVersionService.impl")
280     protected SCFrameworkVersionService scFrameworkVersionService;
281     @BeanReference(name = "com.liferay.portlet.softwarecatalog.service.persistence.SCFrameworkVersionPersistence.impl")
282     protected SCFrameworkVersionPersistence scFrameworkVersionPersistence;
283     @BeanReference(name = "com.liferay.portlet.softwarecatalog.service.SCProductEntryLocalService.impl")
284     protected SCProductEntryLocalService scProductEntryLocalService;
285     @BeanReference(name = "com.liferay.portlet.softwarecatalog.service.SCProductEntryService.impl")
286     protected SCProductEntryService scProductEntryService;
287     @BeanReference(name = "com.liferay.portlet.softwarecatalog.service.persistence.SCProductEntryPersistence.impl")
288     protected SCProductEntryPersistence scProductEntryPersistence;
289     @BeanReference(name = "com.liferay.portlet.softwarecatalog.service.SCProductScreenshotLocalService.impl")
290     protected SCProductScreenshotLocalService scProductScreenshotLocalService;
291     @BeanReference(name = "com.liferay.portlet.softwarecatalog.service.persistence.SCProductScreenshotPersistence.impl")
292     protected SCProductScreenshotPersistence scProductScreenshotPersistence;
293     @BeanReference(name = "com.liferay.portlet.softwarecatalog.service.SCProductVersionLocalService.impl")
294     protected SCProductVersionLocalService scProductVersionLocalService;
295     @BeanReference(name = "com.liferay.portlet.softwarecatalog.service.SCProductVersionService.impl")
296     protected SCProductVersionService scProductVersionService;
297     @BeanReference(name = "com.liferay.portlet.softwarecatalog.service.persistence.SCProductVersionPersistence.impl")
298     protected SCProductVersionPersistence scProductVersionPersistence;
299     @BeanReference(name = "com.liferay.portal.service.ImageLocalService.impl")
300     protected ImageLocalService imageLocalService;
301     @BeanReference(name = "com.liferay.portal.service.persistence.ImagePersistence.impl")
302     protected ImagePersistence imagePersistence;
303 }