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