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         return journalArticleImagePersistence.update(model, true);
122     }
123 
124     public JournalArticleLocalService getJournalArticleLocalService() {
125         return journalArticleLocalService;
126     }
127 
128     public void setJournalArticleLocalService(
129         JournalArticleLocalService journalArticleLocalService) {
130         this.journalArticleLocalService = journalArticleLocalService;
131     }
132 
133     public JournalArticleService getJournalArticleService() {
134         return journalArticleService;
135     }
136 
137     public void setJournalArticleService(
138         JournalArticleService journalArticleService) {
139         this.journalArticleService = journalArticleService;
140     }
141 
142     public JournalArticlePersistence getJournalArticlePersistence() {
143         return journalArticlePersistence;
144     }
145 
146     public void setJournalArticlePersistence(
147         JournalArticlePersistence journalArticlePersistence) {
148         this.journalArticlePersistence = journalArticlePersistence;
149     }
150 
151     public JournalArticleFinder getJournalArticleFinder() {
152         return journalArticleFinder;
153     }
154 
155     public void setJournalArticleFinder(
156         JournalArticleFinder journalArticleFinder) {
157         this.journalArticleFinder = journalArticleFinder;
158     }
159 
160     public JournalArticleImagePersistence getJournalArticleImagePersistence() {
161         return journalArticleImagePersistence;
162     }
163 
164     public void setJournalArticleImagePersistence(
165         JournalArticleImagePersistence journalArticleImagePersistence) {
166         this.journalArticleImagePersistence = journalArticleImagePersistence;
167     }
168 
169     public JournalArticleResourceLocalService getJournalArticleResourceLocalService() {
170         return journalArticleResourceLocalService;
171     }
172 
173     public void setJournalArticleResourceLocalService(
174         JournalArticleResourceLocalService journalArticleResourceLocalService) {
175         this.journalArticleResourceLocalService = journalArticleResourceLocalService;
176     }
177 
178     public JournalArticleResourcePersistence getJournalArticleResourcePersistence() {
179         return journalArticleResourcePersistence;
180     }
181 
182     public void setJournalArticleResourcePersistence(
183         JournalArticleResourcePersistence journalArticleResourcePersistence) {
184         this.journalArticleResourcePersistence = journalArticleResourcePersistence;
185     }
186 
187     public JournalContentSearchLocalService getJournalContentSearchLocalService() {
188         return journalContentSearchLocalService;
189     }
190 
191     public void setJournalContentSearchLocalService(
192         JournalContentSearchLocalService journalContentSearchLocalService) {
193         this.journalContentSearchLocalService = journalContentSearchLocalService;
194     }
195 
196     public JournalContentSearchPersistence getJournalContentSearchPersistence() {
197         return journalContentSearchPersistence;
198     }
199 
200     public void setJournalContentSearchPersistence(
201         JournalContentSearchPersistence journalContentSearchPersistence) {
202         this.journalContentSearchPersistence = journalContentSearchPersistence;
203     }
204 
205     public JournalFeedLocalService getJournalFeedLocalService() {
206         return journalFeedLocalService;
207     }
208 
209     public void setJournalFeedLocalService(
210         JournalFeedLocalService journalFeedLocalService) {
211         this.journalFeedLocalService = journalFeedLocalService;
212     }
213 
214     public JournalFeedService getJournalFeedService() {
215         return journalFeedService;
216     }
217 
218     public void setJournalFeedService(JournalFeedService journalFeedService) {
219         this.journalFeedService = journalFeedService;
220     }
221 
222     public JournalFeedPersistence getJournalFeedPersistence() {
223         return journalFeedPersistence;
224     }
225 
226     public void setJournalFeedPersistence(
227         JournalFeedPersistence journalFeedPersistence) {
228         this.journalFeedPersistence = journalFeedPersistence;
229     }
230 
231     public JournalFeedFinder getJournalFeedFinder() {
232         return journalFeedFinder;
233     }
234 
235     public void setJournalFeedFinder(JournalFeedFinder journalFeedFinder) {
236         this.journalFeedFinder = journalFeedFinder;
237     }
238 
239     public JournalStructureLocalService getJournalStructureLocalService() {
240         return journalStructureLocalService;
241     }
242 
243     public void setJournalStructureLocalService(
244         JournalStructureLocalService journalStructureLocalService) {
245         this.journalStructureLocalService = journalStructureLocalService;
246     }
247 
248     public JournalStructureService getJournalStructureService() {
249         return journalStructureService;
250     }
251 
252     public void setJournalStructureService(
253         JournalStructureService journalStructureService) {
254         this.journalStructureService = journalStructureService;
255     }
256 
257     public JournalStructurePersistence getJournalStructurePersistence() {
258         return journalStructurePersistence;
259     }
260 
261     public void setJournalStructurePersistence(
262         JournalStructurePersistence journalStructurePersistence) {
263         this.journalStructurePersistence = journalStructurePersistence;
264     }
265 
266     public JournalStructureFinder getJournalStructureFinder() {
267         return journalStructureFinder;
268     }
269 
270     public void setJournalStructureFinder(
271         JournalStructureFinder journalStructureFinder) {
272         this.journalStructureFinder = journalStructureFinder;
273     }
274 
275     public JournalTemplateLocalService getJournalTemplateLocalService() {
276         return journalTemplateLocalService;
277     }
278 
279     public void setJournalTemplateLocalService(
280         JournalTemplateLocalService journalTemplateLocalService) {
281         this.journalTemplateLocalService = journalTemplateLocalService;
282     }
283 
284     public JournalTemplateService getJournalTemplateService() {
285         return journalTemplateService;
286     }
287 
288     public void setJournalTemplateService(
289         JournalTemplateService journalTemplateService) {
290         this.journalTemplateService = journalTemplateService;
291     }
292 
293     public JournalTemplatePersistence getJournalTemplatePersistence() {
294         return journalTemplatePersistence;
295     }
296 
297     public void setJournalTemplatePersistence(
298         JournalTemplatePersistence journalTemplatePersistence) {
299         this.journalTemplatePersistence = journalTemplatePersistence;
300     }
301 
302     public JournalTemplateFinder getJournalTemplateFinder() {
303         return journalTemplateFinder;
304     }
305 
306     public void setJournalTemplateFinder(
307         JournalTemplateFinder journalTemplateFinder) {
308         this.journalTemplateFinder = journalTemplateFinder;
309     }
310 
311     public CounterLocalService getCounterLocalService() {
312         return counterLocalService;
313     }
314 
315     public void setCounterLocalService(CounterLocalService counterLocalService) {
316         this.counterLocalService = counterLocalService;
317     }
318 
319     public CounterService getCounterService() {
320         return counterService;
321     }
322 
323     public void setCounterService(CounterService counterService) {
324         this.counterService = counterService;
325     }
326 
327     public void afterPropertiesSet() {
328         if (journalArticleLocalService == null) {
329             journalArticleLocalService = JournalArticleLocalServiceFactory.getImpl();
330         }
331 
332         if (journalArticleService == null) {
333             journalArticleService = JournalArticleServiceFactory.getImpl();
334         }
335 
336         if (journalArticlePersistence == null) {
337             journalArticlePersistence = JournalArticleUtil.getPersistence();
338         }
339 
340         if (journalArticleFinder == null) {
341             journalArticleFinder = JournalArticleFinderUtil.getFinder();
342         }
343 
344         if (journalArticleImagePersistence == null) {
345             journalArticleImagePersistence = JournalArticleImageUtil.getPersistence();
346         }
347 
348         if (journalArticleResourceLocalService == null) {
349             journalArticleResourceLocalService = JournalArticleResourceLocalServiceFactory.getImpl();
350         }
351 
352         if (journalArticleResourcePersistence == null) {
353             journalArticleResourcePersistence = JournalArticleResourceUtil.getPersistence();
354         }
355 
356         if (journalContentSearchLocalService == null) {
357             journalContentSearchLocalService = JournalContentSearchLocalServiceFactory.getImpl();
358         }
359 
360         if (journalContentSearchPersistence == null) {
361             journalContentSearchPersistence = JournalContentSearchUtil.getPersistence();
362         }
363 
364         if (journalFeedLocalService == null) {
365             journalFeedLocalService = JournalFeedLocalServiceFactory.getImpl();
366         }
367 
368         if (journalFeedService == null) {
369             journalFeedService = JournalFeedServiceFactory.getImpl();
370         }
371 
372         if (journalFeedPersistence == null) {
373             journalFeedPersistence = JournalFeedUtil.getPersistence();
374         }
375 
376         if (journalFeedFinder == null) {
377             journalFeedFinder = JournalFeedFinderUtil.getFinder();
378         }
379 
380         if (journalStructureLocalService == null) {
381             journalStructureLocalService = JournalStructureLocalServiceFactory.getImpl();
382         }
383 
384         if (journalStructureService == null) {
385             journalStructureService = JournalStructureServiceFactory.getImpl();
386         }
387 
388         if (journalStructurePersistence == null) {
389             journalStructurePersistence = JournalStructureUtil.getPersistence();
390         }
391 
392         if (journalStructureFinder == null) {
393             journalStructureFinder = JournalStructureFinderUtil.getFinder();
394         }
395 
396         if (journalTemplateLocalService == null) {
397             journalTemplateLocalService = JournalTemplateLocalServiceFactory.getImpl();
398         }
399 
400         if (journalTemplateService == null) {
401             journalTemplateService = JournalTemplateServiceFactory.getImpl();
402         }
403 
404         if (journalTemplatePersistence == null) {
405             journalTemplatePersistence = JournalTemplateUtil.getPersistence();
406         }
407 
408         if (journalTemplateFinder == null) {
409             journalTemplateFinder = JournalTemplateFinderUtil.getFinder();
410         }
411 
412         if (counterLocalService == null) {
413             counterLocalService = CounterLocalServiceFactory.getImpl();
414         }
415 
416         if (counterService == null) {
417             counterService = CounterServiceFactory.getImpl();
418         }
419     }
420 
421     protected JournalArticleLocalService journalArticleLocalService;
422     protected JournalArticleService journalArticleService;
423     protected JournalArticlePersistence journalArticlePersistence;
424     protected JournalArticleFinder journalArticleFinder;
425     protected JournalArticleImagePersistence journalArticleImagePersistence;
426     protected JournalArticleResourceLocalService journalArticleResourceLocalService;
427     protected JournalArticleResourcePersistence journalArticleResourcePersistence;
428     protected JournalContentSearchLocalService journalContentSearchLocalService;
429     protected JournalContentSearchPersistence journalContentSearchPersistence;
430     protected JournalFeedLocalService journalFeedLocalService;
431     protected JournalFeedService journalFeedService;
432     protected JournalFeedPersistence journalFeedPersistence;
433     protected JournalFeedFinder journalFeedFinder;
434     protected JournalStructureLocalService journalStructureLocalService;
435     protected JournalStructureService journalStructureService;
436     protected JournalStructurePersistence journalStructurePersistence;
437     protected JournalStructureFinder journalStructureFinder;
438     protected JournalTemplateLocalService journalTemplateLocalService;
439     protected JournalTemplateService journalTemplateService;
440     protected JournalTemplatePersistence journalTemplatePersistence;
441     protected JournalTemplateFinder journalTemplateFinder;
442     protected CounterLocalService counterLocalService;
443     protected CounterService counterService;
444 }