1   /**
2    * Copyright (c) 2000-2009 Liferay, Inc. All rights reserved.
3    *
4    * The contents of this file are subject to the terms of the Liferay Enterprise
5    * Subscription License ("License"). You may not use this file except in
6    * compliance with the License. You can obtain a copy of the License by
7    * contacting Liferay, Inc. See the License for the specific language governing
8    * permissions and limitations under the License, including but not limited to
9    * distribution rights of the Software.
10   *
11   * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
12   * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
13   * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
14   * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
15   * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
16   * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
17   * SOFTWARE.
18   */
19  
20  package com.liferay.portlet.softwarecatalog.service.base;
21  
22  import com.liferay.counter.service.CounterLocalService;
23  import com.liferay.counter.service.CounterService;
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.util.PortalUtil;
30  
31  import com.liferay.portlet.softwarecatalog.model.SCLicense;
32  import com.liferay.portlet.softwarecatalog.service.SCFrameworkVersionLocalService;
33  import com.liferay.portlet.softwarecatalog.service.SCFrameworkVersionService;
34  import com.liferay.portlet.softwarecatalog.service.SCLicenseLocalService;
35  import com.liferay.portlet.softwarecatalog.service.SCLicenseService;
36  import com.liferay.portlet.softwarecatalog.service.SCProductEntryLocalService;
37  import com.liferay.portlet.softwarecatalog.service.SCProductEntryService;
38  import com.liferay.portlet.softwarecatalog.service.SCProductScreenshotLocalService;
39  import com.liferay.portlet.softwarecatalog.service.SCProductVersionLocalService;
40  import com.liferay.portlet.softwarecatalog.service.SCProductVersionService;
41  import com.liferay.portlet.softwarecatalog.service.persistence.SCFrameworkVersionPersistence;
42  import com.liferay.portlet.softwarecatalog.service.persistence.SCLicensePersistence;
43  import com.liferay.portlet.softwarecatalog.service.persistence.SCProductEntryPersistence;
44  import com.liferay.portlet.softwarecatalog.service.persistence.SCProductScreenshotPersistence;
45  import com.liferay.portlet.softwarecatalog.service.persistence.SCProductVersionPersistence;
46  
47  import java.util.List;
48  
49  /**
50   * <a href="SCLicenseLocalServiceBaseImpl.java.html"><b><i>View Source</i></b></a>
51   *
52   * @author Brian Wing Shun Chan
53   *
54   */
55  public abstract class SCLicenseLocalServiceBaseImpl
56      implements SCLicenseLocalService {
57      public SCLicense addSCLicense(SCLicense scLicense)
58          throws SystemException {
59          scLicense.setNew(true);
60  
61          return scLicensePersistence.update(scLicense, false);
62      }
63  
64      public SCLicense createSCLicense(long licenseId) {
65          return scLicensePersistence.create(licenseId);
66      }
67  
68      public void deleteSCLicense(long licenseId)
69          throws PortalException, SystemException {
70          scLicensePersistence.remove(licenseId);
71      }
72  
73      public void deleteSCLicense(SCLicense scLicense) throws SystemException {
74          scLicensePersistence.remove(scLicense);
75      }
76  
77      public List<Object> dynamicQuery(DynamicQuery dynamicQuery)
78          throws SystemException {
79          return scLicensePersistence.findWithDynamicQuery(dynamicQuery);
80      }
81  
82      public List<Object> dynamicQuery(DynamicQuery dynamicQuery, int start,
83          int end) throws SystemException {
84          return scLicensePersistence.findWithDynamicQuery(dynamicQuery, start,
85              end);
86      }
87  
88      public SCLicense getSCLicense(long licenseId)
89          throws PortalException, SystemException {
90          return scLicensePersistence.findByPrimaryKey(licenseId);
91      }
92  
93      public List<SCLicense> getSCLicenses(int start, int end)
94          throws SystemException {
95          return scLicensePersistence.findAll(start, end);
96      }
97  
98      public int getSCLicensesCount() throws SystemException {
99          return scLicensePersistence.countAll();
100     }
101 
102     public SCLicense updateSCLicense(SCLicense scLicense)
103         throws SystemException {
104         scLicense.setNew(false);
105 
106         return scLicensePersistence.update(scLicense, true);
107     }
108 
109     public SCLicense updateSCLicense(SCLicense scLicense, boolean merge)
110         throws SystemException {
111         scLicense.setNew(false);
112 
113         return scLicensePersistence.update(scLicense, merge);
114     }
115 
116     public SCLicenseLocalService getSCLicenseLocalService() {
117         return scLicenseLocalService;
118     }
119 
120     public void setSCLicenseLocalService(
121         SCLicenseLocalService scLicenseLocalService) {
122         this.scLicenseLocalService = scLicenseLocalService;
123     }
124 
125     public SCLicenseService getSCLicenseService() {
126         return scLicenseService;
127     }
128 
129     public void setSCLicenseService(SCLicenseService scLicenseService) {
130         this.scLicenseService = scLicenseService;
131     }
132 
133     public SCLicensePersistence getSCLicensePersistence() {
134         return scLicensePersistence;
135     }
136 
137     public void setSCLicensePersistence(
138         SCLicensePersistence scLicensePersistence) {
139         this.scLicensePersistence = scLicensePersistence;
140     }
141 
142     public SCFrameworkVersionLocalService getSCFrameworkVersionLocalService() {
143         return scFrameworkVersionLocalService;
144     }
145 
146     public void setSCFrameworkVersionLocalService(
147         SCFrameworkVersionLocalService scFrameworkVersionLocalService) {
148         this.scFrameworkVersionLocalService = scFrameworkVersionLocalService;
149     }
150 
151     public SCFrameworkVersionService getSCFrameworkVersionService() {
152         return scFrameworkVersionService;
153     }
154 
155     public void setSCFrameworkVersionService(
156         SCFrameworkVersionService scFrameworkVersionService) {
157         this.scFrameworkVersionService = scFrameworkVersionService;
158     }
159 
160     public SCFrameworkVersionPersistence getSCFrameworkVersionPersistence() {
161         return scFrameworkVersionPersistence;
162     }
163 
164     public void setSCFrameworkVersionPersistence(
165         SCFrameworkVersionPersistence scFrameworkVersionPersistence) {
166         this.scFrameworkVersionPersistence = scFrameworkVersionPersistence;
167     }
168 
169     public SCProductEntryLocalService getSCProductEntryLocalService() {
170         return scProductEntryLocalService;
171     }
172 
173     public void setSCProductEntryLocalService(
174         SCProductEntryLocalService scProductEntryLocalService) {
175         this.scProductEntryLocalService = scProductEntryLocalService;
176     }
177 
178     public SCProductEntryService getSCProductEntryService() {
179         return scProductEntryService;
180     }
181 
182     public void setSCProductEntryService(
183         SCProductEntryService scProductEntryService) {
184         this.scProductEntryService = scProductEntryService;
185     }
186 
187     public SCProductEntryPersistence getSCProductEntryPersistence() {
188         return scProductEntryPersistence;
189     }
190 
191     public void setSCProductEntryPersistence(
192         SCProductEntryPersistence scProductEntryPersistence) {
193         this.scProductEntryPersistence = scProductEntryPersistence;
194     }
195 
196     public SCProductScreenshotLocalService getSCProductScreenshotLocalService() {
197         return scProductScreenshotLocalService;
198     }
199 
200     public void setSCProductScreenshotLocalService(
201         SCProductScreenshotLocalService scProductScreenshotLocalService) {
202         this.scProductScreenshotLocalService = scProductScreenshotLocalService;
203     }
204 
205     public SCProductScreenshotPersistence getSCProductScreenshotPersistence() {
206         return scProductScreenshotPersistence;
207     }
208 
209     public void setSCProductScreenshotPersistence(
210         SCProductScreenshotPersistence scProductScreenshotPersistence) {
211         this.scProductScreenshotPersistence = scProductScreenshotPersistence;
212     }
213 
214     public SCProductVersionLocalService getSCProductVersionLocalService() {
215         return scProductVersionLocalService;
216     }
217 
218     public void setSCProductVersionLocalService(
219         SCProductVersionLocalService scProductVersionLocalService) {
220         this.scProductVersionLocalService = scProductVersionLocalService;
221     }
222 
223     public SCProductVersionService getSCProductVersionService() {
224         return scProductVersionService;
225     }
226 
227     public void setSCProductVersionService(
228         SCProductVersionService scProductVersionService) {
229         this.scProductVersionService = scProductVersionService;
230     }
231 
232     public SCProductVersionPersistence getSCProductVersionPersistence() {
233         return scProductVersionPersistence;
234     }
235 
236     public void setSCProductVersionPersistence(
237         SCProductVersionPersistence scProductVersionPersistence) {
238         this.scProductVersionPersistence = scProductVersionPersistence;
239     }
240 
241     public CounterLocalService getCounterLocalService() {
242         return counterLocalService;
243     }
244 
245     public void setCounterLocalService(CounterLocalService counterLocalService) {
246         this.counterLocalService = counterLocalService;
247     }
248 
249     public CounterService getCounterService() {
250         return counterService;
251     }
252 
253     public void setCounterService(CounterService counterService) {
254         this.counterService = counterService;
255     }
256 
257     protected void runSQL(String sql) throws SystemException {
258         try {
259             PortalUtil.runSQL(sql);
260         }
261         catch (Exception e) {
262             throw new SystemException(e);
263         }
264     }
265 
266     @BeanReference(name = "com.liferay.portlet.softwarecatalog.service.SCLicenseLocalService.impl")
267     protected SCLicenseLocalService scLicenseLocalService;
268     @BeanReference(name = "com.liferay.portlet.softwarecatalog.service.SCLicenseService.impl")
269     protected SCLicenseService scLicenseService;
270     @BeanReference(name = "com.liferay.portlet.softwarecatalog.service.persistence.SCLicensePersistence.impl")
271     protected SCLicensePersistence scLicensePersistence;
272     @BeanReference(name = "com.liferay.portlet.softwarecatalog.service.SCFrameworkVersionLocalService.impl")
273     protected SCFrameworkVersionLocalService scFrameworkVersionLocalService;
274     @BeanReference(name = "com.liferay.portlet.softwarecatalog.service.SCFrameworkVersionService.impl")
275     protected SCFrameworkVersionService scFrameworkVersionService;
276     @BeanReference(name = "com.liferay.portlet.softwarecatalog.service.persistence.SCFrameworkVersionPersistence.impl")
277     protected SCFrameworkVersionPersistence scFrameworkVersionPersistence;
278     @BeanReference(name = "com.liferay.portlet.softwarecatalog.service.SCProductEntryLocalService.impl")
279     protected SCProductEntryLocalService scProductEntryLocalService;
280     @BeanReference(name = "com.liferay.portlet.softwarecatalog.service.SCProductEntryService.impl")
281     protected SCProductEntryService scProductEntryService;
282     @BeanReference(name = "com.liferay.portlet.softwarecatalog.service.persistence.SCProductEntryPersistence.impl")
283     protected SCProductEntryPersistence scProductEntryPersistence;
284     @BeanReference(name = "com.liferay.portlet.softwarecatalog.service.SCProductScreenshotLocalService.impl")
285     protected SCProductScreenshotLocalService scProductScreenshotLocalService;
286     @BeanReference(name = "com.liferay.portlet.softwarecatalog.service.persistence.SCProductScreenshotPersistence.impl")
287     protected SCProductScreenshotPersistence scProductScreenshotPersistence;
288     @BeanReference(name = "com.liferay.portlet.softwarecatalog.service.SCProductVersionLocalService.impl")
289     protected SCProductVersionLocalService scProductVersionLocalService;
290     @BeanReference(name = "com.liferay.portlet.softwarecatalog.service.SCProductVersionService.impl")
291     protected SCProductVersionService scProductVersionService;
292     @BeanReference(name = "com.liferay.portlet.softwarecatalog.service.persistence.SCProductVersionPersistence.impl")
293     protected SCProductVersionPersistence scProductVersionPersistence;
294     @BeanReference(name = "com.liferay.counter.service.CounterLocalService.impl")
295     protected CounterLocalService counterLocalService;
296     @BeanReference(name = "com.liferay.counter.service.CounterService.impl")
297     protected CounterService counterService;
298 }