001    /**
002     * Copyright (c) 2000-present 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 aQute.bnd.annotation.ProviderType;
018    
019    import com.liferay.portal.kernel.bean.BeanReference;
020    import com.liferay.portal.kernel.bean.IdentifiableBean;
021    import com.liferay.portal.kernel.dao.db.DB;
022    import com.liferay.portal.kernel.dao.db.DBFactoryUtil;
023    import com.liferay.portal.kernel.dao.jdbc.SqlUpdate;
024    import com.liferay.portal.kernel.dao.jdbc.SqlUpdateFactoryUtil;
025    import com.liferay.portal.kernel.dao.orm.ActionableDynamicQuery;
026    import com.liferay.portal.kernel.dao.orm.DefaultActionableDynamicQuery;
027    import com.liferay.portal.kernel.dao.orm.DynamicQuery;
028    import com.liferay.portal.kernel.dao.orm.DynamicQueryFactoryUtil;
029    import com.liferay.portal.kernel.dao.orm.ExportActionableDynamicQuery;
030    import com.liferay.portal.kernel.dao.orm.Projection;
031    import com.liferay.portal.kernel.dao.orm.Property;
032    import com.liferay.portal.kernel.dao.orm.PropertyFactoryUtil;
033    import com.liferay.portal.kernel.exception.PortalException;
034    import com.liferay.portal.kernel.exception.SystemException;
035    import com.liferay.portal.kernel.lar.ExportImportHelperUtil;
036    import com.liferay.portal.kernel.lar.ManifestSummary;
037    import com.liferay.portal.kernel.lar.PortletDataContext;
038    import com.liferay.portal.kernel.lar.StagedModelDataHandlerUtil;
039    import com.liferay.portal.kernel.lar.StagedModelType;
040    import com.liferay.portal.kernel.search.Indexable;
041    import com.liferay.portal.kernel.search.IndexableType;
042    import com.liferay.portal.kernel.util.OrderByComparator;
043    import com.liferay.portal.model.PersistedModel;
044    import com.liferay.portal.service.BaseLocalServiceImpl;
045    import com.liferay.portal.service.PersistedModelLocalServiceRegistry;
046    import com.liferay.portal.service.persistence.ClassNamePersistence;
047    import com.liferay.portal.service.persistence.GroupFinder;
048    import com.liferay.portal.service.persistence.GroupPersistence;
049    import com.liferay.portal.service.persistence.SystemEventPersistence;
050    import com.liferay.portal.service.persistence.UserFinder;
051    import com.liferay.portal.service.persistence.UserPersistence;
052    import com.liferay.portal.util.PortalUtil;
053    
054    import com.liferay.portlet.documentlibrary.service.persistence.DLFileEntryTypeFinder;
055    import com.liferay.portlet.documentlibrary.service.persistence.DLFileEntryTypePersistence;
056    import com.liferay.portlet.dynamicdatamapping.model.DDMStructure;
057    import com.liferay.portlet.dynamicdatamapping.service.DDMStructureLocalService;
058    import com.liferay.portlet.dynamicdatamapping.service.persistence.DDMStructureFinder;
059    import com.liferay.portlet.dynamicdatamapping.service.persistence.DDMStructureLinkPersistence;
060    import com.liferay.portlet.dynamicdatamapping.service.persistence.DDMStructurePersistence;
061    import com.liferay.portlet.dynamicdatamapping.service.persistence.DDMStructureVersionPersistence;
062    import com.liferay.portlet.dynamicdatamapping.service.persistence.DDMTemplateFinder;
063    import com.liferay.portlet.dynamicdatamapping.service.persistence.DDMTemplatePersistence;
064    import com.liferay.portlet.journal.service.persistence.JournalFolderFinder;
065    import com.liferay.portlet.journal.service.persistence.JournalFolderPersistence;
066    
067    import java.io.Serializable;
068    
069    import java.util.List;
070    
071    import javax.sql.DataSource;
072    
073    /**
074     * Provides the base implementation for the d d m structure local service.
075     *
076     * <p>
077     * 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.DDMStructureLocalServiceImpl}.
078     * </p>
079     *
080     * @author Brian Wing Shun Chan
081     * @see com.liferay.portlet.dynamicdatamapping.service.impl.DDMStructureLocalServiceImpl
082     * @see com.liferay.portlet.dynamicdatamapping.service.DDMStructureLocalServiceUtil
083     * @generated
084     */
085    @ProviderType
086    public abstract class DDMStructureLocalServiceBaseImpl
087            extends BaseLocalServiceImpl implements DDMStructureLocalService,
088                    IdentifiableBean {
089            /*
090             * NOTE FOR DEVELOPERS:
091             *
092             * Never modify or reference this class directly. Always use {@link com.liferay.portlet.dynamicdatamapping.service.DDMStructureLocalServiceUtil} to access the d d m structure local service.
093             */
094    
095            /**
096             * Adds the d d m structure to the database. Also notifies the appropriate model listeners.
097             *
098             * @param ddmStructure the d d m structure
099             * @return the d d m structure that was added
100             */
101            @Indexable(type = IndexableType.REINDEX)
102            @Override
103            public DDMStructure addDDMStructure(DDMStructure ddmStructure) {
104                    ddmStructure.setNew(true);
105    
106                    return ddmStructurePersistence.update(ddmStructure);
107            }
108    
109            /**
110             * Creates a new d d m structure with the primary key. Does not add the d d m structure to the database.
111             *
112             * @param structureId the primary key for the new d d m structure
113             * @return the new d d m structure
114             */
115            @Override
116            public DDMStructure createDDMStructure(long structureId) {
117                    return ddmStructurePersistence.create(structureId);
118            }
119    
120            /**
121             * Deletes the d d m structure with the primary key from the database. Also notifies the appropriate model listeners.
122             *
123             * @param structureId the primary key of the d d m structure
124             * @return the d d m structure that was removed
125             * @throws PortalException if a d d m structure with the primary key could not be found
126             */
127            @Indexable(type = IndexableType.DELETE)
128            @Override
129            public DDMStructure deleteDDMStructure(long structureId)
130                    throws PortalException {
131                    return ddmStructurePersistence.remove(structureId);
132            }
133    
134            /**
135             * Deletes the d d m structure from the database. Also notifies the appropriate model listeners.
136             *
137             * @param ddmStructure the d d m structure
138             * @return the d d m structure that was removed
139             */
140            @Indexable(type = IndexableType.DELETE)
141            @Override
142            public DDMStructure deleteDDMStructure(DDMStructure ddmStructure) {
143                    return ddmStructurePersistence.remove(ddmStructure);
144            }
145    
146            @Override
147            public DynamicQuery dynamicQuery() {
148                    Class<?> clazz = getClass();
149    
150                    return DynamicQueryFactoryUtil.forClass(DDMStructure.class,
151                            clazz.getClassLoader());
152            }
153    
154            /**
155             * Performs a dynamic query on the database and returns the matching rows.
156             *
157             * @param dynamicQuery the dynamic query
158             * @return the matching rows
159             */
160            @Override
161            public <T> List<T> dynamicQuery(DynamicQuery dynamicQuery) {
162                    return ddmStructurePersistence.findWithDynamicQuery(dynamicQuery);
163            }
164    
165            /**
166             * Performs a dynamic query on the database and returns a range of the matching rows.
167             *
168             * <p>
169             * 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.DDMStructureModelImpl}. 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.
170             * </p>
171             *
172             * @param dynamicQuery the dynamic query
173             * @param start the lower bound of the range of model instances
174             * @param end the upper bound of the range of model instances (not inclusive)
175             * @return the range of matching rows
176             */
177            @Override
178            public <T> List<T> dynamicQuery(DynamicQuery dynamicQuery, int start,
179                    int end) {
180                    return ddmStructurePersistence.findWithDynamicQuery(dynamicQuery,
181                            start, end);
182            }
183    
184            /**
185             * Performs a dynamic query on the database and returns an ordered range of the matching rows.
186             *
187             * <p>
188             * 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.DDMStructureModelImpl}. 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.
189             * </p>
190             *
191             * @param dynamicQuery the dynamic query
192             * @param start the lower bound of the range of model instances
193             * @param end the upper bound of the range of model instances (not inclusive)
194             * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
195             * @return the ordered range of matching rows
196             */
197            @Override
198            public <T> List<T> dynamicQuery(DynamicQuery dynamicQuery, int start,
199                    int end, OrderByComparator<T> orderByComparator) {
200                    return ddmStructurePersistence.findWithDynamicQuery(dynamicQuery,
201                            start, end, orderByComparator);
202            }
203    
204            /**
205             * Returns the number of rows matching the dynamic query.
206             *
207             * @param dynamicQuery the dynamic query
208             * @return the number of rows matching the dynamic query
209             */
210            @Override
211            public long dynamicQueryCount(DynamicQuery dynamicQuery) {
212                    return ddmStructurePersistence.countWithDynamicQuery(dynamicQuery);
213            }
214    
215            /**
216             * Returns the number of rows matching the dynamic query.
217             *
218             * @param dynamicQuery the dynamic query
219             * @param projection the projection to apply to the query
220             * @return the number of rows matching the dynamic query
221             */
222            @Override
223            public long dynamicQueryCount(DynamicQuery dynamicQuery,
224                    Projection projection) {
225                    return ddmStructurePersistence.countWithDynamicQuery(dynamicQuery,
226                            projection);
227            }
228    
229            @Override
230            public DDMStructure fetchDDMStructure(long structureId) {
231                    return ddmStructurePersistence.fetchByPrimaryKey(structureId);
232            }
233    
234            /**
235             * Returns the d d m structure matching the UUID and group.
236             *
237             * @param uuid the d d m structure's UUID
238             * @param groupId the primary key of the group
239             * @return the matching d d m structure, or <code>null</code> if a matching d d m structure could not be found
240             */
241            @Override
242            public DDMStructure fetchDDMStructureByUuidAndGroupId(String uuid,
243                    long groupId) {
244                    return ddmStructurePersistence.fetchByUUID_G(uuid, groupId);
245            }
246    
247            /**
248             * Returns the d d m structure with the primary key.
249             *
250             * @param structureId the primary key of the d d m structure
251             * @return the d d m structure
252             * @throws PortalException if a d d m structure with the primary key could not be found
253             */
254            @Override
255            public DDMStructure getDDMStructure(long structureId)
256                    throws PortalException {
257                    return ddmStructurePersistence.findByPrimaryKey(structureId);
258            }
259    
260            @Override
261            public ActionableDynamicQuery getActionableDynamicQuery() {
262                    ActionableDynamicQuery actionableDynamicQuery = new DefaultActionableDynamicQuery();
263    
264                    actionableDynamicQuery.setBaseLocalService(com.liferay.portlet.dynamicdatamapping.service.DDMStructureLocalServiceUtil.getService());
265                    actionableDynamicQuery.setClass(DDMStructure.class);
266                    actionableDynamicQuery.setClassLoader(getClassLoader());
267    
268                    actionableDynamicQuery.setPrimaryKeyPropertyName("structureId");
269    
270                    return actionableDynamicQuery;
271            }
272    
273            protected void initActionableDynamicQuery(
274                    ActionableDynamicQuery actionableDynamicQuery) {
275                    actionableDynamicQuery.setBaseLocalService(com.liferay.portlet.dynamicdatamapping.service.DDMStructureLocalServiceUtil.getService());
276                    actionableDynamicQuery.setClass(DDMStructure.class);
277                    actionableDynamicQuery.setClassLoader(getClassLoader());
278    
279                    actionableDynamicQuery.setPrimaryKeyPropertyName("structureId");
280            }
281    
282            @Override
283            public ExportActionableDynamicQuery getExportActionableDynamicQuery(
284                    final PortletDataContext portletDataContext) {
285                    final ExportActionableDynamicQuery exportActionableDynamicQuery = new ExportActionableDynamicQuery() {
286                                    @Override
287                                    public long performCount() throws PortalException {
288                                            ManifestSummary manifestSummary = portletDataContext.getManifestSummary();
289    
290                                            StagedModelType stagedModelType = getStagedModelType();
291    
292                                            long modelAdditionCount = super.performCount();
293    
294                                            manifestSummary.addModelAdditionCount(stagedModelType.toString(),
295                                                    modelAdditionCount);
296    
297                                            long modelDeletionCount = ExportImportHelperUtil.getModelDeletionCount(portletDataContext,
298                                                            stagedModelType);
299    
300                                            manifestSummary.addModelDeletionCount(stagedModelType.toString(),
301                                                    modelDeletionCount);
302    
303                                            return modelAdditionCount;
304                                    }
305                            };
306    
307                    initActionableDynamicQuery(exportActionableDynamicQuery);
308    
309                    exportActionableDynamicQuery.setAddCriteriaMethod(new ActionableDynamicQuery.AddCriteriaMethod() {
310                                    @Override
311                                    public void addCriteria(DynamicQuery dynamicQuery) {
312                                            portletDataContext.addDateRangeCriteria(dynamicQuery,
313                                                    "modifiedDate");
314    
315                                            StagedModelType stagedModelType = exportActionableDynamicQuery.getStagedModelType();
316    
317                                            if (stagedModelType.getReferrerClassNameId() >= 0) {
318                                                    Property classNameIdProperty = PropertyFactoryUtil.forName(
319                                                                    "classNameId");
320    
321                                                    dynamicQuery.add(classNameIdProperty.eq(
322                                                                    stagedModelType.getReferrerClassNameId()));
323                                            }
324                                    }
325                            });
326    
327                    exportActionableDynamicQuery.setCompanyId(portletDataContext.getCompanyId());
328    
329                    exportActionableDynamicQuery.setGroupId(portletDataContext.getScopeGroupId());
330    
331                    exportActionableDynamicQuery.setPerformActionMethod(new ActionableDynamicQuery.PerformActionMethod() {
332                                    @Override
333                                    public void performAction(Object object)
334                                            throws PortalException {
335                                            DDMStructure stagedModel = (DDMStructure)object;
336    
337                                            StagedModelDataHandlerUtil.exportStagedModel(portletDataContext,
338                                                    stagedModel);
339                                    }
340                            });
341                    exportActionableDynamicQuery.setStagedModelType(new StagedModelType(
342                                    PortalUtil.getClassNameId(DDMStructure.class.getName())));
343    
344                    return exportActionableDynamicQuery;
345            }
346    
347            /**
348             * @throws PortalException
349             */
350            @Override
351            public PersistedModel deletePersistedModel(PersistedModel persistedModel)
352                    throws PortalException {
353                    return ddmStructureLocalService.deleteDDMStructure((DDMStructure)persistedModel);
354            }
355    
356            @Override
357            public PersistedModel getPersistedModel(Serializable primaryKeyObj)
358                    throws PortalException {
359                    return ddmStructurePersistence.findByPrimaryKey(primaryKeyObj);
360            }
361    
362            /**
363             * Returns all the d d m structures matching the UUID and company.
364             *
365             * @param uuid the UUID of the d d m structures
366             * @param companyId the primary key of the company
367             * @return the matching d d m structures, or an empty list if no matches were found
368             */
369            @Override
370            public List<DDMStructure> getDDMStructuresByUuidAndCompanyId(String uuid,
371                    long companyId) {
372                    return ddmStructurePersistence.findByUuid_C(uuid, companyId);
373            }
374    
375            /**
376             * Returns a range of d d m structures matching the UUID and company.
377             *
378             * @param uuid the UUID of the d d m structures
379             * @param companyId the primary key of the company
380             * @param start the lower bound of the range of d d m structures
381             * @param end the upper bound of the range of d d m structures (not inclusive)
382             * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
383             * @return the range of matching d d m structures, or an empty list if no matches were found
384             */
385            @Override
386            public List<DDMStructure> getDDMStructuresByUuidAndCompanyId(String uuid,
387                    long companyId, int start, int end,
388                    OrderByComparator<DDMStructure> orderByComparator) {
389                    return ddmStructurePersistence.findByUuid_C(uuid, companyId, start,
390                            end, orderByComparator);
391            }
392    
393            /**
394             * Returns the d d m structure matching the UUID and group.
395             *
396             * @param uuid the d d m structure's UUID
397             * @param groupId the primary key of the group
398             * @return the matching d d m structure
399             * @throws PortalException if a matching d d m structure could not be found
400             */
401            @Override
402            public DDMStructure getDDMStructureByUuidAndGroupId(String uuid,
403                    long groupId) throws PortalException {
404                    return ddmStructurePersistence.findByUUID_G(uuid, groupId);
405            }
406    
407            /**
408             * Returns a range of all the d d m structures.
409             *
410             * <p>
411             * 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.DDMStructureModelImpl}. 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.
412             * </p>
413             *
414             * @param start the lower bound of the range of d d m structures
415             * @param end the upper bound of the range of d d m structures (not inclusive)
416             * @return the range of d d m structures
417             */
418            @Override
419            public List<DDMStructure> getDDMStructures(int start, int end) {
420                    return ddmStructurePersistence.findAll(start, end);
421            }
422    
423            /**
424             * Returns the number of d d m structures.
425             *
426             * @return the number of d d m structures
427             */
428            @Override
429            public int getDDMStructuresCount() {
430                    return ddmStructurePersistence.countAll();
431            }
432    
433            /**
434             * Updates the d d m structure in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.
435             *
436             * @param ddmStructure the d d m structure
437             * @return the d d m structure that was updated
438             */
439            @Indexable(type = IndexableType.REINDEX)
440            @Override
441            public DDMStructure updateDDMStructure(DDMStructure ddmStructure) {
442                    return ddmStructurePersistence.update(ddmStructure);
443            }
444    
445            /**
446             */
447            @Override
448            public void addDLFileEntryTypeDDMStructure(long fileEntryTypeId,
449                    long structureId) {
450                    dlFileEntryTypePersistence.addDDMStructure(fileEntryTypeId, structureId);
451            }
452    
453            /**
454             */
455            @Override
456            public void addDLFileEntryTypeDDMStructure(long fileEntryTypeId,
457                    DDMStructure ddmStructure) {
458                    dlFileEntryTypePersistence.addDDMStructure(fileEntryTypeId, ddmStructure);
459            }
460    
461            /**
462             */
463            @Override
464            public void addDLFileEntryTypeDDMStructures(long fileEntryTypeId,
465                    long[] structureIds) {
466                    dlFileEntryTypePersistence.addDDMStructures(fileEntryTypeId,
467                            structureIds);
468            }
469    
470            /**
471             */
472            @Override
473            public void addDLFileEntryTypeDDMStructures(long fileEntryTypeId,
474                    List<DDMStructure> DDMStructures) {
475                    dlFileEntryTypePersistence.addDDMStructures(fileEntryTypeId,
476                            DDMStructures);
477            }
478    
479            /**
480             */
481            @Override
482            public void clearDLFileEntryTypeDDMStructures(long fileEntryTypeId) {
483                    dlFileEntryTypePersistence.clearDDMStructures(fileEntryTypeId);
484            }
485    
486            /**
487             */
488            @Override
489            public void deleteDLFileEntryTypeDDMStructure(long fileEntryTypeId,
490                    long structureId) {
491                    dlFileEntryTypePersistence.removeDDMStructure(fileEntryTypeId,
492                            structureId);
493            }
494    
495            /**
496             */
497            @Override
498            public void deleteDLFileEntryTypeDDMStructure(long fileEntryTypeId,
499                    DDMStructure ddmStructure) {
500                    dlFileEntryTypePersistence.removeDDMStructure(fileEntryTypeId,
501                            ddmStructure);
502            }
503    
504            /**
505             */
506            @Override
507            public void deleteDLFileEntryTypeDDMStructures(long fileEntryTypeId,
508                    long[] structureIds) {
509                    dlFileEntryTypePersistence.removeDDMStructures(fileEntryTypeId,
510                            structureIds);
511            }
512    
513            /**
514             */
515            @Override
516            public void deleteDLFileEntryTypeDDMStructures(long fileEntryTypeId,
517                    List<DDMStructure> DDMStructures) {
518                    dlFileEntryTypePersistence.removeDDMStructures(fileEntryTypeId,
519                            DDMStructures);
520            }
521    
522            /**
523             * Returns the fileEntryTypeIds of the document library file entry types associated with the d d m structure.
524             *
525             * @param structureId the structureId of the d d m structure
526             * @return long[] the fileEntryTypeIds of document library file entry types associated with the d d m structure
527             */
528            @Override
529            public long[] getDLFileEntryTypePrimaryKeys(long structureId) {
530                    return ddmStructurePersistence.getDLFileEntryTypePrimaryKeys(structureId);
531            }
532    
533            /**
534             */
535            @Override
536            public List<DDMStructure> getDLFileEntryTypeDDMStructures(
537                    long fileEntryTypeId) {
538                    return dlFileEntryTypePersistence.getDDMStructures(fileEntryTypeId);
539            }
540    
541            /**
542             */
543            @Override
544            public List<DDMStructure> getDLFileEntryTypeDDMStructures(
545                    long fileEntryTypeId, int start, int end) {
546                    return dlFileEntryTypePersistence.getDDMStructures(fileEntryTypeId,
547                            start, end);
548            }
549    
550            /**
551             */
552            @Override
553            public List<DDMStructure> getDLFileEntryTypeDDMStructures(
554                    long fileEntryTypeId, int start, int end,
555                    OrderByComparator<DDMStructure> orderByComparator) {
556                    return dlFileEntryTypePersistence.getDDMStructures(fileEntryTypeId,
557                            start, end, orderByComparator);
558            }
559    
560            /**
561             */
562            @Override
563            public int getDLFileEntryTypeDDMStructuresCount(long fileEntryTypeId) {
564                    return dlFileEntryTypePersistence.getDDMStructuresSize(fileEntryTypeId);
565            }
566    
567            /**
568             */
569            @Override
570            public boolean hasDLFileEntryTypeDDMStructure(long fileEntryTypeId,
571                    long structureId) {
572                    return dlFileEntryTypePersistence.containsDDMStructure(fileEntryTypeId,
573                            structureId);
574            }
575    
576            /**
577             */
578            @Override
579            public boolean hasDLFileEntryTypeDDMStructures(long fileEntryTypeId) {
580                    return dlFileEntryTypePersistence.containsDDMStructures(fileEntryTypeId);
581            }
582    
583            /**
584             */
585            @Override
586            public void setDLFileEntryTypeDDMStructures(long fileEntryTypeId,
587                    long[] structureIds) {
588                    dlFileEntryTypePersistence.setDDMStructures(fileEntryTypeId,
589                            structureIds);
590            }
591    
592            /**
593             */
594            @Override
595            public void addJournalFolderDDMStructure(long folderId, long structureId) {
596                    journalFolderPersistence.addDDMStructure(folderId, structureId);
597            }
598    
599            /**
600             */
601            @Override
602            public void addJournalFolderDDMStructure(long folderId,
603                    DDMStructure ddmStructure) {
604                    journalFolderPersistence.addDDMStructure(folderId, ddmStructure);
605            }
606    
607            /**
608             */
609            @Override
610            public void addJournalFolderDDMStructures(long folderId, long[] structureIds) {
611                    journalFolderPersistence.addDDMStructures(folderId, structureIds);
612            }
613    
614            /**
615             */
616            @Override
617            public void addJournalFolderDDMStructures(long folderId,
618                    List<DDMStructure> DDMStructures) {
619                    journalFolderPersistence.addDDMStructures(folderId, DDMStructures);
620            }
621    
622            /**
623             */
624            @Override
625            public void clearJournalFolderDDMStructures(long folderId) {
626                    journalFolderPersistence.clearDDMStructures(folderId);
627            }
628    
629            /**
630             */
631            @Override
632            public void deleteJournalFolderDDMStructure(long folderId, long structureId) {
633                    journalFolderPersistence.removeDDMStructure(folderId, structureId);
634            }
635    
636            /**
637             */
638            @Override
639            public void deleteJournalFolderDDMStructure(long folderId,
640                    DDMStructure ddmStructure) {
641                    journalFolderPersistence.removeDDMStructure(folderId, ddmStructure);
642            }
643    
644            /**
645             */
646            @Override
647            public void deleteJournalFolderDDMStructures(long folderId,
648                    long[] structureIds) {
649                    journalFolderPersistence.removeDDMStructures(folderId, structureIds);
650            }
651    
652            /**
653             */
654            @Override
655            public void deleteJournalFolderDDMStructures(long folderId,
656                    List<DDMStructure> DDMStructures) {
657                    journalFolderPersistence.removeDDMStructures(folderId, DDMStructures);
658            }
659    
660            /**
661             * Returns the folderIds of the journal folders associated with the d d m structure.
662             *
663             * @param structureId the structureId of the d d m structure
664             * @return long[] the folderIds of journal folders associated with the d d m structure
665             */
666            @Override
667            public long[] getJournalFolderPrimaryKeys(long structureId) {
668                    return ddmStructurePersistence.getJournalFolderPrimaryKeys(structureId);
669            }
670    
671            /**
672             */
673            @Override
674            public List<DDMStructure> getJournalFolderDDMStructures(long folderId) {
675                    return journalFolderPersistence.getDDMStructures(folderId);
676            }
677    
678            /**
679             */
680            @Override
681            public List<DDMStructure> getJournalFolderDDMStructures(long folderId,
682                    int start, int end) {
683                    return journalFolderPersistence.getDDMStructures(folderId, start, end);
684            }
685    
686            /**
687             */
688            @Override
689            public List<DDMStructure> getJournalFolderDDMStructures(long folderId,
690                    int start, int end, OrderByComparator<DDMStructure> orderByComparator) {
691                    return journalFolderPersistence.getDDMStructures(folderId, start, end,
692                            orderByComparator);
693            }
694    
695            /**
696             */
697            @Override
698            public int getJournalFolderDDMStructuresCount(long folderId) {
699                    return journalFolderPersistence.getDDMStructuresSize(folderId);
700            }
701    
702            /**
703             */
704            @Override
705            public boolean hasJournalFolderDDMStructure(long folderId, long structureId) {
706                    return journalFolderPersistence.containsDDMStructure(folderId,
707                            structureId);
708            }
709    
710            /**
711             */
712            @Override
713            public boolean hasJournalFolderDDMStructures(long folderId) {
714                    return journalFolderPersistence.containsDDMStructures(folderId);
715            }
716    
717            /**
718             */
719            @Override
720            public void setJournalFolderDDMStructures(long folderId, long[] structureIds) {
721                    journalFolderPersistence.setDDMStructures(folderId, structureIds);
722            }
723    
724            /**
725             * Returns the d d m structure local service.
726             *
727             * @return the d d m structure local service
728             */
729            public com.liferay.portlet.dynamicdatamapping.service.DDMStructureLocalService getDDMStructureLocalService() {
730                    return ddmStructureLocalService;
731            }
732    
733            /**
734             * Sets the d d m structure local service.
735             *
736             * @param ddmStructureLocalService the d d m structure local service
737             */
738            public void setDDMStructureLocalService(
739                    com.liferay.portlet.dynamicdatamapping.service.DDMStructureLocalService ddmStructureLocalService) {
740                    this.ddmStructureLocalService = ddmStructureLocalService;
741            }
742    
743            /**
744             * Returns the d d m structure remote service.
745             *
746             * @return the d d m structure remote service
747             */
748            public com.liferay.portlet.dynamicdatamapping.service.DDMStructureService getDDMStructureService() {
749                    return ddmStructureService;
750            }
751    
752            /**
753             * Sets the d d m structure remote service.
754             *
755             * @param ddmStructureService the d d m structure remote service
756             */
757            public void setDDMStructureService(
758                    com.liferay.portlet.dynamicdatamapping.service.DDMStructureService ddmStructureService) {
759                    this.ddmStructureService = ddmStructureService;
760            }
761    
762            /**
763             * Returns the d d m structure persistence.
764             *
765             * @return the d d m structure persistence
766             */
767            public DDMStructurePersistence getDDMStructurePersistence() {
768                    return ddmStructurePersistence;
769            }
770    
771            /**
772             * Sets the d d m structure persistence.
773             *
774             * @param ddmStructurePersistence the d d m structure persistence
775             */
776            public void setDDMStructurePersistence(
777                    DDMStructurePersistence ddmStructurePersistence) {
778                    this.ddmStructurePersistence = ddmStructurePersistence;
779            }
780    
781            /**
782             * Returns the d d m structure finder.
783             *
784             * @return the d d m structure finder
785             */
786            public DDMStructureFinder getDDMStructureFinder() {
787                    return ddmStructureFinder;
788            }
789    
790            /**
791             * Sets the d d m structure finder.
792             *
793             * @param ddmStructureFinder the d d m structure finder
794             */
795            public void setDDMStructureFinder(DDMStructureFinder ddmStructureFinder) {
796                    this.ddmStructureFinder = ddmStructureFinder;
797            }
798    
799            /**
800             * Returns the counter local service.
801             *
802             * @return the counter local service
803             */
804            public com.liferay.counter.service.CounterLocalService getCounterLocalService() {
805                    return counterLocalService;
806            }
807    
808            /**
809             * Sets the counter local service.
810             *
811             * @param counterLocalService the counter local service
812             */
813            public void setCounterLocalService(
814                    com.liferay.counter.service.CounterLocalService counterLocalService) {
815                    this.counterLocalService = counterLocalService;
816            }
817    
818            /**
819             * Returns the class name local service.
820             *
821             * @return the class name local service
822             */
823            public com.liferay.portal.service.ClassNameLocalService getClassNameLocalService() {
824                    return classNameLocalService;
825            }
826    
827            /**
828             * Sets the class name local service.
829             *
830             * @param classNameLocalService the class name local service
831             */
832            public void setClassNameLocalService(
833                    com.liferay.portal.service.ClassNameLocalService classNameLocalService) {
834                    this.classNameLocalService = classNameLocalService;
835            }
836    
837            /**
838             * Returns the class name remote service.
839             *
840             * @return the class name remote service
841             */
842            public com.liferay.portal.service.ClassNameService getClassNameService() {
843                    return classNameService;
844            }
845    
846            /**
847             * Sets the class name remote service.
848             *
849             * @param classNameService the class name remote service
850             */
851            public void setClassNameService(
852                    com.liferay.portal.service.ClassNameService classNameService) {
853                    this.classNameService = classNameService;
854            }
855    
856            /**
857             * Returns the class name persistence.
858             *
859             * @return the class name persistence
860             */
861            public ClassNamePersistence getClassNamePersistence() {
862                    return classNamePersistence;
863            }
864    
865            /**
866             * Sets the class name persistence.
867             *
868             * @param classNamePersistence the class name persistence
869             */
870            public void setClassNamePersistence(
871                    ClassNamePersistence classNamePersistence) {
872                    this.classNamePersistence = classNamePersistence;
873            }
874    
875            /**
876             * Returns the group local service.
877             *
878             * @return the group local service
879             */
880            public com.liferay.portal.service.GroupLocalService getGroupLocalService() {
881                    return groupLocalService;
882            }
883    
884            /**
885             * Sets the group local service.
886             *
887             * @param groupLocalService the group local service
888             */
889            public void setGroupLocalService(
890                    com.liferay.portal.service.GroupLocalService groupLocalService) {
891                    this.groupLocalService = groupLocalService;
892            }
893    
894            /**
895             * Returns the group remote service.
896             *
897             * @return the group remote service
898             */
899            public com.liferay.portal.service.GroupService getGroupService() {
900                    return groupService;
901            }
902    
903            /**
904             * Sets the group remote service.
905             *
906             * @param groupService the group remote service
907             */
908            public void setGroupService(
909                    com.liferay.portal.service.GroupService groupService) {
910                    this.groupService = groupService;
911            }
912    
913            /**
914             * Returns the group persistence.
915             *
916             * @return the group persistence
917             */
918            public GroupPersistence getGroupPersistence() {
919                    return groupPersistence;
920            }
921    
922            /**
923             * Sets the group persistence.
924             *
925             * @param groupPersistence the group persistence
926             */
927            public void setGroupPersistence(GroupPersistence groupPersistence) {
928                    this.groupPersistence = groupPersistence;
929            }
930    
931            /**
932             * Returns the group finder.
933             *
934             * @return the group finder
935             */
936            public GroupFinder getGroupFinder() {
937                    return groupFinder;
938            }
939    
940            /**
941             * Sets the group finder.
942             *
943             * @param groupFinder the group finder
944             */
945            public void setGroupFinder(GroupFinder groupFinder) {
946                    this.groupFinder = groupFinder;
947            }
948    
949            /**
950             * Returns the resource local service.
951             *
952             * @return the resource local service
953             */
954            public com.liferay.portal.service.ResourceLocalService getResourceLocalService() {
955                    return resourceLocalService;
956            }
957    
958            /**
959             * Sets the resource local service.
960             *
961             * @param resourceLocalService the resource local service
962             */
963            public void setResourceLocalService(
964                    com.liferay.portal.service.ResourceLocalService resourceLocalService) {
965                    this.resourceLocalService = resourceLocalService;
966            }
967    
968            /**
969             * Returns the system event local service.
970             *
971             * @return the system event local service
972             */
973            public com.liferay.portal.service.SystemEventLocalService getSystemEventLocalService() {
974                    return systemEventLocalService;
975            }
976    
977            /**
978             * Sets the system event local service.
979             *
980             * @param systemEventLocalService the system event local service
981             */
982            public void setSystemEventLocalService(
983                    com.liferay.portal.service.SystemEventLocalService systemEventLocalService) {
984                    this.systemEventLocalService = systemEventLocalService;
985            }
986    
987            /**
988             * Returns the system event persistence.
989             *
990             * @return the system event persistence
991             */
992            public SystemEventPersistence getSystemEventPersistence() {
993                    return systemEventPersistence;
994            }
995    
996            /**
997             * Sets the system event persistence.
998             *
999             * @param systemEventPersistence the system event persistence
1000             */
1001            public void setSystemEventPersistence(
1002                    SystemEventPersistence systemEventPersistence) {
1003                    this.systemEventPersistence = systemEventPersistence;
1004            }
1005    
1006            /**
1007             * Returns the user local service.
1008             *
1009             * @return the user local service
1010             */
1011            public com.liferay.portal.service.UserLocalService getUserLocalService() {
1012                    return userLocalService;
1013            }
1014    
1015            /**
1016             * Sets the user local service.
1017             *
1018             * @param userLocalService the user local service
1019             */
1020            public void setUserLocalService(
1021                    com.liferay.portal.service.UserLocalService userLocalService) {
1022                    this.userLocalService = userLocalService;
1023            }
1024    
1025            /**
1026             * Returns the user remote service.
1027             *
1028             * @return the user remote service
1029             */
1030            public com.liferay.portal.service.UserService getUserService() {
1031                    return userService;
1032            }
1033    
1034            /**
1035             * Sets the user remote service.
1036             *
1037             * @param userService the user remote service
1038             */
1039            public void setUserService(
1040                    com.liferay.portal.service.UserService userService) {
1041                    this.userService = userService;
1042            }
1043    
1044            /**
1045             * Returns the user persistence.
1046             *
1047             * @return the user persistence
1048             */
1049            public UserPersistence getUserPersistence() {
1050                    return userPersistence;
1051            }
1052    
1053            /**
1054             * Sets the user persistence.
1055             *
1056             * @param userPersistence the user persistence
1057             */
1058            public void setUserPersistence(UserPersistence userPersistence) {
1059                    this.userPersistence = userPersistence;
1060            }
1061    
1062            /**
1063             * Returns the user finder.
1064             *
1065             * @return the user finder
1066             */
1067            public UserFinder getUserFinder() {
1068                    return userFinder;
1069            }
1070    
1071            /**
1072             * Sets the user finder.
1073             *
1074             * @param userFinder the user finder
1075             */
1076            public void setUserFinder(UserFinder userFinder) {
1077                    this.userFinder = userFinder;
1078            }
1079    
1080            /**
1081             * Returns the document library file entry type local service.
1082             *
1083             * @return the document library file entry type local service
1084             */
1085            public com.liferay.portlet.documentlibrary.service.DLFileEntryTypeLocalService getDLFileEntryTypeLocalService() {
1086                    return dlFileEntryTypeLocalService;
1087            }
1088    
1089            /**
1090             * Sets the document library file entry type local service.
1091             *
1092             * @param dlFileEntryTypeLocalService the document library file entry type local service
1093             */
1094            public void setDLFileEntryTypeLocalService(
1095                    com.liferay.portlet.documentlibrary.service.DLFileEntryTypeLocalService dlFileEntryTypeLocalService) {
1096                    this.dlFileEntryTypeLocalService = dlFileEntryTypeLocalService;
1097            }
1098    
1099            /**
1100             * Returns the document library file entry type remote service.
1101             *
1102             * @return the document library file entry type remote service
1103             */
1104            public com.liferay.portlet.documentlibrary.service.DLFileEntryTypeService getDLFileEntryTypeService() {
1105                    return dlFileEntryTypeService;
1106            }
1107    
1108            /**
1109             * Sets the document library file entry type remote service.
1110             *
1111             * @param dlFileEntryTypeService the document library file entry type remote service
1112             */
1113            public void setDLFileEntryTypeService(
1114                    com.liferay.portlet.documentlibrary.service.DLFileEntryTypeService dlFileEntryTypeService) {
1115                    this.dlFileEntryTypeService = dlFileEntryTypeService;
1116            }
1117    
1118            /**
1119             * Returns the document library file entry type persistence.
1120             *
1121             * @return the document library file entry type persistence
1122             */
1123            public DLFileEntryTypePersistence getDLFileEntryTypePersistence() {
1124                    return dlFileEntryTypePersistence;
1125            }
1126    
1127            /**
1128             * Sets the document library file entry type persistence.
1129             *
1130             * @param dlFileEntryTypePersistence the document library file entry type persistence
1131             */
1132            public void setDLFileEntryTypePersistence(
1133                    DLFileEntryTypePersistence dlFileEntryTypePersistence) {
1134                    this.dlFileEntryTypePersistence = dlFileEntryTypePersistence;
1135            }
1136    
1137            /**
1138             * Returns the document library file entry type finder.
1139             *
1140             * @return the document library file entry type finder
1141             */
1142            public DLFileEntryTypeFinder getDLFileEntryTypeFinder() {
1143                    return dlFileEntryTypeFinder;
1144            }
1145    
1146            /**
1147             * Sets the document library file entry type finder.
1148             *
1149             * @param dlFileEntryTypeFinder the document library file entry type finder
1150             */
1151            public void setDLFileEntryTypeFinder(
1152                    DLFileEntryTypeFinder dlFileEntryTypeFinder) {
1153                    this.dlFileEntryTypeFinder = dlFileEntryTypeFinder;
1154            }
1155    
1156            /**
1157             * Returns the journal folder local service.
1158             *
1159             * @return the journal folder local service
1160             */
1161            public com.liferay.portlet.journal.service.JournalFolderLocalService getJournalFolderLocalService() {
1162                    return journalFolderLocalService;
1163            }
1164    
1165            /**
1166             * Sets the journal folder local service.
1167             *
1168             * @param journalFolderLocalService the journal folder local service
1169             */
1170            public void setJournalFolderLocalService(
1171                    com.liferay.portlet.journal.service.JournalFolderLocalService journalFolderLocalService) {
1172                    this.journalFolderLocalService = journalFolderLocalService;
1173            }
1174    
1175            /**
1176             * Returns the journal folder remote service.
1177             *
1178             * @return the journal folder remote service
1179             */
1180            public com.liferay.portlet.journal.service.JournalFolderService getJournalFolderService() {
1181                    return journalFolderService;
1182            }
1183    
1184            /**
1185             * Sets the journal folder remote service.
1186             *
1187             * @param journalFolderService the journal folder remote service
1188             */
1189            public void setJournalFolderService(
1190                    com.liferay.portlet.journal.service.JournalFolderService journalFolderService) {
1191                    this.journalFolderService = journalFolderService;
1192            }
1193    
1194            /**
1195             * Returns the journal folder persistence.
1196             *
1197             * @return the journal folder persistence
1198             */
1199            public JournalFolderPersistence getJournalFolderPersistence() {
1200                    return journalFolderPersistence;
1201            }
1202    
1203            /**
1204             * Sets the journal folder persistence.
1205             *
1206             * @param journalFolderPersistence the journal folder persistence
1207             */
1208            public void setJournalFolderPersistence(
1209                    JournalFolderPersistence journalFolderPersistence) {
1210                    this.journalFolderPersistence = journalFolderPersistence;
1211            }
1212    
1213            /**
1214             * Returns the journal folder finder.
1215             *
1216             * @return the journal folder finder
1217             */
1218            public JournalFolderFinder getJournalFolderFinder() {
1219                    return journalFolderFinder;
1220            }
1221    
1222            /**
1223             * Sets the journal folder finder.
1224             *
1225             * @param journalFolderFinder the journal folder finder
1226             */
1227            public void setJournalFolderFinder(JournalFolderFinder journalFolderFinder) {
1228                    this.journalFolderFinder = journalFolderFinder;
1229            }
1230    
1231            /**
1232             * Returns the d d m structure link local service.
1233             *
1234             * @return the d d m structure link local service
1235             */
1236            public com.liferay.portlet.dynamicdatamapping.service.DDMStructureLinkLocalService getDDMStructureLinkLocalService() {
1237                    return ddmStructureLinkLocalService;
1238            }
1239    
1240            /**
1241             * Sets the d d m structure link local service.
1242             *
1243             * @param ddmStructureLinkLocalService the d d m structure link local service
1244             */
1245            public void setDDMStructureLinkLocalService(
1246                    com.liferay.portlet.dynamicdatamapping.service.DDMStructureLinkLocalService ddmStructureLinkLocalService) {
1247                    this.ddmStructureLinkLocalService = ddmStructureLinkLocalService;
1248            }
1249    
1250            /**
1251             * Returns the d d m structure link persistence.
1252             *
1253             * @return the d d m structure link persistence
1254             */
1255            public DDMStructureLinkPersistence getDDMStructureLinkPersistence() {
1256                    return ddmStructureLinkPersistence;
1257            }
1258    
1259            /**
1260             * Sets the d d m structure link persistence.
1261             *
1262             * @param ddmStructureLinkPersistence the d d m structure link persistence
1263             */
1264            public void setDDMStructureLinkPersistence(
1265                    DDMStructureLinkPersistence ddmStructureLinkPersistence) {
1266                    this.ddmStructureLinkPersistence = ddmStructureLinkPersistence;
1267            }
1268    
1269            /**
1270             * Returns the d d m structure version local service.
1271             *
1272             * @return the d d m structure version local service
1273             */
1274            public com.liferay.portlet.dynamicdatamapping.service.DDMStructureVersionLocalService getDDMStructureVersionLocalService() {
1275                    return ddmStructureVersionLocalService;
1276            }
1277    
1278            /**
1279             * Sets the d d m structure version local service.
1280             *
1281             * @param ddmStructureVersionLocalService the d d m structure version local service
1282             */
1283            public void setDDMStructureVersionLocalService(
1284                    com.liferay.portlet.dynamicdatamapping.service.DDMStructureVersionLocalService ddmStructureVersionLocalService) {
1285                    this.ddmStructureVersionLocalService = ddmStructureVersionLocalService;
1286            }
1287    
1288            /**
1289             * Returns the d d m structure version remote service.
1290             *
1291             * @return the d d m structure version remote service
1292             */
1293            public com.liferay.portlet.dynamicdatamapping.service.DDMStructureVersionService getDDMStructureVersionService() {
1294                    return ddmStructureVersionService;
1295            }
1296    
1297            /**
1298             * Sets the d d m structure version remote service.
1299             *
1300             * @param ddmStructureVersionService the d d m structure version remote service
1301             */
1302            public void setDDMStructureVersionService(
1303                    com.liferay.portlet.dynamicdatamapping.service.DDMStructureVersionService ddmStructureVersionService) {
1304                    this.ddmStructureVersionService = ddmStructureVersionService;
1305            }
1306    
1307            /**
1308             * Returns the d d m structure version persistence.
1309             *
1310             * @return the d d m structure version persistence
1311             */
1312            public DDMStructureVersionPersistence getDDMStructureVersionPersistence() {
1313                    return ddmStructureVersionPersistence;
1314            }
1315    
1316            /**
1317             * Sets the d d m structure version persistence.
1318             *
1319             * @param ddmStructureVersionPersistence the d d m structure version persistence
1320             */
1321            public void setDDMStructureVersionPersistence(
1322                    DDMStructureVersionPersistence ddmStructureVersionPersistence) {
1323                    this.ddmStructureVersionPersistence = ddmStructureVersionPersistence;
1324            }
1325    
1326            /**
1327             * Returns the d d m template local service.
1328             *
1329             * @return the d d m template local service
1330             */
1331            public com.liferay.portlet.dynamicdatamapping.service.DDMTemplateLocalService getDDMTemplateLocalService() {
1332                    return ddmTemplateLocalService;
1333            }
1334    
1335            /**
1336             * Sets the d d m template local service.
1337             *
1338             * @param ddmTemplateLocalService the d d m template local service
1339             */
1340            public void setDDMTemplateLocalService(
1341                    com.liferay.portlet.dynamicdatamapping.service.DDMTemplateLocalService ddmTemplateLocalService) {
1342                    this.ddmTemplateLocalService = ddmTemplateLocalService;
1343            }
1344    
1345            /**
1346             * Returns the d d m template remote service.
1347             *
1348             * @return the d d m template remote service
1349             */
1350            public com.liferay.portlet.dynamicdatamapping.service.DDMTemplateService getDDMTemplateService() {
1351                    return ddmTemplateService;
1352            }
1353    
1354            /**
1355             * Sets the d d m template remote service.
1356             *
1357             * @param ddmTemplateService the d d m template remote service
1358             */
1359            public void setDDMTemplateService(
1360                    com.liferay.portlet.dynamicdatamapping.service.DDMTemplateService ddmTemplateService) {
1361                    this.ddmTemplateService = ddmTemplateService;
1362            }
1363    
1364            /**
1365             * Returns the d d m template persistence.
1366             *
1367             * @return the d d m template persistence
1368             */
1369            public DDMTemplatePersistence getDDMTemplatePersistence() {
1370                    return ddmTemplatePersistence;
1371            }
1372    
1373            /**
1374             * Sets the d d m template persistence.
1375             *
1376             * @param ddmTemplatePersistence the d d m template persistence
1377             */
1378            public void setDDMTemplatePersistence(
1379                    DDMTemplatePersistence ddmTemplatePersistence) {
1380                    this.ddmTemplatePersistence = ddmTemplatePersistence;
1381            }
1382    
1383            /**
1384             * Returns the d d m template finder.
1385             *
1386             * @return the d d m template finder
1387             */
1388            public DDMTemplateFinder getDDMTemplateFinder() {
1389                    return ddmTemplateFinder;
1390            }
1391    
1392            /**
1393             * Sets the d d m template finder.
1394             *
1395             * @param ddmTemplateFinder the d d m template finder
1396             */
1397            public void setDDMTemplateFinder(DDMTemplateFinder ddmTemplateFinder) {
1398                    this.ddmTemplateFinder = ddmTemplateFinder;
1399            }
1400    
1401            public void afterPropertiesSet() {
1402                    persistedModelLocalServiceRegistry.register("com.liferay.portlet.dynamicdatamapping.model.DDMStructure",
1403                            ddmStructureLocalService);
1404            }
1405    
1406            public void destroy() {
1407                    persistedModelLocalServiceRegistry.unregister(
1408                            "com.liferay.portlet.dynamicdatamapping.model.DDMStructure");
1409            }
1410    
1411            /**
1412             * Returns the Spring bean ID for this bean.
1413             *
1414             * @return the Spring bean ID for this bean
1415             */
1416            @Override
1417            public String getBeanIdentifier() {
1418                    return _beanIdentifier;
1419            }
1420    
1421            /**
1422             * Sets the Spring bean ID for this bean.
1423             *
1424             * @param beanIdentifier the Spring bean ID for this bean
1425             */
1426            @Override
1427            public void setBeanIdentifier(String beanIdentifier) {
1428                    _beanIdentifier = beanIdentifier;
1429            }
1430    
1431            protected Class<?> getModelClass() {
1432                    return DDMStructure.class;
1433            }
1434    
1435            protected String getModelClassName() {
1436                    return DDMStructure.class.getName();
1437            }
1438    
1439            /**
1440             * Performs a SQL query.
1441             *
1442             * @param sql the sql query
1443             */
1444            protected void runSQL(String sql) {
1445                    try {
1446                            DataSource dataSource = ddmStructurePersistence.getDataSource();
1447    
1448                            DB db = DBFactoryUtil.getDB();
1449    
1450                            sql = db.buildSQL(sql);
1451                            sql = PortalUtil.transformSQL(sql);
1452    
1453                            SqlUpdate sqlUpdate = SqlUpdateFactoryUtil.getSqlUpdate(dataSource,
1454                                            sql, new int[0]);
1455    
1456                            sqlUpdate.update();
1457                    }
1458                    catch (Exception e) {
1459                            throw new SystemException(e);
1460                    }
1461            }
1462    
1463            @BeanReference(type = com.liferay.portlet.dynamicdatamapping.service.DDMStructureLocalService.class)
1464            protected com.liferay.portlet.dynamicdatamapping.service.DDMStructureLocalService ddmStructureLocalService;
1465            @BeanReference(type = com.liferay.portlet.dynamicdatamapping.service.DDMStructureService.class)
1466            protected com.liferay.portlet.dynamicdatamapping.service.DDMStructureService ddmStructureService;
1467            @BeanReference(type = DDMStructurePersistence.class)
1468            protected DDMStructurePersistence ddmStructurePersistence;
1469            @BeanReference(type = DDMStructureFinder.class)
1470            protected DDMStructureFinder ddmStructureFinder;
1471            @BeanReference(type = com.liferay.counter.service.CounterLocalService.class)
1472            protected com.liferay.counter.service.CounterLocalService counterLocalService;
1473            @BeanReference(type = com.liferay.portal.service.ClassNameLocalService.class)
1474            protected com.liferay.portal.service.ClassNameLocalService classNameLocalService;
1475            @BeanReference(type = com.liferay.portal.service.ClassNameService.class)
1476            protected com.liferay.portal.service.ClassNameService classNameService;
1477            @BeanReference(type = ClassNamePersistence.class)
1478            protected ClassNamePersistence classNamePersistence;
1479            @BeanReference(type = com.liferay.portal.service.GroupLocalService.class)
1480            protected com.liferay.portal.service.GroupLocalService groupLocalService;
1481            @BeanReference(type = com.liferay.portal.service.GroupService.class)
1482            protected com.liferay.portal.service.GroupService groupService;
1483            @BeanReference(type = GroupPersistence.class)
1484            protected GroupPersistence groupPersistence;
1485            @BeanReference(type = GroupFinder.class)
1486            protected GroupFinder groupFinder;
1487            @BeanReference(type = com.liferay.portal.service.ResourceLocalService.class)
1488            protected com.liferay.portal.service.ResourceLocalService resourceLocalService;
1489            @BeanReference(type = com.liferay.portal.service.SystemEventLocalService.class)
1490            protected com.liferay.portal.service.SystemEventLocalService systemEventLocalService;
1491            @BeanReference(type = SystemEventPersistence.class)
1492            protected SystemEventPersistence systemEventPersistence;
1493            @BeanReference(type = com.liferay.portal.service.UserLocalService.class)
1494            protected com.liferay.portal.service.UserLocalService userLocalService;
1495            @BeanReference(type = com.liferay.portal.service.UserService.class)
1496            protected com.liferay.portal.service.UserService userService;
1497            @BeanReference(type = UserPersistence.class)
1498            protected UserPersistence userPersistence;
1499            @BeanReference(type = UserFinder.class)
1500            protected UserFinder userFinder;
1501            @BeanReference(type = com.liferay.portlet.documentlibrary.service.DLFileEntryTypeLocalService.class)
1502            protected com.liferay.portlet.documentlibrary.service.DLFileEntryTypeLocalService dlFileEntryTypeLocalService;
1503            @BeanReference(type = com.liferay.portlet.documentlibrary.service.DLFileEntryTypeService.class)
1504            protected com.liferay.portlet.documentlibrary.service.DLFileEntryTypeService dlFileEntryTypeService;
1505            @BeanReference(type = DLFileEntryTypePersistence.class)
1506            protected DLFileEntryTypePersistence dlFileEntryTypePersistence;
1507            @BeanReference(type = DLFileEntryTypeFinder.class)
1508            protected DLFileEntryTypeFinder dlFileEntryTypeFinder;
1509            @BeanReference(type = com.liferay.portlet.journal.service.JournalFolderLocalService.class)
1510            protected com.liferay.portlet.journal.service.JournalFolderLocalService journalFolderLocalService;
1511            @BeanReference(type = com.liferay.portlet.journal.service.JournalFolderService.class)
1512            protected com.liferay.portlet.journal.service.JournalFolderService journalFolderService;
1513            @BeanReference(type = JournalFolderPersistence.class)
1514            protected JournalFolderPersistence journalFolderPersistence;
1515            @BeanReference(type = JournalFolderFinder.class)
1516            protected JournalFolderFinder journalFolderFinder;
1517            @BeanReference(type = com.liferay.portlet.dynamicdatamapping.service.DDMStructureLinkLocalService.class)
1518            protected com.liferay.portlet.dynamicdatamapping.service.DDMStructureLinkLocalService ddmStructureLinkLocalService;
1519            @BeanReference(type = DDMStructureLinkPersistence.class)
1520            protected DDMStructureLinkPersistence ddmStructureLinkPersistence;
1521            @BeanReference(type = com.liferay.portlet.dynamicdatamapping.service.DDMStructureVersionLocalService.class)
1522            protected com.liferay.portlet.dynamicdatamapping.service.DDMStructureVersionLocalService ddmStructureVersionLocalService;
1523            @BeanReference(type = com.liferay.portlet.dynamicdatamapping.service.DDMStructureVersionService.class)
1524            protected com.liferay.portlet.dynamicdatamapping.service.DDMStructureVersionService ddmStructureVersionService;
1525            @BeanReference(type = DDMStructureVersionPersistence.class)
1526            protected DDMStructureVersionPersistence ddmStructureVersionPersistence;
1527            @BeanReference(type = com.liferay.portlet.dynamicdatamapping.service.DDMTemplateLocalService.class)
1528            protected com.liferay.portlet.dynamicdatamapping.service.DDMTemplateLocalService ddmTemplateLocalService;
1529            @BeanReference(type = com.liferay.portlet.dynamicdatamapping.service.DDMTemplateService.class)
1530            protected com.liferay.portlet.dynamicdatamapping.service.DDMTemplateService ddmTemplateService;
1531            @BeanReference(type = DDMTemplatePersistence.class)
1532            protected DDMTemplatePersistence ddmTemplatePersistence;
1533            @BeanReference(type = DDMTemplateFinder.class)
1534            protected DDMTemplateFinder ddmTemplateFinder;
1535            @BeanReference(type = PersistedModelLocalServiceRegistry.class)
1536            protected PersistedModelLocalServiceRegistry persistedModelLocalServiceRegistry;
1537            private String _beanIdentifier;
1538    }