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