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