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