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