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.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.UserLocalService;
33  import com.liferay.portal.service.UserService;
34  import com.liferay.portal.service.persistence.UserFinder;
35  import com.liferay.portal.service.persistence.UserPersistence;
36  import com.liferay.portal.util.PortalUtil;
37  
38  import com.liferay.portlet.softwarecatalog.model.SCProductVersion;
39  import com.liferay.portlet.softwarecatalog.service.SCFrameworkVersionLocalService;
40  import com.liferay.portlet.softwarecatalog.service.SCFrameworkVersionService;
41  import com.liferay.portlet.softwarecatalog.service.SCLicenseLocalService;
42  import com.liferay.portlet.softwarecatalog.service.SCLicenseService;
43  import com.liferay.portlet.softwarecatalog.service.SCProductEntryLocalService;
44  import com.liferay.portlet.softwarecatalog.service.SCProductEntryService;
45  import com.liferay.portlet.softwarecatalog.service.SCProductScreenshotLocalService;
46  import com.liferay.portlet.softwarecatalog.service.SCProductVersionLocalService;
47  import com.liferay.portlet.softwarecatalog.service.SCProductVersionService;
48  import com.liferay.portlet.softwarecatalog.service.persistence.SCFrameworkVersionPersistence;
49  import com.liferay.portlet.softwarecatalog.service.persistence.SCLicensePersistence;
50  import com.liferay.portlet.softwarecatalog.service.persistence.SCProductEntryPersistence;
51  import com.liferay.portlet.softwarecatalog.service.persistence.SCProductScreenshotPersistence;
52  import com.liferay.portlet.softwarecatalog.service.persistence.SCProductVersionPersistence;
53  
54  import java.util.List;
55  
56  /**
57   * <a href="SCProductVersionLocalServiceBaseImpl.java.html"><b><i>View Source</i></b></a>
58   *
59   * @author Brian Wing Shun Chan
60   *
61   */
62  public abstract class SCProductVersionLocalServiceBaseImpl
63      implements SCProductVersionLocalService {
64      public SCProductVersion addSCProductVersion(
65          SCProductVersion scProductVersion) throws SystemException {
66          scProductVersion.setNew(true);
67  
68          return scProductVersionPersistence.update(scProductVersion, false);
69      }
70  
71      public SCProductVersion createSCProductVersion(long productVersionId) {
72          return scProductVersionPersistence.create(productVersionId);
73      }
74  
75      public void deleteSCProductVersion(long productVersionId)
76          throws PortalException, SystemException {
77          scProductVersionPersistence.remove(productVersionId);
78      }
79  
80      public void deleteSCProductVersion(SCProductVersion scProductVersion)
81          throws SystemException {
82          scProductVersionPersistence.remove(scProductVersion);
83      }
84  
85      public List<Object> dynamicQuery(DynamicQuery dynamicQuery)
86          throws SystemException {
87          return scProductVersionPersistence.findWithDynamicQuery(dynamicQuery);
88      }
89  
90      public List<Object> dynamicQuery(DynamicQuery dynamicQuery, int start,
91          int end) throws SystemException {
92          return scProductVersionPersistence.findWithDynamicQuery(dynamicQuery,
93              start, end);
94      }
95  
96      public SCProductVersion getSCProductVersion(long productVersionId)
97          throws PortalException, SystemException {
98          return scProductVersionPersistence.findByPrimaryKey(productVersionId);
99      }
100 
101     public List<SCProductVersion> getSCProductVersions(int start, int end)
102         throws SystemException {
103         return scProductVersionPersistence.findAll(start, end);
104     }
105 
106     public int getSCProductVersionsCount() throws SystemException {
107         return scProductVersionPersistence.countAll();
108     }
109 
110     public SCProductVersion updateSCProductVersion(
111         SCProductVersion scProductVersion) throws SystemException {
112         scProductVersion.setNew(false);
113 
114         return scProductVersionPersistence.update(scProductVersion, true);
115     }
116 
117     public SCProductVersion updateSCProductVersion(
118         SCProductVersion scProductVersion, boolean merge)
119         throws SystemException {
120         scProductVersion.setNew(false);
121 
122         return scProductVersionPersistence.update(scProductVersion, 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 UserLocalService getUserLocalService() {
267         return userLocalService;
268     }
269 
270     public void setUserLocalService(UserLocalService userLocalService) {
271         this.userLocalService = userLocalService;
272     }
273 
274     public UserService getUserService() {
275         return userService;
276     }
277 
278     public void setUserService(UserService userService) {
279         this.userService = userService;
280     }
281 
282     public UserPersistence getUserPersistence() {
283         return userPersistence;
284     }
285 
286     public void setUserPersistence(UserPersistence userPersistence) {
287         this.userPersistence = userPersistence;
288     }
289 
290     public UserFinder getUserFinder() {
291         return userFinder;
292     }
293 
294     public void setUserFinder(UserFinder userFinder) {
295         this.userFinder = userFinder;
296     }
297 
298     protected void runSQL(String sql) throws SystemException {
299         try {
300             PortalUtil.runSQL(sql);
301         }
302         catch (Exception e) {
303             throw new SystemException(e);
304         }
305     }
306 
307     @BeanReference(name = "com.liferay.portlet.softwarecatalog.service.SCLicenseLocalService.impl")
308     protected SCLicenseLocalService scLicenseLocalService;
309     @BeanReference(name = "com.liferay.portlet.softwarecatalog.service.SCLicenseService.impl")
310     protected SCLicenseService scLicenseService;
311     @BeanReference(name = "com.liferay.portlet.softwarecatalog.service.persistence.SCLicensePersistence.impl")
312     protected SCLicensePersistence scLicensePersistence;
313     @BeanReference(name = "com.liferay.portlet.softwarecatalog.service.SCFrameworkVersionLocalService.impl")
314     protected SCFrameworkVersionLocalService scFrameworkVersionLocalService;
315     @BeanReference(name = "com.liferay.portlet.softwarecatalog.service.SCFrameworkVersionService.impl")
316     protected SCFrameworkVersionService scFrameworkVersionService;
317     @BeanReference(name = "com.liferay.portlet.softwarecatalog.service.persistence.SCFrameworkVersionPersistence.impl")
318     protected SCFrameworkVersionPersistence scFrameworkVersionPersistence;
319     @BeanReference(name = "com.liferay.portlet.softwarecatalog.service.SCProductEntryLocalService.impl")
320     protected SCProductEntryLocalService scProductEntryLocalService;
321     @BeanReference(name = "com.liferay.portlet.softwarecatalog.service.SCProductEntryService.impl")
322     protected SCProductEntryService scProductEntryService;
323     @BeanReference(name = "com.liferay.portlet.softwarecatalog.service.persistence.SCProductEntryPersistence.impl")
324     protected SCProductEntryPersistence scProductEntryPersistence;
325     @BeanReference(name = "com.liferay.portlet.softwarecatalog.service.SCProductScreenshotLocalService.impl")
326     protected SCProductScreenshotLocalService scProductScreenshotLocalService;
327     @BeanReference(name = "com.liferay.portlet.softwarecatalog.service.persistence.SCProductScreenshotPersistence.impl")
328     protected SCProductScreenshotPersistence scProductScreenshotPersistence;
329     @BeanReference(name = "com.liferay.portlet.softwarecatalog.service.SCProductVersionLocalService.impl")
330     protected SCProductVersionLocalService scProductVersionLocalService;
331     @BeanReference(name = "com.liferay.portlet.softwarecatalog.service.SCProductVersionService.impl")
332     protected SCProductVersionService scProductVersionService;
333     @BeanReference(name = "com.liferay.portlet.softwarecatalog.service.persistence.SCProductVersionPersistence.impl")
334     protected SCProductVersionPersistence scProductVersionPersistence;
335     @BeanReference(name = "com.liferay.counter.service.CounterLocalService.impl")
336     protected CounterLocalService counterLocalService;
337     @BeanReference(name = "com.liferay.counter.service.CounterService.impl")
338     protected CounterService counterService;
339     @BeanReference(name = "com.liferay.portal.service.UserLocalService.impl")
340     protected UserLocalService userLocalService;
341     @BeanReference(name = "com.liferay.portal.service.UserService.impl")
342     protected UserService userService;
343     @BeanReference(name = "com.liferay.portal.service.persistence.UserPersistence.impl")
344     protected UserPersistence userPersistence;
345     @BeanReference(name = "com.liferay.portal.service.persistence.UserFinder.impl")
346     protected UserFinder userFinder;
347 }