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.dao.orm.DynamicQuery;
024    import com.liferay.portal.kernel.dao.orm.DynamicQueryFactoryUtil;
025    import com.liferay.portal.kernel.exception.PortalException;
026    import com.liferay.portal.kernel.exception.SystemException;
027    import com.liferay.portal.kernel.search.Indexable;
028    import com.liferay.portal.kernel.search.IndexableType;
029    import com.liferay.portal.kernel.util.OrderByComparator;
030    import com.liferay.portal.model.PersistedModel;
031    import com.liferay.portal.service.BaseLocalServiceImpl;
032    import com.liferay.portal.service.PersistedModelLocalServiceRegistry;
033    import com.liferay.portal.service.ResourceLocalService;
034    import com.liferay.portal.service.UserLocalService;
035    import com.liferay.portal.service.UserService;
036    import com.liferay.portal.service.persistence.UserFinder;
037    import com.liferay.portal.service.persistence.UserPersistence;
038    
039    import com.liferay.portlet.documentlibrary.service.DLFileEntryTypeLocalService;
040    import com.liferay.portlet.documentlibrary.service.DLFileEntryTypeService;
041    import com.liferay.portlet.documentlibrary.service.persistence.DLFileEntryTypeFinder;
042    import com.liferay.portlet.documentlibrary.service.persistence.DLFileEntryTypePersistence;
043    import com.liferay.portlet.dynamicdatamapping.model.DDMStructure;
044    import com.liferay.portlet.dynamicdatamapping.service.DDMContentLocalService;
045    import com.liferay.portlet.dynamicdatamapping.service.DDMStorageLinkLocalService;
046    import com.liferay.portlet.dynamicdatamapping.service.DDMStructureLinkLocalService;
047    import com.liferay.portlet.dynamicdatamapping.service.DDMStructureLocalService;
048    import com.liferay.portlet.dynamicdatamapping.service.DDMStructureService;
049    import com.liferay.portlet.dynamicdatamapping.service.DDMTemplateLocalService;
050    import com.liferay.portlet.dynamicdatamapping.service.DDMTemplateService;
051    import com.liferay.portlet.dynamicdatamapping.service.persistence.DDMContentPersistence;
052    import com.liferay.portlet.dynamicdatamapping.service.persistence.DDMStorageLinkPersistence;
053    import com.liferay.portlet.dynamicdatamapping.service.persistence.DDMStructureFinder;
054    import com.liferay.portlet.dynamicdatamapping.service.persistence.DDMStructureLinkPersistence;
055    import com.liferay.portlet.dynamicdatamapping.service.persistence.DDMStructurePersistence;
056    import com.liferay.portlet.dynamicdatamapping.service.persistence.DDMTemplateFinder;
057    import com.liferay.portlet.dynamicdatamapping.service.persistence.DDMTemplatePersistence;
058    
059    import java.io.Serializable;
060    
061    import java.util.List;
062    
063    import javax.sql.DataSource;
064    
065    /**
066     * The base implementation of the d d m structure local service.
067     *
068     * <p>
069     * 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.DDMStructureLocalServiceImpl}.
070     * </p>
071     *
072     * @author Brian Wing Shun Chan
073     * @see com.liferay.portlet.dynamicdatamapping.service.impl.DDMStructureLocalServiceImpl
074     * @see com.liferay.portlet.dynamicdatamapping.service.DDMStructureLocalServiceUtil
075     * @generated
076     */
077    public abstract class DDMStructureLocalServiceBaseImpl
078            extends BaseLocalServiceImpl implements DDMStructureLocalService,
079                    IdentifiableBean {
080            /*
081             * NOTE FOR DEVELOPERS:
082             *
083             * Never modify or reference this class directly. Always use {@link com.liferay.portlet.dynamicdatamapping.service.DDMStructureLocalServiceUtil} to access the d d m structure local service.
084             */
085    
086            /**
087             * Adds the d d m structure to the database. Also notifies the appropriate model listeners.
088             *
089             * @param ddmStructure the d d m structure
090             * @return the d d m structure that was added
091             * @throws SystemException if a system exception occurred
092             */
093            @Indexable(type = IndexableType.REINDEX)
094            public DDMStructure addDDMStructure(DDMStructure ddmStructure)
095                    throws SystemException {
096                    ddmStructure.setNew(true);
097    
098                    return ddmStructurePersistence.update(ddmStructure);
099            }
100    
101            /**
102             * Creates a new d d m structure with the primary key. Does not add the d d m structure to the database.
103             *
104             * @param structureId the primary key for the new d d m structure
105             * @return the new d d m structure
106             */
107            public DDMStructure createDDMStructure(long structureId) {
108                    return ddmStructurePersistence.create(structureId);
109            }
110    
111            /**
112             * Deletes the d d m structure with the primary key from the database. Also notifies the appropriate model listeners.
113             *
114             * @param structureId the primary key of the d d m structure
115             * @return the d d m structure that was removed
116             * @throws PortalException if a d d m structure with the primary key could not be found
117             * @throws SystemException if a system exception occurred
118             */
119            @Indexable(type = IndexableType.DELETE)
120            public DDMStructure deleteDDMStructure(long structureId)
121                    throws PortalException, SystemException {
122                    return ddmStructurePersistence.remove(structureId);
123            }
124    
125            /**
126             * Deletes the d d m structure from the database. Also notifies the appropriate model listeners.
127             *
128             * @param ddmStructure the d d m structure
129             * @return the d d m structure that was removed
130             * @throws SystemException if a system exception occurred
131             */
132            @Indexable(type = IndexableType.DELETE)
133            public DDMStructure deleteDDMStructure(DDMStructure ddmStructure)
134                    throws SystemException {
135                    return ddmStructurePersistence.remove(ddmStructure);
136            }
137    
138            public DynamicQuery dynamicQuery() {
139                    Class<?> clazz = getClass();
140    
141                    return DynamicQueryFactoryUtil.forClass(DDMStructure.class,
142                            clazz.getClassLoader());
143            }
144    
145            /**
146             * Performs a dynamic query on the database and returns the matching rows.
147             *
148             * @param dynamicQuery the dynamic query
149             * @return the matching rows
150             * @throws SystemException if a system exception occurred
151             */
152            @SuppressWarnings("rawtypes")
153            public List dynamicQuery(DynamicQuery dynamicQuery)
154                    throws SystemException {
155                    return ddmStructurePersistence.findWithDynamicQuery(dynamicQuery);
156            }
157    
158            /**
159             * Performs a dynamic query on the database and returns a range of the matching rows.
160             *
161             * <p>
162             * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
163             * </p>
164             *
165             * @param dynamicQuery the dynamic query
166             * @param start the lower bound of the range of model instances
167             * @param end the upper bound of the range of model instances (not inclusive)
168             * @return the range of matching rows
169             * @throws SystemException if a system exception occurred
170             */
171            @SuppressWarnings("rawtypes")
172            public List dynamicQuery(DynamicQuery dynamicQuery, int start, int end)
173                    throws SystemException {
174                    return ddmStructurePersistence.findWithDynamicQuery(dynamicQuery,
175                            start, end);
176            }
177    
178            /**
179             * Performs a dynamic query on the database and returns an ordered range of the matching rows.
180             *
181             * <p>
182             * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
183             * </p>
184             *
185             * @param dynamicQuery the dynamic query
186             * @param start the lower bound of the range of model instances
187             * @param end the upper bound of the range of model instances (not inclusive)
188             * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
189             * @return the ordered range of matching rows
190             * @throws SystemException if a system exception occurred
191             */
192            @SuppressWarnings("rawtypes")
193            public List dynamicQuery(DynamicQuery dynamicQuery, int start, int end,
194                    OrderByComparator orderByComparator) throws SystemException {
195                    return ddmStructurePersistence.findWithDynamicQuery(dynamicQuery,
196                            start, end, orderByComparator);
197            }
198    
199            /**
200             * Returns the number of rows that match the dynamic query.
201             *
202             * @param dynamicQuery the dynamic query
203             * @return the number of rows that match the dynamic query
204             * @throws SystemException if a system exception occurred
205             */
206            public long dynamicQueryCount(DynamicQuery dynamicQuery)
207                    throws SystemException {
208                    return ddmStructurePersistence.countWithDynamicQuery(dynamicQuery);
209            }
210    
211            public DDMStructure fetchDDMStructure(long structureId)
212                    throws SystemException {
213                    return ddmStructurePersistence.fetchByPrimaryKey(structureId);
214            }
215    
216            /**
217             * Returns the d d m structure with the primary key.
218             *
219             * @param structureId the primary key of the d d m structure
220             * @return the d d m structure
221             * @throws PortalException if a d d m structure with the primary key could not be found
222             * @throws SystemException if a system exception occurred
223             */
224            public DDMStructure getDDMStructure(long structureId)
225                    throws PortalException, SystemException {
226                    return ddmStructurePersistence.findByPrimaryKey(structureId);
227            }
228    
229            public PersistedModel getPersistedModel(Serializable primaryKeyObj)
230                    throws PortalException, SystemException {
231                    return ddmStructurePersistence.findByPrimaryKey(primaryKeyObj);
232            }
233    
234            /**
235             * Returns the d d m structure with the UUID in the group.
236             *
237             * @param uuid the UUID of d d m structure
238             * @param groupId the group id of the d d m structure
239             * @return the d d m structure
240             * @throws PortalException if a d d m structure with the UUID in the group could not be found
241             * @throws SystemException if a system exception occurred
242             */
243            public DDMStructure getDDMStructureByUuidAndGroupId(String uuid,
244                    long groupId) throws PortalException, SystemException {
245                    return ddmStructurePersistence.findByUUID_G(uuid, groupId);
246            }
247    
248            /**
249             * Returns a range of all the d d m structures.
250             *
251             * <p>
252             * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
253             * </p>
254             *
255             * @param start the lower bound of the range of d d m structures
256             * @param end the upper bound of the range of d d m structures (not inclusive)
257             * @return the range of d d m structures
258             * @throws SystemException if a system exception occurred
259             */
260            public List<DDMStructure> getDDMStructures(int start, int end)
261                    throws SystemException {
262                    return ddmStructurePersistence.findAll(start, end);
263            }
264    
265            /**
266             * Returns the number of d d m structures.
267             *
268             * @return the number of d d m structures
269             * @throws SystemException if a system exception occurred
270             */
271            public int getDDMStructuresCount() throws SystemException {
272                    return ddmStructurePersistence.countAll();
273            }
274    
275            /**
276             * Updates the d d m structure in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.
277             *
278             * @param ddmStructure the d d m structure
279             * @return the d d m structure that was updated
280             * @throws SystemException if a system exception occurred
281             */
282            @Indexable(type = IndexableType.REINDEX)
283            public DDMStructure updateDDMStructure(DDMStructure ddmStructure)
284                    throws SystemException {
285                    return ddmStructurePersistence.update(ddmStructure);
286            }
287    
288            /**
289             * Returns the d d m content local service.
290             *
291             * @return the d d m content local service
292             */
293            public DDMContentLocalService getDDMContentLocalService() {
294                    return ddmContentLocalService;
295            }
296    
297            /**
298             * Sets the d d m content local service.
299             *
300             * @param ddmContentLocalService the d d m content local service
301             */
302            public void setDDMContentLocalService(
303                    DDMContentLocalService ddmContentLocalService) {
304                    this.ddmContentLocalService = ddmContentLocalService;
305            }
306    
307            /**
308             * Returns the d d m content persistence.
309             *
310             * @return the d d m content persistence
311             */
312            public DDMContentPersistence getDDMContentPersistence() {
313                    return ddmContentPersistence;
314            }
315    
316            /**
317             * Sets the d d m content persistence.
318             *
319             * @param ddmContentPersistence the d d m content persistence
320             */
321            public void setDDMContentPersistence(
322                    DDMContentPersistence ddmContentPersistence) {
323                    this.ddmContentPersistence = ddmContentPersistence;
324            }
325    
326            /**
327             * Returns the d d m storage link local service.
328             *
329             * @return the d d m storage link local service
330             */
331            public DDMStorageLinkLocalService getDDMStorageLinkLocalService() {
332                    return ddmStorageLinkLocalService;
333            }
334    
335            /**
336             * Sets the d d m storage link local service.
337             *
338             * @param ddmStorageLinkLocalService the d d m storage link local service
339             */
340            public void setDDMStorageLinkLocalService(
341                    DDMStorageLinkLocalService ddmStorageLinkLocalService) {
342                    this.ddmStorageLinkLocalService = ddmStorageLinkLocalService;
343            }
344    
345            /**
346             * Returns the d d m storage link persistence.
347             *
348             * @return the d d m storage link persistence
349             */
350            public DDMStorageLinkPersistence getDDMStorageLinkPersistence() {
351                    return ddmStorageLinkPersistence;
352            }
353    
354            /**
355             * Sets the d d m storage link persistence.
356             *
357             * @param ddmStorageLinkPersistence the d d m storage link persistence
358             */
359            public void setDDMStorageLinkPersistence(
360                    DDMStorageLinkPersistence ddmStorageLinkPersistence) {
361                    this.ddmStorageLinkPersistence = ddmStorageLinkPersistence;
362            }
363    
364            /**
365             * Returns the d d m structure local service.
366             *
367             * @return the d d m structure local service
368             */
369            public DDMStructureLocalService getDDMStructureLocalService() {
370                    return ddmStructureLocalService;
371            }
372    
373            /**
374             * Sets the d d m structure local service.
375             *
376             * @param ddmStructureLocalService the d d m structure local service
377             */
378            public void setDDMStructureLocalService(
379                    DDMStructureLocalService ddmStructureLocalService) {
380                    this.ddmStructureLocalService = ddmStructureLocalService;
381            }
382    
383            /**
384             * Returns the d d m structure remote service.
385             *
386             * @return the d d m structure remote service
387             */
388            public DDMStructureService getDDMStructureService() {
389                    return ddmStructureService;
390            }
391    
392            /**
393             * Sets the d d m structure remote service.
394             *
395             * @param ddmStructureService the d d m structure remote service
396             */
397            public void setDDMStructureService(DDMStructureService ddmStructureService) {
398                    this.ddmStructureService = ddmStructureService;
399            }
400    
401            /**
402             * Returns the d d m structure persistence.
403             *
404             * @return the d d m structure persistence
405             */
406            public DDMStructurePersistence getDDMStructurePersistence() {
407                    return ddmStructurePersistence;
408            }
409    
410            /**
411             * Sets the d d m structure persistence.
412             *
413             * @param ddmStructurePersistence the d d m structure persistence
414             */
415            public void setDDMStructurePersistence(
416                    DDMStructurePersistence ddmStructurePersistence) {
417                    this.ddmStructurePersistence = ddmStructurePersistence;
418            }
419    
420            /**
421             * Returns the d d m structure finder.
422             *
423             * @return the d d m structure finder
424             */
425            public DDMStructureFinder getDDMStructureFinder() {
426                    return ddmStructureFinder;
427            }
428    
429            /**
430             * Sets the d d m structure finder.
431             *
432             * @param ddmStructureFinder the d d m structure finder
433             */
434            public void setDDMStructureFinder(DDMStructureFinder ddmStructureFinder) {
435                    this.ddmStructureFinder = ddmStructureFinder;
436            }
437    
438            /**
439             * Returns the d d m structure link local service.
440             *
441             * @return the d d m structure link local service
442             */
443            public DDMStructureLinkLocalService getDDMStructureLinkLocalService() {
444                    return ddmStructureLinkLocalService;
445            }
446    
447            /**
448             * Sets the d d m structure link local service.
449             *
450             * @param ddmStructureLinkLocalService the d d m structure link local service
451             */
452            public void setDDMStructureLinkLocalService(
453                    DDMStructureLinkLocalService ddmStructureLinkLocalService) {
454                    this.ddmStructureLinkLocalService = ddmStructureLinkLocalService;
455            }
456    
457            /**
458             * Returns the d d m structure link persistence.
459             *
460             * @return the d d m structure link persistence
461             */
462            public DDMStructureLinkPersistence getDDMStructureLinkPersistence() {
463                    return ddmStructureLinkPersistence;
464            }
465    
466            /**
467             * Sets the d d m structure link persistence.
468             *
469             * @param ddmStructureLinkPersistence the d d m structure link persistence
470             */
471            public void setDDMStructureLinkPersistence(
472                    DDMStructureLinkPersistence ddmStructureLinkPersistence) {
473                    this.ddmStructureLinkPersistence = ddmStructureLinkPersistence;
474            }
475    
476            /**
477             * Returns the d d m template local service.
478             *
479             * @return the d d m template local service
480             */
481            public DDMTemplateLocalService getDDMTemplateLocalService() {
482                    return ddmTemplateLocalService;
483            }
484    
485            /**
486             * Sets the d d m template local service.
487             *
488             * @param ddmTemplateLocalService the d d m template local service
489             */
490            public void setDDMTemplateLocalService(
491                    DDMTemplateLocalService ddmTemplateLocalService) {
492                    this.ddmTemplateLocalService = ddmTemplateLocalService;
493            }
494    
495            /**
496             * Returns the d d m template remote service.
497             *
498             * @return the d d m template remote service
499             */
500            public DDMTemplateService getDDMTemplateService() {
501                    return ddmTemplateService;
502            }
503    
504            /**
505             * Sets the d d m template remote service.
506             *
507             * @param ddmTemplateService the d d m template remote service
508             */
509            public void setDDMTemplateService(DDMTemplateService ddmTemplateService) {
510                    this.ddmTemplateService = ddmTemplateService;
511            }
512    
513            /**
514             * Returns the d d m template persistence.
515             *
516             * @return the d d m template persistence
517             */
518            public DDMTemplatePersistence getDDMTemplatePersistence() {
519                    return ddmTemplatePersistence;
520            }
521    
522            /**
523             * Sets the d d m template persistence.
524             *
525             * @param ddmTemplatePersistence the d d m template persistence
526             */
527            public void setDDMTemplatePersistence(
528                    DDMTemplatePersistence ddmTemplatePersistence) {
529                    this.ddmTemplatePersistence = ddmTemplatePersistence;
530            }
531    
532            /**
533             * Returns the d d m template finder.
534             *
535             * @return the d d m template finder
536             */
537            public DDMTemplateFinder getDDMTemplateFinder() {
538                    return ddmTemplateFinder;
539            }
540    
541            /**
542             * Sets the d d m template finder.
543             *
544             * @param ddmTemplateFinder the d d m template finder
545             */
546            public void setDDMTemplateFinder(DDMTemplateFinder ddmTemplateFinder) {
547                    this.ddmTemplateFinder = ddmTemplateFinder;
548            }
549    
550            /**
551             * Returns the counter local service.
552             *
553             * @return the counter local service
554             */
555            public CounterLocalService getCounterLocalService() {
556                    return counterLocalService;
557            }
558    
559            /**
560             * Sets the counter local service.
561             *
562             * @param counterLocalService the counter local service
563             */
564            public void setCounterLocalService(CounterLocalService counterLocalService) {
565                    this.counterLocalService = counterLocalService;
566            }
567    
568            /**
569             * Returns the resource local service.
570             *
571             * @return the resource local service
572             */
573            public ResourceLocalService getResourceLocalService() {
574                    return resourceLocalService;
575            }
576    
577            /**
578             * Sets the resource local service.
579             *
580             * @param resourceLocalService the resource local service
581             */
582            public void setResourceLocalService(
583                    ResourceLocalService resourceLocalService) {
584                    this.resourceLocalService = resourceLocalService;
585            }
586    
587            /**
588             * Returns the user local service.
589             *
590             * @return the user local service
591             */
592            public UserLocalService getUserLocalService() {
593                    return userLocalService;
594            }
595    
596            /**
597             * Sets the user local service.
598             *
599             * @param userLocalService the user local service
600             */
601            public void setUserLocalService(UserLocalService userLocalService) {
602                    this.userLocalService = userLocalService;
603            }
604    
605            /**
606             * Returns the user remote service.
607             *
608             * @return the user remote service
609             */
610            public UserService getUserService() {
611                    return userService;
612            }
613    
614            /**
615             * Sets the user remote service.
616             *
617             * @param userService the user remote service
618             */
619            public void setUserService(UserService userService) {
620                    this.userService = userService;
621            }
622    
623            /**
624             * Returns the user persistence.
625             *
626             * @return the user persistence
627             */
628            public UserPersistence getUserPersistence() {
629                    return userPersistence;
630            }
631    
632            /**
633             * Sets the user persistence.
634             *
635             * @param userPersistence the user persistence
636             */
637            public void setUserPersistence(UserPersistence userPersistence) {
638                    this.userPersistence = userPersistence;
639            }
640    
641            /**
642             * Returns the user finder.
643             *
644             * @return the user finder
645             */
646            public UserFinder getUserFinder() {
647                    return userFinder;
648            }
649    
650            /**
651             * Sets the user finder.
652             *
653             * @param userFinder the user finder
654             */
655            public void setUserFinder(UserFinder userFinder) {
656                    this.userFinder = userFinder;
657            }
658    
659            /**
660             * Returns the document library file entry type local service.
661             *
662             * @return the document library file entry type local service
663             */
664            public DLFileEntryTypeLocalService getDLFileEntryTypeLocalService() {
665                    return dlFileEntryTypeLocalService;
666            }
667    
668            /**
669             * Sets the document library file entry type local service.
670             *
671             * @param dlFileEntryTypeLocalService the document library file entry type local service
672             */
673            public void setDLFileEntryTypeLocalService(
674                    DLFileEntryTypeLocalService dlFileEntryTypeLocalService) {
675                    this.dlFileEntryTypeLocalService = dlFileEntryTypeLocalService;
676            }
677    
678            /**
679             * Returns the document library file entry type remote service.
680             *
681             * @return the document library file entry type remote service
682             */
683            public DLFileEntryTypeService getDLFileEntryTypeService() {
684                    return dlFileEntryTypeService;
685            }
686    
687            /**
688             * Sets the document library file entry type remote service.
689             *
690             * @param dlFileEntryTypeService the document library file entry type remote service
691             */
692            public void setDLFileEntryTypeService(
693                    DLFileEntryTypeService dlFileEntryTypeService) {
694                    this.dlFileEntryTypeService = dlFileEntryTypeService;
695            }
696    
697            /**
698             * Returns the document library file entry type persistence.
699             *
700             * @return the document library file entry type persistence
701             */
702            public DLFileEntryTypePersistence getDLFileEntryTypePersistence() {
703                    return dlFileEntryTypePersistence;
704            }
705    
706            /**
707             * Sets the document library file entry type persistence.
708             *
709             * @param dlFileEntryTypePersistence the document library file entry type persistence
710             */
711            public void setDLFileEntryTypePersistence(
712                    DLFileEntryTypePersistence dlFileEntryTypePersistence) {
713                    this.dlFileEntryTypePersistence = dlFileEntryTypePersistence;
714            }
715    
716            /**
717             * Returns the document library file entry type finder.
718             *
719             * @return the document library file entry type finder
720             */
721            public DLFileEntryTypeFinder getDLFileEntryTypeFinder() {
722                    return dlFileEntryTypeFinder;
723            }
724    
725            /**
726             * Sets the document library file entry type finder.
727             *
728             * @param dlFileEntryTypeFinder the document library file entry type finder
729             */
730            public void setDLFileEntryTypeFinder(
731                    DLFileEntryTypeFinder dlFileEntryTypeFinder) {
732                    this.dlFileEntryTypeFinder = dlFileEntryTypeFinder;
733            }
734    
735            public void afterPropertiesSet() {
736                    persistedModelLocalServiceRegistry.register("com.liferay.portlet.dynamicdatamapping.model.DDMStructure",
737                            ddmStructureLocalService);
738            }
739    
740            public void destroy() {
741                    persistedModelLocalServiceRegistry.unregister(
742                            "com.liferay.portlet.dynamicdatamapping.model.DDMStructure");
743            }
744    
745            /**
746             * Returns the Spring bean ID for this bean.
747             *
748             * @return the Spring bean ID for this bean
749             */
750            public String getBeanIdentifier() {
751                    return _beanIdentifier;
752            }
753    
754            /**
755             * Sets the Spring bean ID for this bean.
756             *
757             * @param beanIdentifier the Spring bean ID for this bean
758             */
759            public void setBeanIdentifier(String beanIdentifier) {
760                    _beanIdentifier = beanIdentifier;
761            }
762    
763            protected Class<?> getModelClass() {
764                    return DDMStructure.class;
765            }
766    
767            protected String getModelClassName() {
768                    return DDMStructure.class.getName();
769            }
770    
771            /**
772             * Performs an SQL query.
773             *
774             * @param sql the sql query
775             */
776            protected void runSQL(String sql) throws SystemException {
777                    try {
778                            DataSource dataSource = ddmStructurePersistence.getDataSource();
779    
780                            SqlUpdate sqlUpdate = SqlUpdateFactoryUtil.getSqlUpdate(dataSource,
781                                            sql, new int[0]);
782    
783                            sqlUpdate.update();
784                    }
785                    catch (Exception e) {
786                            throw new SystemException(e);
787                    }
788            }
789    
790            @BeanReference(type = DDMContentLocalService.class)
791            protected DDMContentLocalService ddmContentLocalService;
792            @BeanReference(type = DDMContentPersistence.class)
793            protected DDMContentPersistence ddmContentPersistence;
794            @BeanReference(type = DDMStorageLinkLocalService.class)
795            protected DDMStorageLinkLocalService ddmStorageLinkLocalService;
796            @BeanReference(type = DDMStorageLinkPersistence.class)
797            protected DDMStorageLinkPersistence ddmStorageLinkPersistence;
798            @BeanReference(type = DDMStructureLocalService.class)
799            protected DDMStructureLocalService ddmStructureLocalService;
800            @BeanReference(type = DDMStructureService.class)
801            protected DDMStructureService ddmStructureService;
802            @BeanReference(type = DDMStructurePersistence.class)
803            protected DDMStructurePersistence ddmStructurePersistence;
804            @BeanReference(type = DDMStructureFinder.class)
805            protected DDMStructureFinder ddmStructureFinder;
806            @BeanReference(type = DDMStructureLinkLocalService.class)
807            protected DDMStructureLinkLocalService ddmStructureLinkLocalService;
808            @BeanReference(type = DDMStructureLinkPersistence.class)
809            protected DDMStructureLinkPersistence ddmStructureLinkPersistence;
810            @BeanReference(type = DDMTemplateLocalService.class)
811            protected DDMTemplateLocalService ddmTemplateLocalService;
812            @BeanReference(type = DDMTemplateService.class)
813            protected DDMTemplateService ddmTemplateService;
814            @BeanReference(type = DDMTemplatePersistence.class)
815            protected DDMTemplatePersistence ddmTemplatePersistence;
816            @BeanReference(type = DDMTemplateFinder.class)
817            protected DDMTemplateFinder ddmTemplateFinder;
818            @BeanReference(type = CounterLocalService.class)
819            protected CounterLocalService counterLocalService;
820            @BeanReference(type = ResourceLocalService.class)
821            protected ResourceLocalService resourceLocalService;
822            @BeanReference(type = UserLocalService.class)
823            protected UserLocalService userLocalService;
824            @BeanReference(type = UserService.class)
825            protected UserService userService;
826            @BeanReference(type = UserPersistence.class)
827            protected UserPersistence userPersistence;
828            @BeanReference(type = UserFinder.class)
829            protected UserFinder userFinder;
830            @BeanReference(type = DLFileEntryTypeLocalService.class)
831            protected DLFileEntryTypeLocalService dlFileEntryTypeLocalService;
832            @BeanReference(type = DLFileEntryTypeService.class)
833            protected DLFileEntryTypeService dlFileEntryTypeService;
834            @BeanReference(type = DLFileEntryTypePersistence.class)
835            protected DLFileEntryTypePersistence dlFileEntryTypePersistence;
836            @BeanReference(type = DLFileEntryTypeFinder.class)
837            protected DLFileEntryTypeFinder dlFileEntryTypeFinder;
838            @BeanReference(type = PersistedModelLocalServiceRegistry.class)
839            protected PersistedModelLocalServiceRegistry persistedModelLocalServiceRegistry;
840            private String _beanIdentifier;
841    }