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