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