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