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