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