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