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