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