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