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.journal.service.base;
24  
25  import com.liferay.counter.service.CounterLocalService;
26  import com.liferay.counter.service.CounterLocalServiceFactory;
27  import com.liferay.counter.service.CounterService;
28  import com.liferay.counter.service.CounterServiceFactory;
29  
30  import com.liferay.portal.SystemException;
31  import com.liferay.portal.kernel.dao.DynamicQueryInitializer;
32  
33  import com.liferay.portlet.journal.model.JournalArticleImage;
34  import com.liferay.portlet.journal.model.impl.JournalArticleImageImpl;
35  import com.liferay.portlet.journal.service.JournalArticleImageLocalService;
36  import com.liferay.portlet.journal.service.JournalArticleLocalService;
37  import com.liferay.portlet.journal.service.JournalArticleLocalServiceFactory;
38  import com.liferay.portlet.journal.service.JournalArticleResourceLocalService;
39  import com.liferay.portlet.journal.service.JournalArticleResourceLocalServiceFactory;
40  import com.liferay.portlet.journal.service.JournalArticleService;
41  import com.liferay.portlet.journal.service.JournalArticleServiceFactory;
42  import com.liferay.portlet.journal.service.JournalContentSearchLocalService;
43  import com.liferay.portlet.journal.service.JournalContentSearchLocalServiceFactory;
44  import com.liferay.portlet.journal.service.JournalFeedLocalService;
45  import com.liferay.portlet.journal.service.JournalFeedLocalServiceFactory;
46  import com.liferay.portlet.journal.service.JournalFeedService;
47  import com.liferay.portlet.journal.service.JournalFeedServiceFactory;
48  import com.liferay.portlet.journal.service.JournalStructureLocalService;
49  import com.liferay.portlet.journal.service.JournalStructureLocalServiceFactory;
50  import com.liferay.portlet.journal.service.JournalStructureService;
51  import com.liferay.portlet.journal.service.JournalStructureServiceFactory;
52  import com.liferay.portlet.journal.service.JournalTemplateLocalService;
53  import com.liferay.portlet.journal.service.JournalTemplateLocalServiceFactory;
54  import com.liferay.portlet.journal.service.JournalTemplateService;
55  import com.liferay.portlet.journal.service.JournalTemplateServiceFactory;
56  import com.liferay.portlet.journal.service.persistence.JournalArticleFinder;
57  import com.liferay.portlet.journal.service.persistence.JournalArticleFinderUtil;
58  import com.liferay.portlet.journal.service.persistence.JournalArticleImagePersistence;
59  import com.liferay.portlet.journal.service.persistence.JournalArticleImageUtil;
60  import com.liferay.portlet.journal.service.persistence.JournalArticlePersistence;
61  import com.liferay.portlet.journal.service.persistence.JournalArticleResourcePersistence;
62  import com.liferay.portlet.journal.service.persistence.JournalArticleResourceUtil;
63  import com.liferay.portlet.journal.service.persistence.JournalArticleUtil;
64  import com.liferay.portlet.journal.service.persistence.JournalContentSearchPersistence;
65  import com.liferay.portlet.journal.service.persistence.JournalContentSearchUtil;
66  import com.liferay.portlet.journal.service.persistence.JournalFeedFinder;
67  import com.liferay.portlet.journal.service.persistence.JournalFeedFinderUtil;
68  import com.liferay.portlet.journal.service.persistence.JournalFeedPersistence;
69  import com.liferay.portlet.journal.service.persistence.JournalFeedUtil;
70  import com.liferay.portlet.journal.service.persistence.JournalStructureFinder;
71  import com.liferay.portlet.journal.service.persistence.JournalStructureFinderUtil;
72  import com.liferay.portlet.journal.service.persistence.JournalStructurePersistence;
73  import com.liferay.portlet.journal.service.persistence.JournalStructureUtil;
74  import com.liferay.portlet.journal.service.persistence.JournalTemplateFinder;
75  import com.liferay.portlet.journal.service.persistence.JournalTemplateFinderUtil;
76  import com.liferay.portlet.journal.service.persistence.JournalTemplatePersistence;
77  import com.liferay.portlet.journal.service.persistence.JournalTemplateUtil;
78  
79  import org.springframework.beans.factory.InitializingBean;
80  
81  import java.util.List;
82  
83  /**
84   * <a href="JournalArticleImageLocalServiceBaseImpl.java.html"><b><i>View Source</i></b></a>
85   *
86   * @author Brian Wing Shun Chan
87   *
88   */
89  public abstract class JournalArticleImageLocalServiceBaseImpl
90      implements JournalArticleImageLocalService, InitializingBean {
91      public JournalArticleImage addJournalArticleImage(JournalArticleImage model)
92          throws SystemException {
93          JournalArticleImage journalArticleImage = new JournalArticleImageImpl();
94  
95          journalArticleImage.setNew(true);
96  
97          journalArticleImage.setArticleImageId(model.getArticleImageId());
98          journalArticleImage.setGroupId(model.getGroupId());
99          journalArticleImage.setArticleId(model.getArticleId());
100         journalArticleImage.setVersion(model.getVersion());
101         journalArticleImage.setElName(model.getElName());
102         journalArticleImage.setLanguageId(model.getLanguageId());
103         journalArticleImage.setTempImage(model.getTempImage());
104 
105         return journalArticleImagePersistence.update(journalArticleImage);
106     }
107 
108     public List dynamicQuery(DynamicQueryInitializer queryInitializer)
109         throws SystemException {
110         return journalArticleImagePersistence.findWithDynamicQuery(queryInitializer);
111     }
112 
113     public List dynamicQuery(DynamicQueryInitializer queryInitializer,
114         int begin, int end) throws SystemException {
115         return journalArticleImagePersistence.findWithDynamicQuery(queryInitializer,
116             begin, end);
117     }
118 
119     public JournalArticleImage updateJournalArticleImage(
120         JournalArticleImage model) throws SystemException {
121         JournalArticleImage journalArticleImage = new JournalArticleImageImpl();
122 
123         journalArticleImage.setNew(false);
124 
125         journalArticleImage.setArticleImageId(model.getArticleImageId());
126         journalArticleImage.setGroupId(model.getGroupId());
127         journalArticleImage.setArticleId(model.getArticleId());
128         journalArticleImage.setVersion(model.getVersion());
129         journalArticleImage.setElName(model.getElName());
130         journalArticleImage.setLanguageId(model.getLanguageId());
131         journalArticleImage.setTempImage(model.getTempImage());
132 
133         return journalArticleImagePersistence.update(journalArticleImage);
134     }
135 
136     public JournalArticleLocalService getJournalArticleLocalService() {
137         return journalArticleLocalService;
138     }
139 
140     public void setJournalArticleLocalService(
141         JournalArticleLocalService journalArticleLocalService) {
142         this.journalArticleLocalService = journalArticleLocalService;
143     }
144 
145     public JournalArticleService getJournalArticleService() {
146         return journalArticleService;
147     }
148 
149     public void setJournalArticleService(
150         JournalArticleService journalArticleService) {
151         this.journalArticleService = journalArticleService;
152     }
153 
154     public JournalArticlePersistence getJournalArticlePersistence() {
155         return journalArticlePersistence;
156     }
157 
158     public void setJournalArticlePersistence(
159         JournalArticlePersistence journalArticlePersistence) {
160         this.journalArticlePersistence = journalArticlePersistence;
161     }
162 
163     public JournalArticleFinder getJournalArticleFinder() {
164         return journalArticleFinder;
165     }
166 
167     public void setJournalArticleFinder(
168         JournalArticleFinder journalArticleFinder) {
169         this.journalArticleFinder = journalArticleFinder;
170     }
171 
172     public JournalArticleImagePersistence getJournalArticleImagePersistence() {
173         return journalArticleImagePersistence;
174     }
175 
176     public void setJournalArticleImagePersistence(
177         JournalArticleImagePersistence journalArticleImagePersistence) {
178         this.journalArticleImagePersistence = journalArticleImagePersistence;
179     }
180 
181     public JournalArticleResourceLocalService getJournalArticleResourceLocalService() {
182         return journalArticleResourceLocalService;
183     }
184 
185     public void setJournalArticleResourceLocalService(
186         JournalArticleResourceLocalService journalArticleResourceLocalService) {
187         this.journalArticleResourceLocalService = journalArticleResourceLocalService;
188     }
189 
190     public JournalArticleResourcePersistence getJournalArticleResourcePersistence() {
191         return journalArticleResourcePersistence;
192     }
193 
194     public void setJournalArticleResourcePersistence(
195         JournalArticleResourcePersistence journalArticleResourcePersistence) {
196         this.journalArticleResourcePersistence = journalArticleResourcePersistence;
197     }
198 
199     public JournalContentSearchLocalService getJournalContentSearchLocalService() {
200         return journalContentSearchLocalService;
201     }
202 
203     public void setJournalContentSearchLocalService(
204         JournalContentSearchLocalService journalContentSearchLocalService) {
205         this.journalContentSearchLocalService = journalContentSearchLocalService;
206     }
207 
208     public JournalContentSearchPersistence getJournalContentSearchPersistence() {
209         return journalContentSearchPersistence;
210     }
211 
212     public void setJournalContentSearchPersistence(
213         JournalContentSearchPersistence journalContentSearchPersistence) {
214         this.journalContentSearchPersistence = journalContentSearchPersistence;
215     }
216 
217     public JournalFeedLocalService getJournalFeedLocalService() {
218         return journalFeedLocalService;
219     }
220 
221     public void setJournalFeedLocalService(
222         JournalFeedLocalService journalFeedLocalService) {
223         this.journalFeedLocalService = journalFeedLocalService;
224     }
225 
226     public JournalFeedService getJournalFeedService() {
227         return journalFeedService;
228     }
229 
230     public void setJournalFeedService(JournalFeedService journalFeedService) {
231         this.journalFeedService = journalFeedService;
232     }
233 
234     public JournalFeedPersistence getJournalFeedPersistence() {
235         return journalFeedPersistence;
236     }
237 
238     public void setJournalFeedPersistence(
239         JournalFeedPersistence journalFeedPersistence) {
240         this.journalFeedPersistence = journalFeedPersistence;
241     }
242 
243     public JournalFeedFinder getJournalFeedFinder() {
244         return journalFeedFinder;
245     }
246 
247     public void setJournalFeedFinder(JournalFeedFinder journalFeedFinder) {
248         this.journalFeedFinder = journalFeedFinder;
249     }
250 
251     public JournalStructureLocalService getJournalStructureLocalService() {
252         return journalStructureLocalService;
253     }
254 
255     public void setJournalStructureLocalService(
256         JournalStructureLocalService journalStructureLocalService) {
257         this.journalStructureLocalService = journalStructureLocalService;
258     }
259 
260     public JournalStructureService getJournalStructureService() {
261         return journalStructureService;
262     }
263 
264     public void setJournalStructureService(
265         JournalStructureService journalStructureService) {
266         this.journalStructureService = journalStructureService;
267     }
268 
269     public JournalStructurePersistence getJournalStructurePersistence() {
270         return journalStructurePersistence;
271     }
272 
273     public void setJournalStructurePersistence(
274         JournalStructurePersistence journalStructurePersistence) {
275         this.journalStructurePersistence = journalStructurePersistence;
276     }
277 
278     public JournalStructureFinder getJournalStructureFinder() {
279         return journalStructureFinder;
280     }
281 
282     public void setJournalStructureFinder(
283         JournalStructureFinder journalStructureFinder) {
284         this.journalStructureFinder = journalStructureFinder;
285     }
286 
287     public JournalTemplateLocalService getJournalTemplateLocalService() {
288         return journalTemplateLocalService;
289     }
290 
291     public void setJournalTemplateLocalService(
292         JournalTemplateLocalService journalTemplateLocalService) {
293         this.journalTemplateLocalService = journalTemplateLocalService;
294     }
295 
296     public JournalTemplateService getJournalTemplateService() {
297         return journalTemplateService;
298     }
299 
300     public void setJournalTemplateService(
301         JournalTemplateService journalTemplateService) {
302         this.journalTemplateService = journalTemplateService;
303     }
304 
305     public JournalTemplatePersistence getJournalTemplatePersistence() {
306         return journalTemplatePersistence;
307     }
308 
309     public void setJournalTemplatePersistence(
310         JournalTemplatePersistence journalTemplatePersistence) {
311         this.journalTemplatePersistence = journalTemplatePersistence;
312     }
313 
314     public JournalTemplateFinder getJournalTemplateFinder() {
315         return journalTemplateFinder;
316     }
317 
318     public void setJournalTemplateFinder(
319         JournalTemplateFinder journalTemplateFinder) {
320         this.journalTemplateFinder = journalTemplateFinder;
321     }
322 
323     public CounterLocalService getCounterLocalService() {
324         return counterLocalService;
325     }
326 
327     public void setCounterLocalService(CounterLocalService counterLocalService) {
328         this.counterLocalService = counterLocalService;
329     }
330 
331     public CounterService getCounterService() {
332         return counterService;
333     }
334 
335     public void setCounterService(CounterService counterService) {
336         this.counterService = counterService;
337     }
338 
339     public void afterPropertiesSet() {
340         if (journalArticleLocalService == null) {
341             journalArticleLocalService = JournalArticleLocalServiceFactory.getImpl();
342         }
343 
344         if (journalArticleService == null) {
345             journalArticleService = JournalArticleServiceFactory.getImpl();
346         }
347 
348         if (journalArticlePersistence == null) {
349             journalArticlePersistence = JournalArticleUtil.getPersistence();
350         }
351 
352         if (journalArticleFinder == null) {
353             journalArticleFinder = JournalArticleFinderUtil.getFinder();
354         }
355 
356         if (journalArticleImagePersistence == null) {
357             journalArticleImagePersistence = JournalArticleImageUtil.getPersistence();
358         }
359 
360         if (journalArticleResourceLocalService == null) {
361             journalArticleResourceLocalService = JournalArticleResourceLocalServiceFactory.getImpl();
362         }
363 
364         if (journalArticleResourcePersistence == null) {
365             journalArticleResourcePersistence = JournalArticleResourceUtil.getPersistence();
366         }
367 
368         if (journalContentSearchLocalService == null) {
369             journalContentSearchLocalService = JournalContentSearchLocalServiceFactory.getImpl();
370         }
371 
372         if (journalContentSearchPersistence == null) {
373             journalContentSearchPersistence = JournalContentSearchUtil.getPersistence();
374         }
375 
376         if (journalFeedLocalService == null) {
377             journalFeedLocalService = JournalFeedLocalServiceFactory.getImpl();
378         }
379 
380         if (journalFeedService == null) {
381             journalFeedService = JournalFeedServiceFactory.getImpl();
382         }
383 
384         if (journalFeedPersistence == null) {
385             journalFeedPersistence = JournalFeedUtil.getPersistence();
386         }
387 
388         if (journalFeedFinder == null) {
389             journalFeedFinder = JournalFeedFinderUtil.getFinder();
390         }
391 
392         if (journalStructureLocalService == null) {
393             journalStructureLocalService = JournalStructureLocalServiceFactory.getImpl();
394         }
395 
396         if (journalStructureService == null) {
397             journalStructureService = JournalStructureServiceFactory.getImpl();
398         }
399 
400         if (journalStructurePersistence == null) {
401             journalStructurePersistence = JournalStructureUtil.getPersistence();
402         }
403 
404         if (journalStructureFinder == null) {
405             journalStructureFinder = JournalStructureFinderUtil.getFinder();
406         }
407 
408         if (journalTemplateLocalService == null) {
409             journalTemplateLocalService = JournalTemplateLocalServiceFactory.getImpl();
410         }
411 
412         if (journalTemplateService == null) {
413             journalTemplateService = JournalTemplateServiceFactory.getImpl();
414         }
415 
416         if (journalTemplatePersistence == null) {
417             journalTemplatePersistence = JournalTemplateUtil.getPersistence();
418         }
419 
420         if (journalTemplateFinder == null) {
421             journalTemplateFinder = JournalTemplateFinderUtil.getFinder();
422         }
423 
424         if (counterLocalService == null) {
425             counterLocalService = CounterLocalServiceFactory.getImpl();
426         }
427 
428         if (counterService == null) {
429             counterService = CounterServiceFactory.getImpl();
430         }
431     }
432 
433     protected JournalArticleLocalService journalArticleLocalService;
434     protected JournalArticleService journalArticleService;
435     protected JournalArticlePersistence journalArticlePersistence;
436     protected JournalArticleFinder journalArticleFinder;
437     protected JournalArticleImagePersistence journalArticleImagePersistence;
438     protected JournalArticleResourceLocalService journalArticleResourceLocalService;
439     protected JournalArticleResourcePersistence journalArticleResourcePersistence;
440     protected JournalContentSearchLocalService journalContentSearchLocalService;
441     protected JournalContentSearchPersistence journalContentSearchPersistence;
442     protected JournalFeedLocalService journalFeedLocalService;
443     protected JournalFeedService journalFeedService;
444     protected JournalFeedPersistence journalFeedPersistence;
445     protected JournalFeedFinder journalFeedFinder;
446     protected JournalStructureLocalService journalStructureLocalService;
447     protected JournalStructureService journalStructureService;
448     protected JournalStructurePersistence journalStructurePersistence;
449     protected JournalStructureFinder journalStructureFinder;
450     protected JournalTemplateLocalService journalTemplateLocalService;
451     protected JournalTemplateService journalTemplateService;
452     protected JournalTemplatePersistence journalTemplatePersistence;
453     protected JournalTemplateFinder journalTemplateFinder;
454     protected CounterLocalService counterLocalService;
455     protected CounterService counterService;
456 }