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