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