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.portal.kernel.bean.BeanReference;
018    import com.liferay.portal.kernel.bean.IdentifiableBean;
019    import com.liferay.portal.kernel.dao.jdbc.SqlUpdate;
020    import com.liferay.portal.kernel.dao.jdbc.SqlUpdateFactoryUtil;
021    import com.liferay.portal.kernel.dao.orm.DynamicQuery;
022    import com.liferay.portal.kernel.dao.orm.DynamicQueryFactoryUtil;
023    import com.liferay.portal.kernel.dao.orm.Projection;
024    import com.liferay.portal.kernel.exception.PortalException;
025    import com.liferay.portal.kernel.exception.SystemException;
026    import com.liferay.portal.kernel.search.Indexable;
027    import com.liferay.portal.kernel.search.IndexableType;
028    import com.liferay.portal.kernel.util.OrderByComparator;
029    import com.liferay.portal.model.PersistedModel;
030    import com.liferay.portal.service.BaseLocalServiceImpl;
031    import com.liferay.portal.service.PersistedModelLocalServiceRegistry;
032    import com.liferay.portal.service.persistence.UserFinder;
033    import com.liferay.portal.service.persistence.UserPersistence;
034    
035    import com.liferay.portlet.dynamicdatamapping.model.DDMStructureLink;
036    import com.liferay.portlet.dynamicdatamapping.service.DDMStructureLinkLocalService;
037    import com.liferay.portlet.dynamicdatamapping.service.persistence.DDMContentPersistence;
038    import com.liferay.portlet.dynamicdatamapping.service.persistence.DDMStorageLinkPersistence;
039    import com.liferay.portlet.dynamicdatamapping.service.persistence.DDMStructureFinder;
040    import com.liferay.portlet.dynamicdatamapping.service.persistence.DDMStructureLinkPersistence;
041    import com.liferay.portlet.dynamicdatamapping.service.persistence.DDMStructurePersistence;
042    import com.liferay.portlet.dynamicdatamapping.service.persistence.DDMTemplateFinder;
043    import com.liferay.portlet.dynamicdatamapping.service.persistence.DDMTemplatePersistence;
044    
045    import java.io.Serializable;
046    
047    import java.util.List;
048    
049    import javax.sql.DataSource;
050    
051    /**
052     * Provides the base implementation for the d d m structure link local service.
053     *
054     * <p>
055     * 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}.
056     * </p>
057     *
058     * @author Brian Wing Shun Chan
059     * @see com.liferay.portlet.dynamicdatamapping.service.impl.DDMStructureLinkLocalServiceImpl
060     * @see com.liferay.portlet.dynamicdatamapping.service.DDMStructureLinkLocalServiceUtil
061     * @generated
062     */
063    public abstract class DDMStructureLinkLocalServiceBaseImpl
064            extends BaseLocalServiceImpl implements DDMStructureLinkLocalService,
065                    IdentifiableBean {
066            /*
067             * NOTE FOR DEVELOPERS:
068             *
069             * 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.
070             */
071    
072            /**
073             * Adds the d d m structure link to the database. Also notifies the appropriate model listeners.
074             *
075             * @param ddmStructureLink the d d m structure link
076             * @return the d d m structure link that was added
077             * @throws SystemException if a system exception occurred
078             */
079            @Indexable(type = IndexableType.REINDEX)
080            @Override
081            public DDMStructureLink addDDMStructureLink(
082                    DDMStructureLink ddmStructureLink) throws SystemException {
083                    ddmStructureLink.setNew(true);
084    
085                    return ddmStructureLinkPersistence.update(ddmStructureLink);
086            }
087    
088            /**
089             * Creates a new d d m structure link with the primary key. Does not add the d d m structure link to the database.
090             *
091             * @param structureLinkId the primary key for the new d d m structure link
092             * @return the new d d m structure link
093             */
094            @Override
095            public DDMStructureLink createDDMStructureLink(long structureLinkId) {
096                    return ddmStructureLinkPersistence.create(structureLinkId);
097            }
098    
099            /**
100             * Deletes the d d m structure link with the primary key from the database. Also notifies the appropriate model listeners.
101             *
102             * @param structureLinkId the primary key of the d d m structure link
103             * @return the d d m structure link that was removed
104             * @throws PortalException if a d d m structure link with the primary key could not be found
105             * @throws SystemException if a system exception occurred
106             */
107            @Indexable(type = IndexableType.DELETE)
108            @Override
109            public DDMStructureLink deleteDDMStructureLink(long structureLinkId)
110                    throws PortalException, SystemException {
111                    return ddmStructureLinkPersistence.remove(structureLinkId);
112            }
113    
114            /**
115             * Deletes the d d m structure link from the database. Also notifies the appropriate model listeners.
116             *
117             * @param ddmStructureLink the d d m structure link
118             * @return the d d m structure link that was removed
119             * @throws SystemException if a system exception occurred
120             */
121            @Indexable(type = IndexableType.DELETE)
122            @Override
123            public DDMStructureLink deleteDDMStructureLink(
124                    DDMStructureLink ddmStructureLink) throws SystemException {
125                    return ddmStructureLinkPersistence.remove(ddmStructureLink);
126            }
127    
128            @Override
129            public DynamicQuery dynamicQuery() {
130                    Class<?> clazz = getClass();
131    
132                    return DynamicQueryFactoryUtil.forClass(DDMStructureLink.class,
133                            clazz.getClassLoader());
134            }
135    
136            /**
137             * Performs a dynamic query on the database and returns the matching rows.
138             *
139             * @param dynamicQuery the dynamic query
140             * @return the matching rows
141             * @throws SystemException if a system exception occurred
142             */
143            @Override
144            @SuppressWarnings("rawtypes")
145            public List dynamicQuery(DynamicQuery dynamicQuery)
146                    throws SystemException {
147                    return ddmStructureLinkPersistence.findWithDynamicQuery(dynamicQuery);
148            }
149    
150            /**
151             * Performs a dynamic query on the database and returns a range of the matching rows.
152             *
153             * <p>
154             * 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. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portlet.dynamicdatamapping.model.impl.DDMStructureLinkModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
155             * </p>
156             *
157             * @param dynamicQuery the dynamic query
158             * @param start the lower bound of the range of model instances
159             * @param end the upper bound of the range of model instances (not inclusive)
160             * @return the range of matching rows
161             * @throws SystemException if a system exception occurred
162             */
163            @Override
164            @SuppressWarnings("rawtypes")
165            public List dynamicQuery(DynamicQuery dynamicQuery, int start, int end)
166                    throws SystemException {
167                    return ddmStructureLinkPersistence.findWithDynamicQuery(dynamicQuery,
168                            start, end);
169            }
170    
171            /**
172             * Performs a dynamic query on the database and returns an ordered range of the matching rows.
173             *
174             * <p>
175             * 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. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portlet.dynamicdatamapping.model.impl.DDMStructureLinkModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
176             * </p>
177             *
178             * @param dynamicQuery the dynamic query
179             * @param start the lower bound of the range of model instances
180             * @param end the upper bound of the range of model instances (not inclusive)
181             * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
182             * @return the ordered range of matching rows
183             * @throws SystemException if a system exception occurred
184             */
185            @Override
186            @SuppressWarnings("rawtypes")
187            public List dynamicQuery(DynamicQuery dynamicQuery, int start, int end,
188                    OrderByComparator orderByComparator) throws SystemException {
189                    return ddmStructureLinkPersistence.findWithDynamicQuery(dynamicQuery,
190                            start, end, orderByComparator);
191            }
192    
193            /**
194             * Returns the number of rows that match the dynamic query.
195             *
196             * @param dynamicQuery the dynamic query
197             * @return the number of rows that match the dynamic query
198             * @throws SystemException if a system exception occurred
199             */
200            @Override
201            public long dynamicQueryCount(DynamicQuery dynamicQuery)
202                    throws SystemException {
203                    return ddmStructureLinkPersistence.countWithDynamicQuery(dynamicQuery);
204            }
205    
206            /**
207             * Returns the number of rows that match the dynamic query.
208             *
209             * @param dynamicQuery the dynamic query
210             * @param projection the projection to apply to the query
211             * @return the number of rows that match the dynamic query
212             * @throws SystemException if a system exception occurred
213             */
214            @Override
215            public long dynamicQueryCount(DynamicQuery dynamicQuery,
216                    Projection projection) throws SystemException {
217                    return ddmStructureLinkPersistence.countWithDynamicQuery(dynamicQuery,
218                            projection);
219            }
220    
221            @Override
222            public DDMStructureLink fetchDDMStructureLink(long structureLinkId)
223                    throws SystemException {
224                    return ddmStructureLinkPersistence.fetchByPrimaryKey(structureLinkId);
225            }
226    
227            /**
228             * Returns the d d m structure link with the primary key.
229             *
230             * @param structureLinkId the primary key of the d d m structure link
231             * @return the d d m structure link
232             * @throws PortalException if a d d m structure link with the primary key could not be found
233             * @throws SystemException if a system exception occurred
234             */
235            @Override
236            public DDMStructureLink getDDMStructureLink(long structureLinkId)
237                    throws PortalException, SystemException {
238                    return ddmStructureLinkPersistence.findByPrimaryKey(structureLinkId);
239            }
240    
241            @Override
242            public PersistedModel getPersistedModel(Serializable primaryKeyObj)
243                    throws PortalException, SystemException {
244                    return ddmStructureLinkPersistence.findByPrimaryKey(primaryKeyObj);
245            }
246    
247            /**
248             * Returns a range of all the d d m structure links.
249             *
250             * <p>
251             * 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. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portlet.dynamicdatamapping.model.impl.DDMStructureLinkModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
252             * </p>
253             *
254             * @param start the lower bound of the range of d d m structure links
255             * @param end the upper bound of the range of d d m structure links (not inclusive)
256             * @return the range of d d m structure links
257             * @throws SystemException if a system exception occurred
258             */
259            @Override
260            public List<DDMStructureLink> getDDMStructureLinks(int start, int end)
261                    throws SystemException {
262                    return ddmStructureLinkPersistence.findAll(start, end);
263            }
264    
265            /**
266             * Returns the number of d d m structure links.
267             *
268             * @return the number of d d m structure links
269             * @throws SystemException if a system exception occurred
270             */
271            @Override
272            public int getDDMStructureLinksCount() throws SystemException {
273                    return ddmStructureLinkPersistence.countAll();
274            }
275    
276            /**
277             * 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.
278             *
279             * @param ddmStructureLink the d d m structure link
280             * @return the d d m structure link that was updated
281             * @throws SystemException if a system exception occurred
282             */
283            @Indexable(type = IndexableType.REINDEX)
284            @Override
285            public DDMStructureLink updateDDMStructureLink(
286                    DDMStructureLink ddmStructureLink) throws SystemException {
287                    return ddmStructureLinkPersistence.update(ddmStructureLink);
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 com.liferay.portlet.dynamicdatamapping.service.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                    com.liferay.portlet.dynamicdatamapping.service.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 com.liferay.portlet.dynamicdatamapping.service.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                    com.liferay.portlet.dynamicdatamapping.service.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 com.liferay.portlet.dynamicdatamapping.service.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                    com.liferay.portlet.dynamicdatamapping.service.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 com.liferay.portlet.dynamicdatamapping.service.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(
400                    com.liferay.portlet.dynamicdatamapping.service.DDMStructureService ddmStructureService) {
401                    this.ddmStructureService = ddmStructureService;
402            }
403    
404            /**
405             * Returns the d d m structure persistence.
406             *
407             * @return the d d m structure persistence
408             */
409            public DDMStructurePersistence getDDMStructurePersistence() {
410                    return ddmStructurePersistence;
411            }
412    
413            /**
414             * Sets the d d m structure persistence.
415             *
416             * @param ddmStructurePersistence the d d m structure persistence
417             */
418            public void setDDMStructurePersistence(
419                    DDMStructurePersistence ddmStructurePersistence) {
420                    this.ddmStructurePersistence = ddmStructurePersistence;
421            }
422    
423            /**
424             * Returns the d d m structure finder.
425             *
426             * @return the d d m structure finder
427             */
428            public DDMStructureFinder getDDMStructureFinder() {
429                    return ddmStructureFinder;
430            }
431    
432            /**
433             * Sets the d d m structure finder.
434             *
435             * @param ddmStructureFinder the d d m structure finder
436             */
437            public void setDDMStructureFinder(DDMStructureFinder ddmStructureFinder) {
438                    this.ddmStructureFinder = ddmStructureFinder;
439            }
440    
441            /**
442             * Returns the d d m structure link local service.
443             *
444             * @return the d d m structure link local service
445             */
446            public com.liferay.portlet.dynamicdatamapping.service.DDMStructureLinkLocalService getDDMStructureLinkLocalService() {
447                    return ddmStructureLinkLocalService;
448            }
449    
450            /**
451             * Sets the d d m structure link local service.
452             *
453             * @param ddmStructureLinkLocalService the d d m structure link local service
454             */
455            public void setDDMStructureLinkLocalService(
456                    com.liferay.portlet.dynamicdatamapping.service.DDMStructureLinkLocalService ddmStructureLinkLocalService) {
457                    this.ddmStructureLinkLocalService = ddmStructureLinkLocalService;
458            }
459    
460            /**
461             * Returns the d d m structure link persistence.
462             *
463             * @return the d d m structure link persistence
464             */
465            public DDMStructureLinkPersistence getDDMStructureLinkPersistence() {
466                    return ddmStructureLinkPersistence;
467            }
468    
469            /**
470             * Sets the d d m structure link persistence.
471             *
472             * @param ddmStructureLinkPersistence the d d m structure link persistence
473             */
474            public void setDDMStructureLinkPersistence(
475                    DDMStructureLinkPersistence ddmStructureLinkPersistence) {
476                    this.ddmStructureLinkPersistence = ddmStructureLinkPersistence;
477            }
478    
479            /**
480             * Returns the d d m template local service.
481             *
482             * @return the d d m template local service
483             */
484            public com.liferay.portlet.dynamicdatamapping.service.DDMTemplateLocalService getDDMTemplateLocalService() {
485                    return ddmTemplateLocalService;
486            }
487    
488            /**
489             * Sets the d d m template local service.
490             *
491             * @param ddmTemplateLocalService the d d m template local service
492             */
493            public void setDDMTemplateLocalService(
494                    com.liferay.portlet.dynamicdatamapping.service.DDMTemplateLocalService ddmTemplateLocalService) {
495                    this.ddmTemplateLocalService = ddmTemplateLocalService;
496            }
497    
498            /**
499             * Returns the d d m template remote service.
500             *
501             * @return the d d m template remote service
502             */
503            public com.liferay.portlet.dynamicdatamapping.service.DDMTemplateService getDDMTemplateService() {
504                    return ddmTemplateService;
505            }
506    
507            /**
508             * Sets the d d m template remote service.
509             *
510             * @param ddmTemplateService the d d m template remote service
511             */
512            public void setDDMTemplateService(
513                    com.liferay.portlet.dynamicdatamapping.service.DDMTemplateService ddmTemplateService) {
514                    this.ddmTemplateService = ddmTemplateService;
515            }
516    
517            /**
518             * Returns the d d m template persistence.
519             *
520             * @return the d d m template persistence
521             */
522            public DDMTemplatePersistence getDDMTemplatePersistence() {
523                    return ddmTemplatePersistence;
524            }
525    
526            /**
527             * Sets the d d m template persistence.
528             *
529             * @param ddmTemplatePersistence the d d m template persistence
530             */
531            public void setDDMTemplatePersistence(
532                    DDMTemplatePersistence ddmTemplatePersistence) {
533                    this.ddmTemplatePersistence = ddmTemplatePersistence;
534            }
535    
536            /**
537             * Returns the d d m template finder.
538             *
539             * @return the d d m template finder
540             */
541            public DDMTemplateFinder getDDMTemplateFinder() {
542                    return ddmTemplateFinder;
543            }
544    
545            /**
546             * Sets the d d m template finder.
547             *
548             * @param ddmTemplateFinder the d d m template finder
549             */
550            public void setDDMTemplateFinder(DDMTemplateFinder ddmTemplateFinder) {
551                    this.ddmTemplateFinder = ddmTemplateFinder;
552            }
553    
554            /**
555             * Returns the counter local service.
556             *
557             * @return the counter local service
558             */
559            public com.liferay.counter.service.CounterLocalService getCounterLocalService() {
560                    return counterLocalService;
561            }
562    
563            /**
564             * Sets the counter local service.
565             *
566             * @param counterLocalService the counter local service
567             */
568            public void setCounterLocalService(
569                    com.liferay.counter.service.CounterLocalService counterLocalService) {
570                    this.counterLocalService = counterLocalService;
571            }
572    
573            /**
574             * Returns the resource local service.
575             *
576             * @return the resource local service
577             */
578            public com.liferay.portal.service.ResourceLocalService getResourceLocalService() {
579                    return resourceLocalService;
580            }
581    
582            /**
583             * Sets the resource local service.
584             *
585             * @param resourceLocalService the resource local service
586             */
587            public void setResourceLocalService(
588                    com.liferay.portal.service.ResourceLocalService resourceLocalService) {
589                    this.resourceLocalService = resourceLocalService;
590            }
591    
592            /**
593             * Returns the user local service.
594             *
595             * @return the user local service
596             */
597            public com.liferay.portal.service.UserLocalService getUserLocalService() {
598                    return userLocalService;
599            }
600    
601            /**
602             * Sets the user local service.
603             *
604             * @param userLocalService the user local service
605             */
606            public void setUserLocalService(
607                    com.liferay.portal.service.UserLocalService userLocalService) {
608                    this.userLocalService = userLocalService;
609            }
610    
611            /**
612             * Returns the user remote service.
613             *
614             * @return the user remote service
615             */
616            public com.liferay.portal.service.UserService getUserService() {
617                    return userService;
618            }
619    
620            /**
621             * Sets the user remote service.
622             *
623             * @param userService the user remote service
624             */
625            public void setUserService(
626                    com.liferay.portal.service.UserService userService) {
627                    this.userService = userService;
628            }
629    
630            /**
631             * Returns the user persistence.
632             *
633             * @return the user persistence
634             */
635            public UserPersistence getUserPersistence() {
636                    return userPersistence;
637            }
638    
639            /**
640             * Sets the user persistence.
641             *
642             * @param userPersistence the user persistence
643             */
644            public void setUserPersistence(UserPersistence userPersistence) {
645                    this.userPersistence = userPersistence;
646            }
647    
648            /**
649             * Returns the user finder.
650             *
651             * @return the user finder
652             */
653            public UserFinder getUserFinder() {
654                    return userFinder;
655            }
656    
657            /**
658             * Sets the user finder.
659             *
660             * @param userFinder the user finder
661             */
662            public void setUserFinder(UserFinder userFinder) {
663                    this.userFinder = userFinder;
664            }
665    
666            public void afterPropertiesSet() {
667                    persistedModelLocalServiceRegistry.register("com.liferay.portlet.dynamicdatamapping.model.DDMStructureLink",
668                            ddmStructureLinkLocalService);
669            }
670    
671            public void destroy() {
672                    persistedModelLocalServiceRegistry.unregister(
673                            "com.liferay.portlet.dynamicdatamapping.model.DDMStructureLink");
674            }
675    
676            /**
677             * Returns the Spring bean ID for this bean.
678             *
679             * @return the Spring bean ID for this bean
680             */
681            @Override
682            public String getBeanIdentifier() {
683                    return _beanIdentifier;
684            }
685    
686            /**
687             * Sets the Spring bean ID for this bean.
688             *
689             * @param beanIdentifier the Spring bean ID for this bean
690             */
691            @Override
692            public void setBeanIdentifier(String beanIdentifier) {
693                    _beanIdentifier = beanIdentifier;
694            }
695    
696            protected Class<?> getModelClass() {
697                    return DDMStructureLink.class;
698            }
699    
700            protected String getModelClassName() {
701                    return DDMStructureLink.class.getName();
702            }
703    
704            /**
705             * Performs an SQL query.
706             *
707             * @param sql the sql query
708             */
709            protected void runSQL(String sql) throws SystemException {
710                    try {
711                            DataSource dataSource = ddmStructureLinkPersistence.getDataSource();
712    
713                            SqlUpdate sqlUpdate = SqlUpdateFactoryUtil.getSqlUpdate(dataSource,
714                                            sql, new int[0]);
715    
716                            sqlUpdate.update();
717                    }
718                    catch (Exception e) {
719                            throw new SystemException(e);
720                    }
721            }
722    
723            @BeanReference(type = com.liferay.portlet.dynamicdatamapping.service.DDMContentLocalService.class)
724            protected com.liferay.portlet.dynamicdatamapping.service.DDMContentLocalService ddmContentLocalService;
725            @BeanReference(type = DDMContentPersistence.class)
726            protected DDMContentPersistence ddmContentPersistence;
727            @BeanReference(type = com.liferay.portlet.dynamicdatamapping.service.DDMStorageLinkLocalService.class)
728            protected com.liferay.portlet.dynamicdatamapping.service.DDMStorageLinkLocalService ddmStorageLinkLocalService;
729            @BeanReference(type = DDMStorageLinkPersistence.class)
730            protected DDMStorageLinkPersistence ddmStorageLinkPersistence;
731            @BeanReference(type = com.liferay.portlet.dynamicdatamapping.service.DDMStructureLocalService.class)
732            protected com.liferay.portlet.dynamicdatamapping.service.DDMStructureLocalService ddmStructureLocalService;
733            @BeanReference(type = com.liferay.portlet.dynamicdatamapping.service.DDMStructureService.class)
734            protected com.liferay.portlet.dynamicdatamapping.service.DDMStructureService ddmStructureService;
735            @BeanReference(type = DDMStructurePersistence.class)
736            protected DDMStructurePersistence ddmStructurePersistence;
737            @BeanReference(type = DDMStructureFinder.class)
738            protected DDMStructureFinder ddmStructureFinder;
739            @BeanReference(type = com.liferay.portlet.dynamicdatamapping.service.DDMStructureLinkLocalService.class)
740            protected com.liferay.portlet.dynamicdatamapping.service.DDMStructureLinkLocalService ddmStructureLinkLocalService;
741            @BeanReference(type = DDMStructureLinkPersistence.class)
742            protected DDMStructureLinkPersistence ddmStructureLinkPersistence;
743            @BeanReference(type = com.liferay.portlet.dynamicdatamapping.service.DDMTemplateLocalService.class)
744            protected com.liferay.portlet.dynamicdatamapping.service.DDMTemplateLocalService ddmTemplateLocalService;
745            @BeanReference(type = com.liferay.portlet.dynamicdatamapping.service.DDMTemplateService.class)
746            protected com.liferay.portlet.dynamicdatamapping.service.DDMTemplateService ddmTemplateService;
747            @BeanReference(type = DDMTemplatePersistence.class)
748            protected DDMTemplatePersistence ddmTemplatePersistence;
749            @BeanReference(type = DDMTemplateFinder.class)
750            protected DDMTemplateFinder ddmTemplateFinder;
751            @BeanReference(type = com.liferay.counter.service.CounterLocalService.class)
752            protected com.liferay.counter.service.CounterLocalService counterLocalService;
753            @BeanReference(type = com.liferay.portal.service.ResourceLocalService.class)
754            protected com.liferay.portal.service.ResourceLocalService resourceLocalService;
755            @BeanReference(type = com.liferay.portal.service.UserLocalService.class)
756            protected com.liferay.portal.service.UserLocalService userLocalService;
757            @BeanReference(type = com.liferay.portal.service.UserService.class)
758            protected com.liferay.portal.service.UserService userService;
759            @BeanReference(type = UserPersistence.class)
760            protected UserPersistence userPersistence;
761            @BeanReference(type = UserFinder.class)
762            protected UserFinder userFinder;
763            @BeanReference(type = PersistedModelLocalServiceRegistry.class)
764            protected PersistedModelLocalServiceRegistry persistedModelLocalServiceRegistry;
765            private String _beanIdentifier;
766    }