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