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.SystemException;
26  import com.liferay.portal.kernel.dao.DynamicQueryInitializer;
27  
28  import com.liferay.portlet.softwarecatalog.model.SCProductScreenshot;
29  import com.liferay.portlet.softwarecatalog.model.impl.SCProductScreenshotImpl;
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(SCProductScreenshot model)
71          throws SystemException {
72          SCProductScreenshot scProductScreenshot = new SCProductScreenshotImpl();
73  
74          scProductScreenshot.setNew(true);
75  
76          scProductScreenshot.setProductScreenshotId(model.getProductScreenshotId());
77          scProductScreenshot.setCompanyId(model.getCompanyId());
78          scProductScreenshot.setGroupId(model.getGroupId());
79          scProductScreenshot.setProductEntryId(model.getProductEntryId());
80          scProductScreenshot.setThumbnailId(model.getThumbnailId());
81          scProductScreenshot.setFullImageId(model.getFullImageId());
82          scProductScreenshot.setPriority(model.getPriority());
83  
84          return scProductScreenshotPersistence.update(scProductScreenshot);
85      }
86  
87      public List dynamicQuery(DynamicQueryInitializer queryInitializer)
88          throws SystemException {
89          return scProductScreenshotPersistence.findWithDynamicQuery(queryInitializer);
90      }
91  
92      public List dynamicQuery(DynamicQueryInitializer queryInitializer,
93          int begin, int end) throws SystemException {
94          return scProductScreenshotPersistence.findWithDynamicQuery(queryInitializer,
95              begin, end);
96      }
97  
98      public SCProductScreenshot updateSCProductScreenshot(
99          SCProductScreenshot model) throws SystemException {
100         return scProductScreenshotPersistence.update(model, true);
101     }
102 
103     public SCLicenseLocalService getSCLicenseLocalService() {
104         return scLicenseLocalService;
105     }
106 
107     public void setSCLicenseLocalService(
108         SCLicenseLocalService scLicenseLocalService) {
109         this.scLicenseLocalService = scLicenseLocalService;
110     }
111 
112     public SCLicenseService getSCLicenseService() {
113         return scLicenseService;
114     }
115 
116     public void setSCLicenseService(SCLicenseService scLicenseService) {
117         this.scLicenseService = scLicenseService;
118     }
119 
120     public SCLicensePersistence getSCLicensePersistence() {
121         return scLicensePersistence;
122     }
123 
124     public void setSCLicensePersistence(
125         SCLicensePersistence scLicensePersistence) {
126         this.scLicensePersistence = scLicensePersistence;
127     }
128 
129     public SCFrameworkVersionLocalService getSCFrameworkVersionLocalService() {
130         return scFrameworkVersionLocalService;
131     }
132 
133     public void setSCFrameworkVersionLocalService(
134         SCFrameworkVersionLocalService scFrameworkVersionLocalService) {
135         this.scFrameworkVersionLocalService = scFrameworkVersionLocalService;
136     }
137 
138     public SCFrameworkVersionService getSCFrameworkVersionService() {
139         return scFrameworkVersionService;
140     }
141 
142     public void setSCFrameworkVersionService(
143         SCFrameworkVersionService scFrameworkVersionService) {
144         this.scFrameworkVersionService = scFrameworkVersionService;
145     }
146 
147     public SCFrameworkVersionPersistence getSCFrameworkVersionPersistence() {
148         return scFrameworkVersionPersistence;
149     }
150 
151     public void setSCFrameworkVersionPersistence(
152         SCFrameworkVersionPersistence scFrameworkVersionPersistence) {
153         this.scFrameworkVersionPersistence = scFrameworkVersionPersistence;
154     }
155 
156     public SCProductEntryLocalService getSCProductEntryLocalService() {
157         return scProductEntryLocalService;
158     }
159 
160     public void setSCProductEntryLocalService(
161         SCProductEntryLocalService scProductEntryLocalService) {
162         this.scProductEntryLocalService = scProductEntryLocalService;
163     }
164 
165     public SCProductEntryService getSCProductEntryService() {
166         return scProductEntryService;
167     }
168 
169     public void setSCProductEntryService(
170         SCProductEntryService scProductEntryService) {
171         this.scProductEntryService = scProductEntryService;
172     }
173 
174     public SCProductEntryPersistence getSCProductEntryPersistence() {
175         return scProductEntryPersistence;
176     }
177 
178     public void setSCProductEntryPersistence(
179         SCProductEntryPersistence scProductEntryPersistence) {
180         this.scProductEntryPersistence = scProductEntryPersistence;
181     }
182 
183     public SCProductScreenshotPersistence getSCProductScreenshotPersistence() {
184         return scProductScreenshotPersistence;
185     }
186 
187     public void setSCProductScreenshotPersistence(
188         SCProductScreenshotPersistence scProductScreenshotPersistence) {
189         this.scProductScreenshotPersistence = scProductScreenshotPersistence;
190     }
191 
192     public SCProductVersionLocalService getSCProductVersionLocalService() {
193         return scProductVersionLocalService;
194     }
195 
196     public void setSCProductVersionLocalService(
197         SCProductVersionLocalService scProductVersionLocalService) {
198         this.scProductVersionLocalService = scProductVersionLocalService;
199     }
200 
201     public SCProductVersionService getSCProductVersionService() {
202         return scProductVersionService;
203     }
204 
205     public void setSCProductVersionService(
206         SCProductVersionService scProductVersionService) {
207         this.scProductVersionService = scProductVersionService;
208     }
209 
210     public SCProductVersionPersistence getSCProductVersionPersistence() {
211         return scProductVersionPersistence;
212     }
213 
214     public void setSCProductVersionPersistence(
215         SCProductVersionPersistence scProductVersionPersistence) {
216         this.scProductVersionPersistence = scProductVersionPersistence;
217     }
218 
219     public void afterPropertiesSet() {
220         if (scLicenseLocalService == null) {
221             scLicenseLocalService = SCLicenseLocalServiceFactory.getImpl();
222         }
223 
224         if (scLicenseService == null) {
225             scLicenseService = SCLicenseServiceFactory.getImpl();
226         }
227 
228         if (scLicensePersistence == null) {
229             scLicensePersistence = SCLicenseUtil.getPersistence();
230         }
231 
232         if (scFrameworkVersionLocalService == null) {
233             scFrameworkVersionLocalService = SCFrameworkVersionLocalServiceFactory.getImpl();
234         }
235 
236         if (scFrameworkVersionService == null) {
237             scFrameworkVersionService = SCFrameworkVersionServiceFactory.getImpl();
238         }
239 
240         if (scFrameworkVersionPersistence == null) {
241             scFrameworkVersionPersistence = SCFrameworkVersionUtil.getPersistence();
242         }
243 
244         if (scProductEntryLocalService == null) {
245             scProductEntryLocalService = SCProductEntryLocalServiceFactory.getImpl();
246         }
247 
248         if (scProductEntryService == null) {
249             scProductEntryService = SCProductEntryServiceFactory.getImpl();
250         }
251 
252         if (scProductEntryPersistence == null) {
253             scProductEntryPersistence = SCProductEntryUtil.getPersistence();
254         }
255 
256         if (scProductScreenshotPersistence == null) {
257             scProductScreenshotPersistence = SCProductScreenshotUtil.getPersistence();
258         }
259 
260         if (scProductVersionLocalService == null) {
261             scProductVersionLocalService = SCProductVersionLocalServiceFactory.getImpl();
262         }
263 
264         if (scProductVersionService == null) {
265             scProductVersionService = SCProductVersionServiceFactory.getImpl();
266         }
267 
268         if (scProductVersionPersistence == null) {
269             scProductVersionPersistence = SCProductVersionUtil.getPersistence();
270         }
271     }
272 
273     protected SCLicenseLocalService scLicenseLocalService;
274     protected SCLicenseService scLicenseService;
275     protected SCLicensePersistence scLicensePersistence;
276     protected SCFrameworkVersionLocalService scFrameworkVersionLocalService;
277     protected SCFrameworkVersionService scFrameworkVersionService;
278     protected SCFrameworkVersionPersistence scFrameworkVersionPersistence;
279     protected SCProductEntryLocalService scProductEntryLocalService;
280     protected SCProductEntryService scProductEntryService;
281     protected SCProductEntryPersistence scProductEntryPersistence;
282     protected SCProductScreenshotPersistence scProductScreenshotPersistence;
283     protected SCProductVersionLocalService scProductVersionLocalService;
284     protected SCProductVersionService scProductVersionService;
285     protected SCProductVersionPersistence scProductVersionPersistence;
286 }