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