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