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