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