001    /**
002     * Copyright (c) 2000-2012 Liferay, Inc. All rights reserved.
003     *
004     * This library is free software; you can redistribute it and/or modify it under
005     * the terms of the GNU Lesser General Public License as published by the Free
006     * Software Foundation; either version 2.1 of the License, or (at your option)
007     * any later version.
008     *
009     * This library is distributed in the hope that it will be useful, but WITHOUT
010     * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
011     * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
012     * details.
013     */
014    
015    package com.liferay.portlet.dynamicdatamapping.service.base;
016    
017    import com.liferay.counter.service.CounterLocalService;
018    
019    import com.liferay.portal.kernel.bean.BeanReference;
020    import com.liferay.portal.kernel.bean.IdentifiableBean;
021    import com.liferay.portal.kernel.dao.jdbc.SqlUpdate;
022    import com.liferay.portal.kernel.dao.jdbc.SqlUpdateFactoryUtil;
023    import com.liferay.portal.kernel.exception.SystemException;
024    import com.liferay.portal.service.BaseServiceImpl;
025    import com.liferay.portal.service.GroupLocalService;
026    import com.liferay.portal.service.GroupService;
027    import com.liferay.portal.service.ImageLocalService;
028    import com.liferay.portal.service.ImageService;
029    import com.liferay.portal.service.ResourceLocalService;
030    import com.liferay.portal.service.UserLocalService;
031    import com.liferay.portal.service.UserService;
032    import com.liferay.portal.service.persistence.GroupFinder;
033    import com.liferay.portal.service.persistence.GroupPersistence;
034    import com.liferay.portal.service.persistence.ImagePersistence;
035    import com.liferay.portal.service.persistence.UserFinder;
036    import com.liferay.portal.service.persistence.UserPersistence;
037    
038    import com.liferay.portlet.dynamicdatamapping.model.DDMTemplate;
039    import com.liferay.portlet.dynamicdatamapping.service.DDMContentLocalService;
040    import com.liferay.portlet.dynamicdatamapping.service.DDMStorageLinkLocalService;
041    import com.liferay.portlet.dynamicdatamapping.service.DDMStructureLinkLocalService;
042    import com.liferay.portlet.dynamicdatamapping.service.DDMStructureLocalService;
043    import com.liferay.portlet.dynamicdatamapping.service.DDMStructureService;
044    import com.liferay.portlet.dynamicdatamapping.service.DDMTemplateLocalService;
045    import com.liferay.portlet.dynamicdatamapping.service.DDMTemplateService;
046    import com.liferay.portlet.dynamicdatamapping.service.persistence.DDMContentPersistence;
047    import com.liferay.portlet.dynamicdatamapping.service.persistence.DDMStorageLinkPersistence;
048    import com.liferay.portlet.dynamicdatamapping.service.persistence.DDMStructureFinder;
049    import com.liferay.portlet.dynamicdatamapping.service.persistence.DDMStructureLinkPersistence;
050    import com.liferay.portlet.dynamicdatamapping.service.persistence.DDMStructurePersistence;
051    import com.liferay.portlet.dynamicdatamapping.service.persistence.DDMTemplateFinder;
052    import com.liferay.portlet.dynamicdatamapping.service.persistence.DDMTemplatePersistence;
053    
054    import javax.sql.DataSource;
055    
056    /**
057     * The base implementation of the d d m template remote service.
058     *
059     * <p>
060     * This implementation exists only as a container for the default service methods generated by ServiceBuilder. All custom service methods should be put in {@link com.liferay.portlet.dynamicdatamapping.service.impl.DDMTemplateServiceImpl}.
061     * </p>
062     *
063     * @author Brian Wing Shun Chan
064     * @see com.liferay.portlet.dynamicdatamapping.service.impl.DDMTemplateServiceImpl
065     * @see com.liferay.portlet.dynamicdatamapping.service.DDMTemplateServiceUtil
066     * @generated
067     */
068    public abstract class DDMTemplateServiceBaseImpl extends BaseServiceImpl
069            implements DDMTemplateService, IdentifiableBean {
070            /*
071             * NOTE FOR DEVELOPERS:
072             *
073             * Never modify or reference this class directly. Always use {@link com.liferay.portlet.dynamicdatamapping.service.DDMTemplateServiceUtil} to access the d d m template remote service.
074             */
075    
076            /**
077             * Returns the d d m content local service.
078             *
079             * @return the d d m content local service
080             */
081            public DDMContentLocalService getDDMContentLocalService() {
082                    return ddmContentLocalService;
083            }
084    
085            /**
086             * Sets the d d m content local service.
087             *
088             * @param ddmContentLocalService the d d m content local service
089             */
090            public void setDDMContentLocalService(
091                    DDMContentLocalService ddmContentLocalService) {
092                    this.ddmContentLocalService = ddmContentLocalService;
093            }
094    
095            /**
096             * Returns the d d m content persistence.
097             *
098             * @return the d d m content persistence
099             */
100            public DDMContentPersistence getDDMContentPersistence() {
101                    return ddmContentPersistence;
102            }
103    
104            /**
105             * Sets the d d m content persistence.
106             *
107             * @param ddmContentPersistence the d d m content persistence
108             */
109            public void setDDMContentPersistence(
110                    DDMContentPersistence ddmContentPersistence) {
111                    this.ddmContentPersistence = ddmContentPersistence;
112            }
113    
114            /**
115             * Returns the d d m storage link local service.
116             *
117             * @return the d d m storage link local service
118             */
119            public DDMStorageLinkLocalService getDDMStorageLinkLocalService() {
120                    return ddmStorageLinkLocalService;
121            }
122    
123            /**
124             * Sets the d d m storage link local service.
125             *
126             * @param ddmStorageLinkLocalService the d d m storage link local service
127             */
128            public void setDDMStorageLinkLocalService(
129                    DDMStorageLinkLocalService ddmStorageLinkLocalService) {
130                    this.ddmStorageLinkLocalService = ddmStorageLinkLocalService;
131            }
132    
133            /**
134             * Returns the d d m storage link persistence.
135             *
136             * @return the d d m storage link persistence
137             */
138            public DDMStorageLinkPersistence getDDMStorageLinkPersistence() {
139                    return ddmStorageLinkPersistence;
140            }
141    
142            /**
143             * Sets the d d m storage link persistence.
144             *
145             * @param ddmStorageLinkPersistence the d d m storage link persistence
146             */
147            public void setDDMStorageLinkPersistence(
148                    DDMStorageLinkPersistence ddmStorageLinkPersistence) {
149                    this.ddmStorageLinkPersistence = ddmStorageLinkPersistence;
150            }
151    
152            /**
153             * Returns the d d m structure local service.
154             *
155             * @return the d d m structure local service
156             */
157            public DDMStructureLocalService getDDMStructureLocalService() {
158                    return ddmStructureLocalService;
159            }
160    
161            /**
162             * Sets the d d m structure local service.
163             *
164             * @param ddmStructureLocalService the d d m structure local service
165             */
166            public void setDDMStructureLocalService(
167                    DDMStructureLocalService ddmStructureLocalService) {
168                    this.ddmStructureLocalService = ddmStructureLocalService;
169            }
170    
171            /**
172             * Returns the d d m structure remote service.
173             *
174             * @return the d d m structure remote service
175             */
176            public DDMStructureService getDDMStructureService() {
177                    return ddmStructureService;
178            }
179    
180            /**
181             * Sets the d d m structure remote service.
182             *
183             * @param ddmStructureService the d d m structure remote service
184             */
185            public void setDDMStructureService(DDMStructureService ddmStructureService) {
186                    this.ddmStructureService = ddmStructureService;
187            }
188    
189            /**
190             * Returns the d d m structure persistence.
191             *
192             * @return the d d m structure persistence
193             */
194            public DDMStructurePersistence getDDMStructurePersistence() {
195                    return ddmStructurePersistence;
196            }
197    
198            /**
199             * Sets the d d m structure persistence.
200             *
201             * @param ddmStructurePersistence the d d m structure persistence
202             */
203            public void setDDMStructurePersistence(
204                    DDMStructurePersistence ddmStructurePersistence) {
205                    this.ddmStructurePersistence = ddmStructurePersistence;
206            }
207    
208            /**
209             * Returns the d d m structure finder.
210             *
211             * @return the d d m structure finder
212             */
213            public DDMStructureFinder getDDMStructureFinder() {
214                    return ddmStructureFinder;
215            }
216    
217            /**
218             * Sets the d d m structure finder.
219             *
220             * @param ddmStructureFinder the d d m structure finder
221             */
222            public void setDDMStructureFinder(DDMStructureFinder ddmStructureFinder) {
223                    this.ddmStructureFinder = ddmStructureFinder;
224            }
225    
226            /**
227             * Returns the d d m structure link local service.
228             *
229             * @return the d d m structure link local service
230             */
231            public DDMStructureLinkLocalService getDDMStructureLinkLocalService() {
232                    return ddmStructureLinkLocalService;
233            }
234    
235            /**
236             * Sets the d d m structure link local service.
237             *
238             * @param ddmStructureLinkLocalService the d d m structure link local service
239             */
240            public void setDDMStructureLinkLocalService(
241                    DDMStructureLinkLocalService ddmStructureLinkLocalService) {
242                    this.ddmStructureLinkLocalService = ddmStructureLinkLocalService;
243            }
244    
245            /**
246             * Returns the d d m structure link persistence.
247             *
248             * @return the d d m structure link persistence
249             */
250            public DDMStructureLinkPersistence getDDMStructureLinkPersistence() {
251                    return ddmStructureLinkPersistence;
252            }
253    
254            /**
255             * Sets the d d m structure link persistence.
256             *
257             * @param ddmStructureLinkPersistence the d d m structure link persistence
258             */
259            public void setDDMStructureLinkPersistence(
260                    DDMStructureLinkPersistence ddmStructureLinkPersistence) {
261                    this.ddmStructureLinkPersistence = ddmStructureLinkPersistence;
262            }
263    
264            /**
265             * Returns the d d m template local service.
266             *
267             * @return the d d m template local service
268             */
269            public DDMTemplateLocalService getDDMTemplateLocalService() {
270                    return ddmTemplateLocalService;
271            }
272    
273            /**
274             * Sets the d d m template local service.
275             *
276             * @param ddmTemplateLocalService the d d m template local service
277             */
278            public void setDDMTemplateLocalService(
279                    DDMTemplateLocalService ddmTemplateLocalService) {
280                    this.ddmTemplateLocalService = ddmTemplateLocalService;
281            }
282    
283            /**
284             * Returns the d d m template remote service.
285             *
286             * @return the d d m template remote service
287             */
288            public DDMTemplateService getDDMTemplateService() {
289                    return ddmTemplateService;
290            }
291    
292            /**
293             * Sets the d d m template remote service.
294             *
295             * @param ddmTemplateService the d d m template remote service
296             */
297            public void setDDMTemplateService(DDMTemplateService ddmTemplateService) {
298                    this.ddmTemplateService = ddmTemplateService;
299            }
300    
301            /**
302             * Returns the d d m template persistence.
303             *
304             * @return the d d m template persistence
305             */
306            public DDMTemplatePersistence getDDMTemplatePersistence() {
307                    return ddmTemplatePersistence;
308            }
309    
310            /**
311             * Sets the d d m template persistence.
312             *
313             * @param ddmTemplatePersistence the d d m template persistence
314             */
315            public void setDDMTemplatePersistence(
316                    DDMTemplatePersistence ddmTemplatePersistence) {
317                    this.ddmTemplatePersistence = ddmTemplatePersistence;
318            }
319    
320            /**
321             * Returns the d d m template finder.
322             *
323             * @return the d d m template finder
324             */
325            public DDMTemplateFinder getDDMTemplateFinder() {
326                    return ddmTemplateFinder;
327            }
328    
329            /**
330             * Sets the d d m template finder.
331             *
332             * @param ddmTemplateFinder the d d m template finder
333             */
334            public void setDDMTemplateFinder(DDMTemplateFinder ddmTemplateFinder) {
335                    this.ddmTemplateFinder = ddmTemplateFinder;
336            }
337    
338            /**
339             * Returns the counter local service.
340             *
341             * @return the counter local service
342             */
343            public CounterLocalService getCounterLocalService() {
344                    return counterLocalService;
345            }
346    
347            /**
348             * Sets the counter local service.
349             *
350             * @param counterLocalService the counter local service
351             */
352            public void setCounterLocalService(CounterLocalService counterLocalService) {
353                    this.counterLocalService = counterLocalService;
354            }
355    
356            /**
357             * Returns the group local service.
358             *
359             * @return the group local service
360             */
361            public GroupLocalService getGroupLocalService() {
362                    return groupLocalService;
363            }
364    
365            /**
366             * Sets the group local service.
367             *
368             * @param groupLocalService the group local service
369             */
370            public void setGroupLocalService(GroupLocalService groupLocalService) {
371                    this.groupLocalService = groupLocalService;
372            }
373    
374            /**
375             * Returns the group remote service.
376             *
377             * @return the group remote service
378             */
379            public GroupService getGroupService() {
380                    return groupService;
381            }
382    
383            /**
384             * Sets the group remote service.
385             *
386             * @param groupService the group remote service
387             */
388            public void setGroupService(GroupService groupService) {
389                    this.groupService = groupService;
390            }
391    
392            /**
393             * Returns the group persistence.
394             *
395             * @return the group persistence
396             */
397            public GroupPersistence getGroupPersistence() {
398                    return groupPersistence;
399            }
400    
401            /**
402             * Sets the group persistence.
403             *
404             * @param groupPersistence the group persistence
405             */
406            public void setGroupPersistence(GroupPersistence groupPersistence) {
407                    this.groupPersistence = groupPersistence;
408            }
409    
410            /**
411             * Returns the group finder.
412             *
413             * @return the group finder
414             */
415            public GroupFinder getGroupFinder() {
416                    return groupFinder;
417            }
418    
419            /**
420             * Sets the group finder.
421             *
422             * @param groupFinder the group finder
423             */
424            public void setGroupFinder(GroupFinder groupFinder) {
425                    this.groupFinder = groupFinder;
426            }
427    
428            /**
429             * Returns the image local service.
430             *
431             * @return the image local service
432             */
433            public ImageLocalService getImageLocalService() {
434                    return imageLocalService;
435            }
436    
437            /**
438             * Sets the image local service.
439             *
440             * @param imageLocalService the image local service
441             */
442            public void setImageLocalService(ImageLocalService imageLocalService) {
443                    this.imageLocalService = imageLocalService;
444            }
445    
446            /**
447             * Returns the image remote service.
448             *
449             * @return the image remote service
450             */
451            public ImageService getImageService() {
452                    return imageService;
453            }
454    
455            /**
456             * Sets the image remote service.
457             *
458             * @param imageService the image remote service
459             */
460            public void setImageService(ImageService imageService) {
461                    this.imageService = imageService;
462            }
463    
464            /**
465             * Returns the image persistence.
466             *
467             * @return the image persistence
468             */
469            public ImagePersistence getImagePersistence() {
470                    return imagePersistence;
471            }
472    
473            /**
474             * Sets the image persistence.
475             *
476             * @param imagePersistence the image persistence
477             */
478            public void setImagePersistence(ImagePersistence imagePersistence) {
479                    this.imagePersistence = imagePersistence;
480            }
481    
482            /**
483             * Returns the resource local service.
484             *
485             * @return the resource local service
486             */
487            public ResourceLocalService getResourceLocalService() {
488                    return resourceLocalService;
489            }
490    
491            /**
492             * Sets the resource local service.
493             *
494             * @param resourceLocalService the resource local service
495             */
496            public void setResourceLocalService(
497                    ResourceLocalService resourceLocalService) {
498                    this.resourceLocalService = resourceLocalService;
499            }
500    
501            /**
502             * Returns the user local service.
503             *
504             * @return the user local service
505             */
506            public UserLocalService getUserLocalService() {
507                    return userLocalService;
508            }
509    
510            /**
511             * Sets the user local service.
512             *
513             * @param userLocalService the user local service
514             */
515            public void setUserLocalService(UserLocalService userLocalService) {
516                    this.userLocalService = userLocalService;
517            }
518    
519            /**
520             * Returns the user remote service.
521             *
522             * @return the user remote service
523             */
524            public UserService getUserService() {
525                    return userService;
526            }
527    
528            /**
529             * Sets the user remote service.
530             *
531             * @param userService the user remote service
532             */
533            public void setUserService(UserService userService) {
534                    this.userService = userService;
535            }
536    
537            /**
538             * Returns the user persistence.
539             *
540             * @return the user persistence
541             */
542            public UserPersistence getUserPersistence() {
543                    return userPersistence;
544            }
545    
546            /**
547             * Sets the user persistence.
548             *
549             * @param userPersistence the user persistence
550             */
551            public void setUserPersistence(UserPersistence userPersistence) {
552                    this.userPersistence = userPersistence;
553            }
554    
555            /**
556             * Returns the user finder.
557             *
558             * @return the user finder
559             */
560            public UserFinder getUserFinder() {
561                    return userFinder;
562            }
563    
564            /**
565             * Sets the user finder.
566             *
567             * @param userFinder the user finder
568             */
569            public void setUserFinder(UserFinder userFinder) {
570                    this.userFinder = userFinder;
571            }
572    
573            public void afterPropertiesSet() {
574            }
575    
576            public void destroy() {
577            }
578    
579            /**
580             * Returns the Spring bean ID for this bean.
581             *
582             * @return the Spring bean ID for this bean
583             */
584            public String getBeanIdentifier() {
585                    return _beanIdentifier;
586            }
587    
588            /**
589             * Sets the Spring bean ID for this bean.
590             *
591             * @param beanIdentifier the Spring bean ID for this bean
592             */
593            public void setBeanIdentifier(String beanIdentifier) {
594                    _beanIdentifier = beanIdentifier;
595            }
596    
597            protected Class<?> getModelClass() {
598                    return DDMTemplate.class;
599            }
600    
601            protected String getModelClassName() {
602                    return DDMTemplate.class.getName();
603            }
604    
605            /**
606             * Performs an SQL query.
607             *
608             * @param sql the sql query
609             */
610            protected void runSQL(String sql) throws SystemException {
611                    try {
612                            DataSource dataSource = ddmTemplatePersistence.getDataSource();
613    
614                            SqlUpdate sqlUpdate = SqlUpdateFactoryUtil.getSqlUpdate(dataSource,
615                                            sql, new int[0]);
616    
617                            sqlUpdate.update();
618                    }
619                    catch (Exception e) {
620                            throw new SystemException(e);
621                    }
622            }
623    
624            @BeanReference(type = DDMContentLocalService.class)
625            protected DDMContentLocalService ddmContentLocalService;
626            @BeanReference(type = DDMContentPersistence.class)
627            protected DDMContentPersistence ddmContentPersistence;
628            @BeanReference(type = DDMStorageLinkLocalService.class)
629            protected DDMStorageLinkLocalService ddmStorageLinkLocalService;
630            @BeanReference(type = DDMStorageLinkPersistence.class)
631            protected DDMStorageLinkPersistence ddmStorageLinkPersistence;
632            @BeanReference(type = DDMStructureLocalService.class)
633            protected DDMStructureLocalService ddmStructureLocalService;
634            @BeanReference(type = DDMStructureService.class)
635            protected DDMStructureService ddmStructureService;
636            @BeanReference(type = DDMStructurePersistence.class)
637            protected DDMStructurePersistence ddmStructurePersistence;
638            @BeanReference(type = DDMStructureFinder.class)
639            protected DDMStructureFinder ddmStructureFinder;
640            @BeanReference(type = DDMStructureLinkLocalService.class)
641            protected DDMStructureLinkLocalService ddmStructureLinkLocalService;
642            @BeanReference(type = DDMStructureLinkPersistence.class)
643            protected DDMStructureLinkPersistence ddmStructureLinkPersistence;
644            @BeanReference(type = DDMTemplateLocalService.class)
645            protected DDMTemplateLocalService ddmTemplateLocalService;
646            @BeanReference(type = DDMTemplateService.class)
647            protected DDMTemplateService ddmTemplateService;
648            @BeanReference(type = DDMTemplatePersistence.class)
649            protected DDMTemplatePersistence ddmTemplatePersistence;
650            @BeanReference(type = DDMTemplateFinder.class)
651            protected DDMTemplateFinder ddmTemplateFinder;
652            @BeanReference(type = CounterLocalService.class)
653            protected CounterLocalService counterLocalService;
654            @BeanReference(type = GroupLocalService.class)
655            protected GroupLocalService groupLocalService;
656            @BeanReference(type = GroupService.class)
657            protected GroupService groupService;
658            @BeanReference(type = GroupPersistence.class)
659            protected GroupPersistence groupPersistence;
660            @BeanReference(type = GroupFinder.class)
661            protected GroupFinder groupFinder;
662            @BeanReference(type = ImageLocalService.class)
663            protected ImageLocalService imageLocalService;
664            @BeanReference(type = ImageService.class)
665            protected ImageService imageService;
666            @BeanReference(type = ImagePersistence.class)
667            protected ImagePersistence imagePersistence;
668            @BeanReference(type = ResourceLocalService.class)
669            protected ResourceLocalService resourceLocalService;
670            @BeanReference(type = UserLocalService.class)
671            protected UserLocalService userLocalService;
672            @BeanReference(type = UserService.class)
673            protected UserService userService;
674            @BeanReference(type = UserPersistence.class)
675            protected UserPersistence userPersistence;
676            @BeanReference(type = UserFinder.class)
677            protected UserFinder userFinder;
678            private String _beanIdentifier;
679    }