001    /**
002     * Copyright (c) 2000-2013 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.ResourceLocalService;
026    import com.liferay.portal.service.ResourceService;
027    import com.liferay.portal.service.UserLocalService;
028    import com.liferay.portal.service.UserService;
029    import com.liferay.portal.service.persistence.ResourceFinder;
030    import com.liferay.portal.service.persistence.ResourcePersistence;
031    import com.liferay.portal.service.persistence.UserFinder;
032    import com.liferay.portal.service.persistence.UserPersistence;
033    
034    import com.liferay.portlet.dynamicdatamapping.model.DDMTemplate;
035    import com.liferay.portlet.dynamicdatamapping.service.DDMContentLocalService;
036    import com.liferay.portlet.dynamicdatamapping.service.DDMStorageLinkLocalService;
037    import com.liferay.portlet.dynamicdatamapping.service.DDMStructureLinkLocalService;
038    import com.liferay.portlet.dynamicdatamapping.service.DDMStructureLocalService;
039    import com.liferay.portlet.dynamicdatamapping.service.DDMStructureService;
040    import com.liferay.portlet.dynamicdatamapping.service.DDMTemplateLocalService;
041    import com.liferay.portlet.dynamicdatamapping.service.DDMTemplateService;
042    import com.liferay.portlet.dynamicdatamapping.service.persistence.DDMContentPersistence;
043    import com.liferay.portlet.dynamicdatamapping.service.persistence.DDMStorageLinkPersistence;
044    import com.liferay.portlet.dynamicdatamapping.service.persistence.DDMStructureFinder;
045    import com.liferay.portlet.dynamicdatamapping.service.persistence.DDMStructureLinkPersistence;
046    import com.liferay.portlet.dynamicdatamapping.service.persistence.DDMStructurePersistence;
047    import com.liferay.portlet.dynamicdatamapping.service.persistence.DDMTemplateFinder;
048    import com.liferay.portlet.dynamicdatamapping.service.persistence.DDMTemplatePersistence;
049    
050    import javax.sql.DataSource;
051    
052    /**
053     * The base implementation of the d d m template remote service.
054     *
055     * <p>
056     * 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}.
057     * </p>
058     *
059     * @author Brian Wing Shun Chan
060     * @see com.liferay.portlet.dynamicdatamapping.service.impl.DDMTemplateServiceImpl
061     * @see com.liferay.portlet.dynamicdatamapping.service.DDMTemplateServiceUtil
062     * @generated
063     */
064    public abstract class DDMTemplateServiceBaseImpl extends BaseServiceImpl
065            implements DDMTemplateService, IdentifiableBean {
066            /*
067             * NOTE FOR DEVELOPERS:
068             *
069             * 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.
070             */
071    
072            /**
073             * Returns the d d m content local service.
074             *
075             * @return the d d m content local service
076             */
077            public DDMContentLocalService getDDMContentLocalService() {
078                    return ddmContentLocalService;
079            }
080    
081            /**
082             * Sets the d d m content local service.
083             *
084             * @param ddmContentLocalService the d d m content local service
085             */
086            public void setDDMContentLocalService(
087                    DDMContentLocalService ddmContentLocalService) {
088                    this.ddmContentLocalService = ddmContentLocalService;
089            }
090    
091            /**
092             * Returns the d d m content persistence.
093             *
094             * @return the d d m content persistence
095             */
096            public DDMContentPersistence getDDMContentPersistence() {
097                    return ddmContentPersistence;
098            }
099    
100            /**
101             * Sets the d d m content persistence.
102             *
103             * @param ddmContentPersistence the d d m content persistence
104             */
105            public void setDDMContentPersistence(
106                    DDMContentPersistence ddmContentPersistence) {
107                    this.ddmContentPersistence = ddmContentPersistence;
108            }
109    
110            /**
111             * Returns the d d m storage link local service.
112             *
113             * @return the d d m storage link local service
114             */
115            public DDMStorageLinkLocalService getDDMStorageLinkLocalService() {
116                    return ddmStorageLinkLocalService;
117            }
118    
119            /**
120             * Sets the d d m storage link local service.
121             *
122             * @param ddmStorageLinkLocalService the d d m storage link local service
123             */
124            public void setDDMStorageLinkLocalService(
125                    DDMStorageLinkLocalService ddmStorageLinkLocalService) {
126                    this.ddmStorageLinkLocalService = ddmStorageLinkLocalService;
127            }
128    
129            /**
130             * Returns the d d m storage link persistence.
131             *
132             * @return the d d m storage link persistence
133             */
134            public DDMStorageLinkPersistence getDDMStorageLinkPersistence() {
135                    return ddmStorageLinkPersistence;
136            }
137    
138            /**
139             * Sets the d d m storage link persistence.
140             *
141             * @param ddmStorageLinkPersistence the d d m storage link persistence
142             */
143            public void setDDMStorageLinkPersistence(
144                    DDMStorageLinkPersistence ddmStorageLinkPersistence) {
145                    this.ddmStorageLinkPersistence = ddmStorageLinkPersistence;
146            }
147    
148            /**
149             * Returns the d d m structure local service.
150             *
151             * @return the d d m structure local service
152             */
153            public DDMStructureLocalService getDDMStructureLocalService() {
154                    return ddmStructureLocalService;
155            }
156    
157            /**
158             * Sets the d d m structure local service.
159             *
160             * @param ddmStructureLocalService the d d m structure local service
161             */
162            public void setDDMStructureLocalService(
163                    DDMStructureLocalService ddmStructureLocalService) {
164                    this.ddmStructureLocalService = ddmStructureLocalService;
165            }
166    
167            /**
168             * Returns the d d m structure remote service.
169             *
170             * @return the d d m structure remote service
171             */
172            public DDMStructureService getDDMStructureService() {
173                    return ddmStructureService;
174            }
175    
176            /**
177             * Sets the d d m structure remote service.
178             *
179             * @param ddmStructureService the d d m structure remote service
180             */
181            public void setDDMStructureService(DDMStructureService ddmStructureService) {
182                    this.ddmStructureService = ddmStructureService;
183            }
184    
185            /**
186             * Returns the d d m structure persistence.
187             *
188             * @return the d d m structure persistence
189             */
190            public DDMStructurePersistence getDDMStructurePersistence() {
191                    return ddmStructurePersistence;
192            }
193    
194            /**
195             * Sets the d d m structure persistence.
196             *
197             * @param ddmStructurePersistence the d d m structure persistence
198             */
199            public void setDDMStructurePersistence(
200                    DDMStructurePersistence ddmStructurePersistence) {
201                    this.ddmStructurePersistence = ddmStructurePersistence;
202            }
203    
204            /**
205             * Returns the d d m structure finder.
206             *
207             * @return the d d m structure finder
208             */
209            public DDMStructureFinder getDDMStructureFinder() {
210                    return ddmStructureFinder;
211            }
212    
213            /**
214             * Sets the d d m structure finder.
215             *
216             * @param ddmStructureFinder the d d m structure finder
217             */
218            public void setDDMStructureFinder(DDMStructureFinder ddmStructureFinder) {
219                    this.ddmStructureFinder = ddmStructureFinder;
220            }
221    
222            /**
223             * Returns the d d m structure link local service.
224             *
225             * @return the d d m structure link local service
226             */
227            public DDMStructureLinkLocalService getDDMStructureLinkLocalService() {
228                    return ddmStructureLinkLocalService;
229            }
230    
231            /**
232             * Sets the d d m structure link local service.
233             *
234             * @param ddmStructureLinkLocalService the d d m structure link local service
235             */
236            public void setDDMStructureLinkLocalService(
237                    DDMStructureLinkLocalService ddmStructureLinkLocalService) {
238                    this.ddmStructureLinkLocalService = ddmStructureLinkLocalService;
239            }
240    
241            /**
242             * Returns the d d m structure link persistence.
243             *
244             * @return the d d m structure link persistence
245             */
246            public DDMStructureLinkPersistence getDDMStructureLinkPersistence() {
247                    return ddmStructureLinkPersistence;
248            }
249    
250            /**
251             * Sets the d d m structure link persistence.
252             *
253             * @param ddmStructureLinkPersistence the d d m structure link persistence
254             */
255            public void setDDMStructureLinkPersistence(
256                    DDMStructureLinkPersistence ddmStructureLinkPersistence) {
257                    this.ddmStructureLinkPersistence = ddmStructureLinkPersistence;
258            }
259    
260            /**
261             * Returns the d d m template local service.
262             *
263             * @return the d d m template local service
264             */
265            public DDMTemplateLocalService getDDMTemplateLocalService() {
266                    return ddmTemplateLocalService;
267            }
268    
269            /**
270             * Sets the d d m template local service.
271             *
272             * @param ddmTemplateLocalService the d d m template local service
273             */
274            public void setDDMTemplateLocalService(
275                    DDMTemplateLocalService ddmTemplateLocalService) {
276                    this.ddmTemplateLocalService = ddmTemplateLocalService;
277            }
278    
279            /**
280             * Returns the d d m template remote service.
281             *
282             * @return the d d m template remote service
283             */
284            public DDMTemplateService getDDMTemplateService() {
285                    return ddmTemplateService;
286            }
287    
288            /**
289             * Sets the d d m template remote service.
290             *
291             * @param ddmTemplateService the d d m template remote service
292             */
293            public void setDDMTemplateService(DDMTemplateService ddmTemplateService) {
294                    this.ddmTemplateService = ddmTemplateService;
295            }
296    
297            /**
298             * Returns the d d m template persistence.
299             *
300             * @return the d d m template persistence
301             */
302            public DDMTemplatePersistence getDDMTemplatePersistence() {
303                    return ddmTemplatePersistence;
304            }
305    
306            /**
307             * Sets the d d m template persistence.
308             *
309             * @param ddmTemplatePersistence the d d m template persistence
310             */
311            public void setDDMTemplatePersistence(
312                    DDMTemplatePersistence ddmTemplatePersistence) {
313                    this.ddmTemplatePersistence = ddmTemplatePersistence;
314            }
315    
316            /**
317             * Returns the d d m template finder.
318             *
319             * @return the d d m template finder
320             */
321            public DDMTemplateFinder getDDMTemplateFinder() {
322                    return ddmTemplateFinder;
323            }
324    
325            /**
326             * Sets the d d m template finder.
327             *
328             * @param ddmTemplateFinder the d d m template finder
329             */
330            public void setDDMTemplateFinder(DDMTemplateFinder ddmTemplateFinder) {
331                    this.ddmTemplateFinder = ddmTemplateFinder;
332            }
333    
334            /**
335             * Returns the counter local service.
336             *
337             * @return the counter local service
338             */
339            public CounterLocalService getCounterLocalService() {
340                    return counterLocalService;
341            }
342    
343            /**
344             * Sets the counter local service.
345             *
346             * @param counterLocalService the counter local service
347             */
348            public void setCounterLocalService(CounterLocalService counterLocalService) {
349                    this.counterLocalService = counterLocalService;
350            }
351    
352            /**
353             * Returns the resource local service.
354             *
355             * @return the resource local service
356             */
357            public ResourceLocalService getResourceLocalService() {
358                    return resourceLocalService;
359            }
360    
361            /**
362             * Sets the resource local service.
363             *
364             * @param resourceLocalService the resource local service
365             */
366            public void setResourceLocalService(
367                    ResourceLocalService resourceLocalService) {
368                    this.resourceLocalService = resourceLocalService;
369            }
370    
371            /**
372             * Returns the resource remote service.
373             *
374             * @return the resource remote service
375             */
376            public ResourceService getResourceService() {
377                    return resourceService;
378            }
379    
380            /**
381             * Sets the resource remote service.
382             *
383             * @param resourceService the resource remote service
384             */
385            public void setResourceService(ResourceService resourceService) {
386                    this.resourceService = resourceService;
387            }
388    
389            /**
390             * Returns the resource persistence.
391             *
392             * @return the resource persistence
393             */
394            public ResourcePersistence getResourcePersistence() {
395                    return resourcePersistence;
396            }
397    
398            /**
399             * Sets the resource persistence.
400             *
401             * @param resourcePersistence the resource persistence
402             */
403            public void setResourcePersistence(ResourcePersistence resourcePersistence) {
404                    this.resourcePersistence = resourcePersistence;
405            }
406    
407            /**
408             * Returns the resource finder.
409             *
410             * @return the resource finder
411             */
412            public ResourceFinder getResourceFinder() {
413                    return resourceFinder;
414            }
415    
416            /**
417             * Sets the resource finder.
418             *
419             * @param resourceFinder the resource finder
420             */
421            public void setResourceFinder(ResourceFinder resourceFinder) {
422                    this.resourceFinder = resourceFinder;
423            }
424    
425            /**
426             * Returns the user local service.
427             *
428             * @return the user local service
429             */
430            public UserLocalService getUserLocalService() {
431                    return userLocalService;
432            }
433    
434            /**
435             * Sets the user local service.
436             *
437             * @param userLocalService the user local service
438             */
439            public void setUserLocalService(UserLocalService userLocalService) {
440                    this.userLocalService = userLocalService;
441            }
442    
443            /**
444             * Returns the user remote service.
445             *
446             * @return the user remote service
447             */
448            public UserService getUserService() {
449                    return userService;
450            }
451    
452            /**
453             * Sets the user remote service.
454             *
455             * @param userService the user remote service
456             */
457            public void setUserService(UserService userService) {
458                    this.userService = userService;
459            }
460    
461            /**
462             * Returns the user persistence.
463             *
464             * @return the user persistence
465             */
466            public UserPersistence getUserPersistence() {
467                    return userPersistence;
468            }
469    
470            /**
471             * Sets the user persistence.
472             *
473             * @param userPersistence the user persistence
474             */
475            public void setUserPersistence(UserPersistence userPersistence) {
476                    this.userPersistence = userPersistence;
477            }
478    
479            /**
480             * Returns the user finder.
481             *
482             * @return the user finder
483             */
484            public UserFinder getUserFinder() {
485                    return userFinder;
486            }
487    
488            /**
489             * Sets the user finder.
490             *
491             * @param userFinder the user finder
492             */
493            public void setUserFinder(UserFinder userFinder) {
494                    this.userFinder = userFinder;
495            }
496    
497            public void afterPropertiesSet() {
498            }
499    
500            public void destroy() {
501            }
502    
503            /**
504             * Returns the Spring bean ID for this bean.
505             *
506             * @return the Spring bean ID for this bean
507             */
508            public String getBeanIdentifier() {
509                    return _beanIdentifier;
510            }
511    
512            /**
513             * Sets the Spring bean ID for this bean.
514             *
515             * @param beanIdentifier the Spring bean ID for this bean
516             */
517            public void setBeanIdentifier(String beanIdentifier) {
518                    _beanIdentifier = beanIdentifier;
519            }
520    
521            protected Class<?> getModelClass() {
522                    return DDMTemplate.class;
523            }
524    
525            protected String getModelClassName() {
526                    return DDMTemplate.class.getName();
527            }
528    
529            /**
530             * Performs an SQL query.
531             *
532             * @param sql the sql query
533             */
534            protected void runSQL(String sql) throws SystemException {
535                    try {
536                            DataSource dataSource = ddmTemplatePersistence.getDataSource();
537    
538                            SqlUpdate sqlUpdate = SqlUpdateFactoryUtil.getSqlUpdate(dataSource,
539                                            sql, new int[0]);
540    
541                            sqlUpdate.update();
542                    }
543                    catch (Exception e) {
544                            throw new SystemException(e);
545                    }
546            }
547    
548            @BeanReference(type = DDMContentLocalService.class)
549            protected DDMContentLocalService ddmContentLocalService;
550            @BeanReference(type = DDMContentPersistence.class)
551            protected DDMContentPersistence ddmContentPersistence;
552            @BeanReference(type = DDMStorageLinkLocalService.class)
553            protected DDMStorageLinkLocalService ddmStorageLinkLocalService;
554            @BeanReference(type = DDMStorageLinkPersistence.class)
555            protected DDMStorageLinkPersistence ddmStorageLinkPersistence;
556            @BeanReference(type = DDMStructureLocalService.class)
557            protected DDMStructureLocalService ddmStructureLocalService;
558            @BeanReference(type = DDMStructureService.class)
559            protected DDMStructureService ddmStructureService;
560            @BeanReference(type = DDMStructurePersistence.class)
561            protected DDMStructurePersistence ddmStructurePersistence;
562            @BeanReference(type = DDMStructureFinder.class)
563            protected DDMStructureFinder ddmStructureFinder;
564            @BeanReference(type = DDMStructureLinkLocalService.class)
565            protected DDMStructureLinkLocalService ddmStructureLinkLocalService;
566            @BeanReference(type = DDMStructureLinkPersistence.class)
567            protected DDMStructureLinkPersistence ddmStructureLinkPersistence;
568            @BeanReference(type = DDMTemplateLocalService.class)
569            protected DDMTemplateLocalService ddmTemplateLocalService;
570            @BeanReference(type = DDMTemplateService.class)
571            protected DDMTemplateService ddmTemplateService;
572            @BeanReference(type = DDMTemplatePersistence.class)
573            protected DDMTemplatePersistence ddmTemplatePersistence;
574            @BeanReference(type = DDMTemplateFinder.class)
575            protected DDMTemplateFinder ddmTemplateFinder;
576            @BeanReference(type = CounterLocalService.class)
577            protected CounterLocalService counterLocalService;
578            @BeanReference(type = ResourceLocalService.class)
579            protected ResourceLocalService resourceLocalService;
580            @BeanReference(type = ResourceService.class)
581            protected ResourceService resourceService;
582            @BeanReference(type = ResourcePersistence.class)
583            protected ResourcePersistence resourcePersistence;
584            @BeanReference(type = ResourceFinder.class)
585            protected ResourceFinder resourceFinder;
586            @BeanReference(type = UserLocalService.class)
587            protected UserLocalService userLocalService;
588            @BeanReference(type = UserService.class)
589            protected UserService userService;
590            @BeanReference(type = UserPersistence.class)
591            protected UserPersistence userPersistence;
592            @BeanReference(type = UserFinder.class)
593            protected UserFinder userFinder;
594            private String _beanIdentifier;
595    }