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