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.GroupFinder;
033    import com.liferay.portal.service.persistence.GroupPersistence;
034    import com.liferay.portal.service.persistence.ImagePersistence;
035    import com.liferay.portal.service.persistence.SystemEventPersistence;
036    import com.liferay.portal.service.persistence.UserFinder;
037    import com.liferay.portal.service.persistence.UserPersistence;
038    
039    import com.liferay.portlet.dynamicdatamapping.model.DDMTemplate;
040    import com.liferay.portlet.dynamicdatamapping.service.DDMTemplateLocalService;
041    import com.liferay.portlet.dynamicdatamapping.service.persistence.DDMContentPersistence;
042    import com.liferay.portlet.dynamicdatamapping.service.persistence.DDMStorageLinkPersistence;
043    import com.liferay.portlet.dynamicdatamapping.service.persistence.DDMStructureFinder;
044    import com.liferay.portlet.dynamicdatamapping.service.persistence.DDMStructureLinkPersistence;
045    import com.liferay.portlet.dynamicdatamapping.service.persistence.DDMStructurePersistence;
046    import com.liferay.portlet.dynamicdatamapping.service.persistence.DDMTemplateFinder;
047    import com.liferay.portlet.dynamicdatamapping.service.persistence.DDMTemplatePersistence;
048    
049    import java.io.Serializable;
050    
051    import java.util.List;
052    
053    import javax.sql.DataSource;
054    
055    /**
056     * Provides the base implementation for the d d m template local service.
057     *
058     * <p>
059     * 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.DDMTemplateLocalServiceImpl}.
060     * </p>
061     *
062     * @author Brian Wing Shun Chan
063     * @see com.liferay.portlet.dynamicdatamapping.service.impl.DDMTemplateLocalServiceImpl
064     * @see com.liferay.portlet.dynamicdatamapping.service.DDMTemplateLocalServiceUtil
065     * @generated
066     */
067    public abstract class DDMTemplateLocalServiceBaseImpl
068            extends BaseLocalServiceImpl implements DDMTemplateLocalService,
069                    IdentifiableBean {
070            /*
071             * NOTE FOR DEVELOPERS:
072             *
073             * Never modify or reference this class directly. Always use {@link com.liferay.portlet.dynamicdatamapping.service.DDMTemplateLocalServiceUtil} to access the d d m template local service.
074             */
075    
076            /**
077             * Adds the d d m template to the database. Also notifies the appropriate model listeners.
078             *
079             * @param ddmTemplate the d d m template
080             * @return the d d m template that was added
081             * @throws SystemException if a system exception occurred
082             */
083            @Indexable(type = IndexableType.REINDEX)
084            @Override
085            public DDMTemplate addDDMTemplate(DDMTemplate ddmTemplate)
086                    throws SystemException {
087                    ddmTemplate.setNew(true);
088    
089                    return ddmTemplatePersistence.update(ddmTemplate);
090            }
091    
092            /**
093             * Creates a new d d m template with the primary key. Does not add the d d m template to the database.
094             *
095             * @param templateId the primary key for the new d d m template
096             * @return the new d d m template
097             */
098            @Override
099            public DDMTemplate createDDMTemplate(long templateId) {
100                    return ddmTemplatePersistence.create(templateId);
101            }
102    
103            /**
104             * Deletes the d d m template with the primary key from the database. Also notifies the appropriate model listeners.
105             *
106             * @param templateId the primary key of the d d m template
107             * @return the d d m template that was removed
108             * @throws PortalException if a d d m template with the primary key could not be found
109             * @throws SystemException if a system exception occurred
110             */
111            @Indexable(type = IndexableType.DELETE)
112            @Override
113            public DDMTemplate deleteDDMTemplate(long templateId)
114                    throws PortalException, SystemException {
115                    return ddmTemplatePersistence.remove(templateId);
116            }
117    
118            /**
119             * Deletes the d d m template from the database. Also notifies the appropriate model listeners.
120             *
121             * @param ddmTemplate the d d m template
122             * @return the d d m template that was removed
123             * @throws SystemException if a system exception occurred
124             */
125            @Indexable(type = IndexableType.DELETE)
126            @Override
127            public DDMTemplate deleteDDMTemplate(DDMTemplate ddmTemplate)
128                    throws SystemException {
129                    return ddmTemplatePersistence.remove(ddmTemplate);
130            }
131    
132            @Override
133            public DynamicQuery dynamicQuery() {
134                    Class<?> clazz = getClass();
135    
136                    return DynamicQueryFactoryUtil.forClass(DDMTemplate.class,
137                            clazz.getClassLoader());
138            }
139    
140            /**
141             * Performs a dynamic query on the database and returns the matching rows.
142             *
143             * @param dynamicQuery the dynamic query
144             * @return the matching rows
145             * @throws SystemException if a system exception occurred
146             */
147            @Override
148            @SuppressWarnings("rawtypes")
149            public List dynamicQuery(DynamicQuery dynamicQuery)
150                    throws SystemException {
151                    return ddmTemplatePersistence.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.DDMTemplateModelImpl}. 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            @Override
168            @SuppressWarnings("rawtypes")
169            public List dynamicQuery(DynamicQuery dynamicQuery, int start, int end)
170                    throws SystemException {
171                    return ddmTemplatePersistence.findWithDynamicQuery(dynamicQuery, start,
172                            end);
173            }
174    
175            /**
176             * Performs a dynamic query on the database and returns an ordered range of the matching rows.
177             *
178             * <p>
179             * 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.DDMTemplateModelImpl}. 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.
180             * </p>
181             *
182             * @param dynamicQuery the dynamic query
183             * @param start the lower bound of the range of model instances
184             * @param end the upper bound of the range of model instances (not inclusive)
185             * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
186             * @return the ordered range of matching rows
187             * @throws SystemException if a system exception occurred
188             */
189            @Override
190            @SuppressWarnings("rawtypes")
191            public List dynamicQuery(DynamicQuery dynamicQuery, int start, int end,
192                    OrderByComparator orderByComparator) throws SystemException {
193                    return ddmTemplatePersistence.findWithDynamicQuery(dynamicQuery, start,
194                            end, orderByComparator);
195            }
196    
197            /**
198             * Returns the number of rows that match the dynamic query.
199             *
200             * @param dynamicQuery the dynamic query
201             * @return the number of rows that match the dynamic query
202             * @throws SystemException if a system exception occurred
203             */
204            @Override
205            public long dynamicQueryCount(DynamicQuery dynamicQuery)
206                    throws SystemException {
207                    return ddmTemplatePersistence.countWithDynamicQuery(dynamicQuery);
208            }
209    
210            /**
211             * Returns the number of rows that match the dynamic query.
212             *
213             * @param dynamicQuery the dynamic query
214             * @param projection the projection to apply to the query
215             * @return the number of rows that match the dynamic query
216             * @throws SystemException if a system exception occurred
217             */
218            @Override
219            public long dynamicQueryCount(DynamicQuery dynamicQuery,
220                    Projection projection) throws SystemException {
221                    return ddmTemplatePersistence.countWithDynamicQuery(dynamicQuery,
222                            projection);
223            }
224    
225            @Override
226            public DDMTemplate fetchDDMTemplate(long templateId)
227                    throws SystemException {
228                    return ddmTemplatePersistence.fetchByPrimaryKey(templateId);
229            }
230    
231            /**
232             * Returns the d d m template with the matching UUID and company.
233             *
234             * @param uuid the d d m template's UUID
235             * @param  companyId the primary key of the company
236             * @return the matching d d m template, or <code>null</code> if a matching d d m template could not be found
237             * @throws SystemException if a system exception occurred
238             */
239            @Override
240            public DDMTemplate fetchDDMTemplateByUuidAndCompanyId(String uuid,
241                    long companyId) throws SystemException {
242                    return ddmTemplatePersistence.fetchByUuid_C_First(uuid, companyId, null);
243            }
244    
245            /**
246             * Returns the d d m template matching the UUID and group.
247             *
248             * @param uuid the d d m template's UUID
249             * @param groupId the primary key of the group
250             * @return the matching d d m template, or <code>null</code> if a matching d d m template could not be found
251             * @throws SystemException if a system exception occurred
252             */
253            @Override
254            public DDMTemplate fetchDDMTemplateByUuidAndGroupId(String uuid,
255                    long groupId) throws SystemException {
256                    return ddmTemplatePersistence.fetchByUUID_G(uuid, groupId);
257            }
258    
259            /**
260             * Returns the d d m template with the primary key.
261             *
262             * @param templateId the primary key of the d d m template
263             * @return the d d m template
264             * @throws PortalException if a d d m template with the primary key could not be found
265             * @throws SystemException if a system exception occurred
266             */
267            @Override
268            public DDMTemplate getDDMTemplate(long templateId)
269                    throws PortalException, SystemException {
270                    return ddmTemplatePersistence.findByPrimaryKey(templateId);
271            }
272    
273            @Override
274            public PersistedModel getPersistedModel(Serializable primaryKeyObj)
275                    throws PortalException, SystemException {
276                    return ddmTemplatePersistence.findByPrimaryKey(primaryKeyObj);
277            }
278    
279            /**
280             * Returns the d d m template with the matching UUID and company.
281             *
282             * @param uuid the d d m template's UUID
283             * @param  companyId the primary key of the company
284             * @return the matching d d m template
285             * @throws PortalException if a matching d d m template could not be found
286             * @throws SystemException if a system exception occurred
287             */
288            @Override
289            public DDMTemplate getDDMTemplateByUuidAndCompanyId(String uuid,
290                    long companyId) throws PortalException, SystemException {
291                    return ddmTemplatePersistence.findByUuid_C_First(uuid, companyId, null);
292            }
293    
294            /**
295             * Returns the d d m template matching the UUID and group.
296             *
297             * @param uuid the d d m template's UUID
298             * @param groupId the primary key of the group
299             * @return the matching d d m template
300             * @throws PortalException if a matching d d m template could not be found
301             * @throws SystemException if a system exception occurred
302             */
303            @Override
304            public DDMTemplate getDDMTemplateByUuidAndGroupId(String uuid, long groupId)
305                    throws PortalException, SystemException {
306                    return ddmTemplatePersistence.findByUUID_G(uuid, groupId);
307            }
308    
309            /**
310             * Returns a range of all the d d m templates.
311             *
312             * <p>
313             * 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.DDMTemplateModelImpl}. 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.
314             * </p>
315             *
316             * @param start the lower bound of the range of d d m templates
317             * @param end the upper bound of the range of d d m templates (not inclusive)
318             * @return the range of d d m templates
319             * @throws SystemException if a system exception occurred
320             */
321            @Override
322            public List<DDMTemplate> getDDMTemplates(int start, int end)
323                    throws SystemException {
324                    return ddmTemplatePersistence.findAll(start, end);
325            }
326    
327            /**
328             * Returns the number of d d m templates.
329             *
330             * @return the number of d d m templates
331             * @throws SystemException if a system exception occurred
332             */
333            @Override
334            public int getDDMTemplatesCount() throws SystemException {
335                    return ddmTemplatePersistence.countAll();
336            }
337    
338            /**
339             * Updates the d d m template in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.
340             *
341             * @param ddmTemplate the d d m template
342             * @return the d d m template that was updated
343             * @throws SystemException if a system exception occurred
344             */
345            @Indexable(type = IndexableType.REINDEX)
346            @Override
347            public DDMTemplate updateDDMTemplate(DDMTemplate ddmTemplate)
348                    throws SystemException {
349                    return ddmTemplatePersistence.update(ddmTemplate);
350            }
351    
352            /**
353             * Returns the d d m content local service.
354             *
355             * @return the d d m content local service
356             */
357            public com.liferay.portlet.dynamicdatamapping.service.DDMContentLocalService getDDMContentLocalService() {
358                    return ddmContentLocalService;
359            }
360    
361            /**
362             * Sets the d d m content local service.
363             *
364             * @param ddmContentLocalService the d d m content local service
365             */
366            public void setDDMContentLocalService(
367                    com.liferay.portlet.dynamicdatamapping.service.DDMContentLocalService ddmContentLocalService) {
368                    this.ddmContentLocalService = ddmContentLocalService;
369            }
370    
371            /**
372             * Returns the d d m content persistence.
373             *
374             * @return the d d m content persistence
375             */
376            public DDMContentPersistence getDDMContentPersistence() {
377                    return ddmContentPersistence;
378            }
379    
380            /**
381             * Sets the d d m content persistence.
382             *
383             * @param ddmContentPersistence the d d m content persistence
384             */
385            public void setDDMContentPersistence(
386                    DDMContentPersistence ddmContentPersistence) {
387                    this.ddmContentPersistence = ddmContentPersistence;
388            }
389    
390            /**
391             * Returns the d d m storage link local service.
392             *
393             * @return the d d m storage link local service
394             */
395            public com.liferay.portlet.dynamicdatamapping.service.DDMStorageLinkLocalService getDDMStorageLinkLocalService() {
396                    return ddmStorageLinkLocalService;
397            }
398    
399            /**
400             * Sets the d d m storage link local service.
401             *
402             * @param ddmStorageLinkLocalService the d d m storage link local service
403             */
404            public void setDDMStorageLinkLocalService(
405                    com.liferay.portlet.dynamicdatamapping.service.DDMStorageLinkLocalService ddmStorageLinkLocalService) {
406                    this.ddmStorageLinkLocalService = ddmStorageLinkLocalService;
407            }
408    
409            /**
410             * Returns the d d m storage link persistence.
411             *
412             * @return the d d m storage link persistence
413             */
414            public DDMStorageLinkPersistence getDDMStorageLinkPersistence() {
415                    return ddmStorageLinkPersistence;
416            }
417    
418            /**
419             * Sets the d d m storage link persistence.
420             *
421             * @param ddmStorageLinkPersistence the d d m storage link persistence
422             */
423            public void setDDMStorageLinkPersistence(
424                    DDMStorageLinkPersistence ddmStorageLinkPersistence) {
425                    this.ddmStorageLinkPersistence = ddmStorageLinkPersistence;
426            }
427    
428            /**
429             * Returns the d d m structure local service.
430             *
431             * @return the d d m structure local service
432             */
433            public com.liferay.portlet.dynamicdatamapping.service.DDMStructureLocalService getDDMStructureLocalService() {
434                    return ddmStructureLocalService;
435            }
436    
437            /**
438             * Sets the d d m structure local service.
439             *
440             * @param ddmStructureLocalService the d d m structure local service
441             */
442            public void setDDMStructureLocalService(
443                    com.liferay.portlet.dynamicdatamapping.service.DDMStructureLocalService ddmStructureLocalService) {
444                    this.ddmStructureLocalService = ddmStructureLocalService;
445            }
446    
447            /**
448             * Returns the d d m structure remote service.
449             *
450             * @return the d d m structure remote service
451             */
452            public com.liferay.portlet.dynamicdatamapping.service.DDMStructureService getDDMStructureService() {
453                    return ddmStructureService;
454            }
455    
456            /**
457             * Sets the d d m structure remote service.
458             *
459             * @param ddmStructureService the d d m structure remote service
460             */
461            public void setDDMStructureService(
462                    com.liferay.portlet.dynamicdatamapping.service.DDMStructureService ddmStructureService) {
463                    this.ddmStructureService = ddmStructureService;
464            }
465    
466            /**
467             * Returns the d d m structure persistence.
468             *
469             * @return the d d m structure persistence
470             */
471            public DDMStructurePersistence getDDMStructurePersistence() {
472                    return ddmStructurePersistence;
473            }
474    
475            /**
476             * Sets the d d m structure persistence.
477             *
478             * @param ddmStructurePersistence the d d m structure persistence
479             */
480            public void setDDMStructurePersistence(
481                    DDMStructurePersistence ddmStructurePersistence) {
482                    this.ddmStructurePersistence = ddmStructurePersistence;
483            }
484    
485            /**
486             * Returns the d d m structure finder.
487             *
488             * @return the d d m structure finder
489             */
490            public DDMStructureFinder getDDMStructureFinder() {
491                    return ddmStructureFinder;
492            }
493    
494            /**
495             * Sets the d d m structure finder.
496             *
497             * @param ddmStructureFinder the d d m structure finder
498             */
499            public void setDDMStructureFinder(DDMStructureFinder ddmStructureFinder) {
500                    this.ddmStructureFinder = ddmStructureFinder;
501            }
502    
503            /**
504             * Returns the d d m structure link local service.
505             *
506             * @return the d d m structure link local service
507             */
508            public com.liferay.portlet.dynamicdatamapping.service.DDMStructureLinkLocalService getDDMStructureLinkLocalService() {
509                    return ddmStructureLinkLocalService;
510            }
511    
512            /**
513             * Sets the d d m structure link local service.
514             *
515             * @param ddmStructureLinkLocalService the d d m structure link local service
516             */
517            public void setDDMStructureLinkLocalService(
518                    com.liferay.portlet.dynamicdatamapping.service.DDMStructureLinkLocalService ddmStructureLinkLocalService) {
519                    this.ddmStructureLinkLocalService = ddmStructureLinkLocalService;
520            }
521    
522            /**
523             * Returns the d d m structure link persistence.
524             *
525             * @return the d d m structure link persistence
526             */
527            public DDMStructureLinkPersistence getDDMStructureLinkPersistence() {
528                    return ddmStructureLinkPersistence;
529            }
530    
531            /**
532             * Sets the d d m structure link persistence.
533             *
534             * @param ddmStructureLinkPersistence the d d m structure link persistence
535             */
536            public void setDDMStructureLinkPersistence(
537                    DDMStructureLinkPersistence ddmStructureLinkPersistence) {
538                    this.ddmStructureLinkPersistence = ddmStructureLinkPersistence;
539            }
540    
541            /**
542             * Returns the d d m template local service.
543             *
544             * @return the d d m template local service
545             */
546            public com.liferay.portlet.dynamicdatamapping.service.DDMTemplateLocalService getDDMTemplateLocalService() {
547                    return ddmTemplateLocalService;
548            }
549    
550            /**
551             * Sets the d d m template local service.
552             *
553             * @param ddmTemplateLocalService the d d m template local service
554             */
555            public void setDDMTemplateLocalService(
556                    com.liferay.portlet.dynamicdatamapping.service.DDMTemplateLocalService ddmTemplateLocalService) {
557                    this.ddmTemplateLocalService = ddmTemplateLocalService;
558            }
559    
560            /**
561             * Returns the d d m template remote service.
562             *
563             * @return the d d m template remote service
564             */
565            public com.liferay.portlet.dynamicdatamapping.service.DDMTemplateService getDDMTemplateService() {
566                    return ddmTemplateService;
567            }
568    
569            /**
570             * Sets the d d m template remote service.
571             *
572             * @param ddmTemplateService the d d m template remote service
573             */
574            public void setDDMTemplateService(
575                    com.liferay.portlet.dynamicdatamapping.service.DDMTemplateService ddmTemplateService) {
576                    this.ddmTemplateService = ddmTemplateService;
577            }
578    
579            /**
580             * Returns the d d m template persistence.
581             *
582             * @return the d d m template persistence
583             */
584            public DDMTemplatePersistence getDDMTemplatePersistence() {
585                    return ddmTemplatePersistence;
586            }
587    
588            /**
589             * Sets the d d m template persistence.
590             *
591             * @param ddmTemplatePersistence the d d m template persistence
592             */
593            public void setDDMTemplatePersistence(
594                    DDMTemplatePersistence ddmTemplatePersistence) {
595                    this.ddmTemplatePersistence = ddmTemplatePersistence;
596            }
597    
598            /**
599             * Returns the d d m template finder.
600             *
601             * @return the d d m template finder
602             */
603            public DDMTemplateFinder getDDMTemplateFinder() {
604                    return ddmTemplateFinder;
605            }
606    
607            /**
608             * Sets the d d m template finder.
609             *
610             * @param ddmTemplateFinder the d d m template finder
611             */
612            public void setDDMTemplateFinder(DDMTemplateFinder ddmTemplateFinder) {
613                    this.ddmTemplateFinder = ddmTemplateFinder;
614            }
615    
616            /**
617             * Returns the counter local service.
618             *
619             * @return the counter local service
620             */
621            public com.liferay.counter.service.CounterLocalService getCounterLocalService() {
622                    return counterLocalService;
623            }
624    
625            /**
626             * Sets the counter local service.
627             *
628             * @param counterLocalService the counter local service
629             */
630            public void setCounterLocalService(
631                    com.liferay.counter.service.CounterLocalService counterLocalService) {
632                    this.counterLocalService = counterLocalService;
633            }
634    
635            /**
636             * Returns the group local service.
637             *
638             * @return the group local service
639             */
640            public com.liferay.portal.service.GroupLocalService getGroupLocalService() {
641                    return groupLocalService;
642            }
643    
644            /**
645             * Sets the group local service.
646             *
647             * @param groupLocalService the group local service
648             */
649            public void setGroupLocalService(
650                    com.liferay.portal.service.GroupLocalService groupLocalService) {
651                    this.groupLocalService = groupLocalService;
652            }
653    
654            /**
655             * Returns the group remote service.
656             *
657             * @return the group remote service
658             */
659            public com.liferay.portal.service.GroupService getGroupService() {
660                    return groupService;
661            }
662    
663            /**
664             * Sets the group remote service.
665             *
666             * @param groupService the group remote service
667             */
668            public void setGroupService(
669                    com.liferay.portal.service.GroupService groupService) {
670                    this.groupService = groupService;
671            }
672    
673            /**
674             * Returns the group persistence.
675             *
676             * @return the group persistence
677             */
678            public GroupPersistence getGroupPersistence() {
679                    return groupPersistence;
680            }
681    
682            /**
683             * Sets the group persistence.
684             *
685             * @param groupPersistence the group persistence
686             */
687            public void setGroupPersistence(GroupPersistence groupPersistence) {
688                    this.groupPersistence = groupPersistence;
689            }
690    
691            /**
692             * Returns the group finder.
693             *
694             * @return the group finder
695             */
696            public GroupFinder getGroupFinder() {
697                    return groupFinder;
698            }
699    
700            /**
701             * Sets the group finder.
702             *
703             * @param groupFinder the group finder
704             */
705            public void setGroupFinder(GroupFinder groupFinder) {
706                    this.groupFinder = groupFinder;
707            }
708    
709            /**
710             * Returns the image local service.
711             *
712             * @return the image local service
713             */
714            public com.liferay.portal.service.ImageLocalService getImageLocalService() {
715                    return imageLocalService;
716            }
717    
718            /**
719             * Sets the image local service.
720             *
721             * @param imageLocalService the image local service
722             */
723            public void setImageLocalService(
724                    com.liferay.portal.service.ImageLocalService imageLocalService) {
725                    this.imageLocalService = imageLocalService;
726            }
727    
728            /**
729             * Returns the image remote service.
730             *
731             * @return the image remote service
732             */
733            public com.liferay.portal.service.ImageService getImageService() {
734                    return imageService;
735            }
736    
737            /**
738             * Sets the image remote service.
739             *
740             * @param imageService the image remote service
741             */
742            public void setImageService(
743                    com.liferay.portal.service.ImageService imageService) {
744                    this.imageService = imageService;
745            }
746    
747            /**
748             * Returns the image persistence.
749             *
750             * @return the image persistence
751             */
752            public ImagePersistence getImagePersistence() {
753                    return imagePersistence;
754            }
755    
756            /**
757             * Sets the image persistence.
758             *
759             * @param imagePersistence the image persistence
760             */
761            public void setImagePersistence(ImagePersistence imagePersistence) {
762                    this.imagePersistence = imagePersistence;
763            }
764    
765            /**
766             * Returns the resource local service.
767             *
768             * @return the resource local service
769             */
770            public com.liferay.portal.service.ResourceLocalService getResourceLocalService() {
771                    return resourceLocalService;
772            }
773    
774            /**
775             * Sets the resource local service.
776             *
777             * @param resourceLocalService the resource local service
778             */
779            public void setResourceLocalService(
780                    com.liferay.portal.service.ResourceLocalService resourceLocalService) {
781                    this.resourceLocalService = resourceLocalService;
782            }
783    
784            /**
785             * Returns the system event local service.
786             *
787             * @return the system event local service
788             */
789            public com.liferay.portal.service.SystemEventLocalService getSystemEventLocalService() {
790                    return systemEventLocalService;
791            }
792    
793            /**
794             * Sets the system event local service.
795             *
796             * @param systemEventLocalService the system event local service
797             */
798            public void setSystemEventLocalService(
799                    com.liferay.portal.service.SystemEventLocalService systemEventLocalService) {
800                    this.systemEventLocalService = systemEventLocalService;
801            }
802    
803            /**
804             * Returns the system event persistence.
805             *
806             * @return the system event persistence
807             */
808            public SystemEventPersistence getSystemEventPersistence() {
809                    return systemEventPersistence;
810            }
811    
812            /**
813             * Sets the system event persistence.
814             *
815             * @param systemEventPersistence the system event persistence
816             */
817            public void setSystemEventPersistence(
818                    SystemEventPersistence systemEventPersistence) {
819                    this.systemEventPersistence = systemEventPersistence;
820            }
821    
822            /**
823             * Returns the user local service.
824             *
825             * @return the user local service
826             */
827            public com.liferay.portal.service.UserLocalService getUserLocalService() {
828                    return userLocalService;
829            }
830    
831            /**
832             * Sets the user local service.
833             *
834             * @param userLocalService the user local service
835             */
836            public void setUserLocalService(
837                    com.liferay.portal.service.UserLocalService userLocalService) {
838                    this.userLocalService = userLocalService;
839            }
840    
841            /**
842             * Returns the user remote service.
843             *
844             * @return the user remote service
845             */
846            public com.liferay.portal.service.UserService getUserService() {
847                    return userService;
848            }
849    
850            /**
851             * Sets the user remote service.
852             *
853             * @param userService the user remote service
854             */
855            public void setUserService(
856                    com.liferay.portal.service.UserService userService) {
857                    this.userService = userService;
858            }
859    
860            /**
861             * Returns the user persistence.
862             *
863             * @return the user persistence
864             */
865            public UserPersistence getUserPersistence() {
866                    return userPersistence;
867            }
868    
869            /**
870             * Sets the user persistence.
871             *
872             * @param userPersistence the user persistence
873             */
874            public void setUserPersistence(UserPersistence userPersistence) {
875                    this.userPersistence = userPersistence;
876            }
877    
878            /**
879             * Returns the user finder.
880             *
881             * @return the user finder
882             */
883            public UserFinder getUserFinder() {
884                    return userFinder;
885            }
886    
887            /**
888             * Sets the user finder.
889             *
890             * @param userFinder the user finder
891             */
892            public void setUserFinder(UserFinder userFinder) {
893                    this.userFinder = userFinder;
894            }
895    
896            public void afterPropertiesSet() {
897                    persistedModelLocalServiceRegistry.register("com.liferay.portlet.dynamicdatamapping.model.DDMTemplate",
898                            ddmTemplateLocalService);
899            }
900    
901            public void destroy() {
902                    persistedModelLocalServiceRegistry.unregister(
903                            "com.liferay.portlet.dynamicdatamapping.model.DDMTemplate");
904            }
905    
906            /**
907             * Returns the Spring bean ID for this bean.
908             *
909             * @return the Spring bean ID for this bean
910             */
911            @Override
912            public String getBeanIdentifier() {
913                    return _beanIdentifier;
914            }
915    
916            /**
917             * Sets the Spring bean ID for this bean.
918             *
919             * @param beanIdentifier the Spring bean ID for this bean
920             */
921            @Override
922            public void setBeanIdentifier(String beanIdentifier) {
923                    _beanIdentifier = beanIdentifier;
924            }
925    
926            protected Class<?> getModelClass() {
927                    return DDMTemplate.class;
928            }
929    
930            protected String getModelClassName() {
931                    return DDMTemplate.class.getName();
932            }
933    
934            /**
935             * Performs an SQL query.
936             *
937             * @param sql the sql query
938             */
939            protected void runSQL(String sql) throws SystemException {
940                    try {
941                            DataSource dataSource = ddmTemplatePersistence.getDataSource();
942    
943                            SqlUpdate sqlUpdate = SqlUpdateFactoryUtil.getSqlUpdate(dataSource,
944                                            sql, new int[0]);
945    
946                            sqlUpdate.update();
947                    }
948                    catch (Exception e) {
949                            throw new SystemException(e);
950                    }
951            }
952    
953            @BeanReference(type = com.liferay.portlet.dynamicdatamapping.service.DDMContentLocalService.class)
954            protected com.liferay.portlet.dynamicdatamapping.service.DDMContentLocalService ddmContentLocalService;
955            @BeanReference(type = DDMContentPersistence.class)
956            protected DDMContentPersistence ddmContentPersistence;
957            @BeanReference(type = com.liferay.portlet.dynamicdatamapping.service.DDMStorageLinkLocalService.class)
958            protected com.liferay.portlet.dynamicdatamapping.service.DDMStorageLinkLocalService ddmStorageLinkLocalService;
959            @BeanReference(type = DDMStorageLinkPersistence.class)
960            protected DDMStorageLinkPersistence ddmStorageLinkPersistence;
961            @BeanReference(type = com.liferay.portlet.dynamicdatamapping.service.DDMStructureLocalService.class)
962            protected com.liferay.portlet.dynamicdatamapping.service.DDMStructureLocalService ddmStructureLocalService;
963            @BeanReference(type = com.liferay.portlet.dynamicdatamapping.service.DDMStructureService.class)
964            protected com.liferay.portlet.dynamicdatamapping.service.DDMStructureService ddmStructureService;
965            @BeanReference(type = DDMStructurePersistence.class)
966            protected DDMStructurePersistence ddmStructurePersistence;
967            @BeanReference(type = DDMStructureFinder.class)
968            protected DDMStructureFinder ddmStructureFinder;
969            @BeanReference(type = com.liferay.portlet.dynamicdatamapping.service.DDMStructureLinkLocalService.class)
970            protected com.liferay.portlet.dynamicdatamapping.service.DDMStructureLinkLocalService ddmStructureLinkLocalService;
971            @BeanReference(type = DDMStructureLinkPersistence.class)
972            protected DDMStructureLinkPersistence ddmStructureLinkPersistence;
973            @BeanReference(type = com.liferay.portlet.dynamicdatamapping.service.DDMTemplateLocalService.class)
974            protected com.liferay.portlet.dynamicdatamapping.service.DDMTemplateLocalService ddmTemplateLocalService;
975            @BeanReference(type = com.liferay.portlet.dynamicdatamapping.service.DDMTemplateService.class)
976            protected com.liferay.portlet.dynamicdatamapping.service.DDMTemplateService ddmTemplateService;
977            @BeanReference(type = DDMTemplatePersistence.class)
978            protected DDMTemplatePersistence ddmTemplatePersistence;
979            @BeanReference(type = DDMTemplateFinder.class)
980            protected DDMTemplateFinder ddmTemplateFinder;
981            @BeanReference(type = com.liferay.counter.service.CounterLocalService.class)
982            protected com.liferay.counter.service.CounterLocalService counterLocalService;
983            @BeanReference(type = com.liferay.portal.service.GroupLocalService.class)
984            protected com.liferay.portal.service.GroupLocalService groupLocalService;
985            @BeanReference(type = com.liferay.portal.service.GroupService.class)
986            protected com.liferay.portal.service.GroupService groupService;
987            @BeanReference(type = GroupPersistence.class)
988            protected GroupPersistence groupPersistence;
989            @BeanReference(type = GroupFinder.class)
990            protected GroupFinder groupFinder;
991            @BeanReference(type = com.liferay.portal.service.ImageLocalService.class)
992            protected com.liferay.portal.service.ImageLocalService imageLocalService;
993            @BeanReference(type = com.liferay.portal.service.ImageService.class)
994            protected com.liferay.portal.service.ImageService imageService;
995            @BeanReference(type = ImagePersistence.class)
996            protected ImagePersistence imagePersistence;
997            @BeanReference(type = com.liferay.portal.service.ResourceLocalService.class)
998            protected com.liferay.portal.service.ResourceLocalService resourceLocalService;
999            @BeanReference(type = com.liferay.portal.service.SystemEventLocalService.class)
1000            protected com.liferay.portal.service.SystemEventLocalService systemEventLocalService;
1001            @BeanReference(type = SystemEventPersistence.class)
1002            protected SystemEventPersistence systemEventPersistence;
1003            @BeanReference(type = com.liferay.portal.service.UserLocalService.class)
1004            protected com.liferay.portal.service.UserLocalService userLocalService;
1005            @BeanReference(type = com.liferay.portal.service.UserService.class)
1006            protected com.liferay.portal.service.UserService userService;
1007            @BeanReference(type = UserPersistence.class)
1008            protected UserPersistence userPersistence;
1009            @BeanReference(type = UserFinder.class)
1010            protected UserFinder userFinder;
1011            @BeanReference(type = PersistedModelLocalServiceRegistry.class)
1012            protected PersistedModelLocalServiceRegistry persistedModelLocalServiceRegistry;
1013            private String _beanIdentifier;
1014    }