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.dynamicdatalists.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.exception.PortalException;
032    import com.liferay.portal.kernel.exception.SystemException;
033    import com.liferay.portal.kernel.lar.ExportImportHelperUtil;
034    import com.liferay.portal.kernel.lar.ManifestSummary;
035    import com.liferay.portal.kernel.lar.PortletDataContext;
036    import com.liferay.portal.kernel.lar.StagedModelDataHandlerUtil;
037    import com.liferay.portal.kernel.lar.StagedModelType;
038    import com.liferay.portal.kernel.search.Indexable;
039    import com.liferay.portal.kernel.search.IndexableType;
040    import com.liferay.portal.kernel.util.OrderByComparator;
041    import com.liferay.portal.model.PersistedModel;
042    import com.liferay.portal.service.BaseLocalServiceImpl;
043    import com.liferay.portal.service.PersistedModelLocalServiceRegistry;
044    import com.liferay.portal.service.persistence.ClassNamePersistence;
045    import com.liferay.portal.service.persistence.UserFinder;
046    import com.liferay.portal.service.persistence.UserPersistence;
047    import com.liferay.portal.service.persistence.WorkflowDefinitionLinkPersistence;
048    import com.liferay.portal.util.PortalUtil;
049    
050    import com.liferay.portlet.dynamicdatalists.model.DDLRecordSet;
051    import com.liferay.portlet.dynamicdatalists.service.DDLRecordSetLocalService;
052    import com.liferay.portlet.dynamicdatalists.service.persistence.DDLRecordFinder;
053    import com.liferay.portlet.dynamicdatalists.service.persistence.DDLRecordPersistence;
054    import com.liferay.portlet.dynamicdatalists.service.persistence.DDLRecordSetFinder;
055    import com.liferay.portlet.dynamicdatalists.service.persistence.DDLRecordSetPersistence;
056    import com.liferay.portlet.dynamicdatamapping.service.persistence.DDMStructureFinder;
057    import com.liferay.portlet.dynamicdatamapping.service.persistence.DDMStructureLinkPersistence;
058    import com.liferay.portlet.dynamicdatamapping.service.persistence.DDMStructurePersistence;
059    
060    import java.io.Serializable;
061    
062    import java.util.List;
063    
064    import javax.sql.DataSource;
065    
066    /**
067     * Provides the base implementation for the d d l record set local service.
068     *
069     * <p>
070     * 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.dynamicdatalists.service.impl.DDLRecordSetLocalServiceImpl}.
071     * </p>
072     *
073     * @author Brian Wing Shun Chan
074     * @see com.liferay.portlet.dynamicdatalists.service.impl.DDLRecordSetLocalServiceImpl
075     * @see com.liferay.portlet.dynamicdatalists.service.DDLRecordSetLocalServiceUtil
076     * @generated
077     */
078    @ProviderType
079    public abstract class DDLRecordSetLocalServiceBaseImpl
080            extends BaseLocalServiceImpl implements DDLRecordSetLocalService,
081                    IdentifiableBean {
082            /*
083             * NOTE FOR DEVELOPERS:
084             *
085             * Never modify or reference this class directly. Always use {@link com.liferay.portlet.dynamicdatalists.service.DDLRecordSetLocalServiceUtil} to access the d d l record set local service.
086             */
087    
088            /**
089             * Adds the d d l record set to the database. Also notifies the appropriate model listeners.
090             *
091             * @param ddlRecordSet the d d l record set
092             * @return the d d l record set that was added
093             */
094            @Indexable(type = IndexableType.REINDEX)
095            @Override
096            public DDLRecordSet addDDLRecordSet(DDLRecordSet ddlRecordSet) {
097                    ddlRecordSet.setNew(true);
098    
099                    return ddlRecordSetPersistence.update(ddlRecordSet);
100            }
101    
102            /**
103             * Creates a new d d l record set with the primary key. Does not add the d d l record set to the database.
104             *
105             * @param recordSetId the primary key for the new d d l record set
106             * @return the new d d l record set
107             */
108            @Override
109            public DDLRecordSet createDDLRecordSet(long recordSetId) {
110                    return ddlRecordSetPersistence.create(recordSetId);
111            }
112    
113            /**
114             * Deletes the d d l record set with the primary key from the database. Also notifies the appropriate model listeners.
115             *
116             * @param recordSetId the primary key of the d d l record set
117             * @return the d d l record set that was removed
118             * @throws PortalException if a d d l record set with the primary key could not be found
119             */
120            @Indexable(type = IndexableType.DELETE)
121            @Override
122            public DDLRecordSet deleteDDLRecordSet(long recordSetId)
123                    throws PortalException {
124                    return ddlRecordSetPersistence.remove(recordSetId);
125            }
126    
127            /**
128             * Deletes the d d l record set from the database. Also notifies the appropriate model listeners.
129             *
130             * @param ddlRecordSet the d d l record set
131             * @return the d d l record set that was removed
132             */
133            @Indexable(type = IndexableType.DELETE)
134            @Override
135            public DDLRecordSet deleteDDLRecordSet(DDLRecordSet ddlRecordSet) {
136                    return ddlRecordSetPersistence.remove(ddlRecordSet);
137            }
138    
139            @Override
140            public DynamicQuery dynamicQuery() {
141                    Class<?> clazz = getClass();
142    
143                    return DynamicQueryFactoryUtil.forClass(DDLRecordSet.class,
144                            clazz.getClassLoader());
145            }
146    
147            /**
148             * Performs a dynamic query on the database and returns the matching rows.
149             *
150             * @param dynamicQuery the dynamic query
151             * @return the matching rows
152             */
153            @Override
154            public <T> List<T> dynamicQuery(DynamicQuery dynamicQuery) {
155                    return ddlRecordSetPersistence.findWithDynamicQuery(dynamicQuery);
156            }
157    
158            /**
159             * Performs a dynamic query on the database and returns a range of the matching rows.
160             *
161             * <p>
162             * 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.dynamicdatalists.model.impl.DDLRecordSetModelImpl}. 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.
163             * </p>
164             *
165             * @param dynamicQuery the dynamic query
166             * @param start the lower bound of the range of model instances
167             * @param end the upper bound of the range of model instances (not inclusive)
168             * @return the range of matching rows
169             */
170            @Override
171            public <T> List<T> dynamicQuery(DynamicQuery dynamicQuery, int start,
172                    int end) {
173                    return ddlRecordSetPersistence.findWithDynamicQuery(dynamicQuery,
174                            start, end);
175            }
176    
177            /**
178             * Performs a dynamic query on the database and returns an ordered range of the matching rows.
179             *
180             * <p>
181             * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. 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.dynamicdatalists.model.impl.DDLRecordSetModelImpl}. 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.
182             * </p>
183             *
184             * @param dynamicQuery the dynamic query
185             * @param start the lower bound of the range of model instances
186             * @param end the upper bound of the range of model instances (not inclusive)
187             * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
188             * @return the ordered range of matching rows
189             */
190            @Override
191            public <T> List<T> dynamicQuery(DynamicQuery dynamicQuery, int start,
192                    int end, OrderByComparator<T> orderByComparator) {
193                    return ddlRecordSetPersistence.findWithDynamicQuery(dynamicQuery,
194                            start, 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             */
203            @Override
204            public long dynamicQueryCount(DynamicQuery dynamicQuery) {
205                    return ddlRecordSetPersistence.countWithDynamicQuery(dynamicQuery);
206            }
207    
208            /**
209             * Returns the number of rows that match the dynamic query.
210             *
211             * @param dynamicQuery the dynamic query
212             * @param projection the projection to apply to the query
213             * @return the number of rows that match the dynamic query
214             */
215            @Override
216            public long dynamicQueryCount(DynamicQuery dynamicQuery,
217                    Projection projection) {
218                    return ddlRecordSetPersistence.countWithDynamicQuery(dynamicQuery,
219                            projection);
220            }
221    
222            @Override
223            public DDLRecordSet fetchDDLRecordSet(long recordSetId) {
224                    return ddlRecordSetPersistence.fetchByPrimaryKey(recordSetId);
225            }
226    
227            /**
228             * Returns the d d l record set matching the UUID and group.
229             *
230             * @param uuid the d d l record set's UUID
231             * @param groupId the primary key of the group
232             * @return the matching d d l record set, or <code>null</code> if a matching d d l record set could not be found
233             */
234            @Override
235            public DDLRecordSet fetchDDLRecordSetByUuidAndGroupId(String uuid,
236                    long groupId) {
237                    return ddlRecordSetPersistence.fetchByUUID_G(uuid, groupId);
238            }
239    
240            /**
241             * Returns the d d l record set with the primary key.
242             *
243             * @param recordSetId the primary key of the d d l record set
244             * @return the d d l record set
245             * @throws PortalException if a d d l record set with the primary key could not be found
246             */
247            @Override
248            public DDLRecordSet getDDLRecordSet(long recordSetId)
249                    throws PortalException {
250                    return ddlRecordSetPersistence.findByPrimaryKey(recordSetId);
251            }
252    
253            @Override
254            public ActionableDynamicQuery getActionableDynamicQuery() {
255                    ActionableDynamicQuery actionableDynamicQuery = new DefaultActionableDynamicQuery();
256    
257                    actionableDynamicQuery.setBaseLocalService(com.liferay.portlet.dynamicdatalists.service.DDLRecordSetLocalServiceUtil.getService());
258                    actionableDynamicQuery.setClass(DDLRecordSet.class);
259                    actionableDynamicQuery.setClassLoader(getClassLoader());
260    
261                    actionableDynamicQuery.setPrimaryKeyPropertyName("recordSetId");
262    
263                    return actionableDynamicQuery;
264            }
265    
266            protected void initActionableDynamicQuery(
267                    ActionableDynamicQuery actionableDynamicQuery) {
268                    actionableDynamicQuery.setBaseLocalService(com.liferay.portlet.dynamicdatalists.service.DDLRecordSetLocalServiceUtil.getService());
269                    actionableDynamicQuery.setClass(DDLRecordSet.class);
270                    actionableDynamicQuery.setClassLoader(getClassLoader());
271    
272                    actionableDynamicQuery.setPrimaryKeyPropertyName("recordSetId");
273            }
274    
275            @Override
276            public ExportActionableDynamicQuery getExportActionableDynamicQuery(
277                    final PortletDataContext portletDataContext) {
278                    final ExportActionableDynamicQuery exportActionableDynamicQuery = new ExportActionableDynamicQuery() {
279                                    @Override
280                                    public long performCount() throws PortalException {
281                                            ManifestSummary manifestSummary = portletDataContext.getManifestSummary();
282    
283                                            StagedModelType stagedModelType = getStagedModelType();
284    
285                                            long modelAdditionCount = super.performCount();
286    
287                                            manifestSummary.addModelAdditionCount(stagedModelType.toString(),
288                                                    modelAdditionCount);
289    
290                                            long modelDeletionCount = ExportImportHelperUtil.getModelDeletionCount(portletDataContext,
291                                                            stagedModelType);
292    
293                                            manifestSummary.addModelDeletionCount(stagedModelType.toString(),
294                                                    modelDeletionCount);
295    
296                                            return modelAdditionCount;
297                                    }
298                            };
299    
300                    initActionableDynamicQuery(exportActionableDynamicQuery);
301    
302                    exportActionableDynamicQuery.setAddCriteriaMethod(new ActionableDynamicQuery.AddCriteriaMethod() {
303                                    @Override
304                                    public void addCriteria(DynamicQuery dynamicQuery) {
305                                            portletDataContext.addDateRangeCriteria(dynamicQuery,
306                                                    "modifiedDate");
307                                    }
308                            });
309    
310                    exportActionableDynamicQuery.setCompanyId(portletDataContext.getCompanyId());
311    
312                    exportActionableDynamicQuery.setGroupId(portletDataContext.getScopeGroupId());
313    
314                    exportActionableDynamicQuery.setPerformActionMethod(new ActionableDynamicQuery.PerformActionMethod() {
315                                    @Override
316                                    public void performAction(Object object)
317                                            throws PortalException {
318                                            DDLRecordSet stagedModel = (DDLRecordSet)object;
319    
320                                            StagedModelDataHandlerUtil.exportStagedModel(portletDataContext,
321                                                    stagedModel);
322                                    }
323                            });
324                    exportActionableDynamicQuery.setStagedModelType(new StagedModelType(
325                                    PortalUtil.getClassNameId(DDLRecordSet.class.getName())));
326    
327                    return exportActionableDynamicQuery;
328            }
329    
330            /**
331             * @throws PortalException
332             */
333            @Override
334            public PersistedModel deletePersistedModel(PersistedModel persistedModel)
335                    throws PortalException {
336                    return ddlRecordSetLocalService.deleteDDLRecordSet((DDLRecordSet)persistedModel);
337            }
338    
339            @Override
340            public PersistedModel getPersistedModel(Serializable primaryKeyObj)
341                    throws PortalException {
342                    return ddlRecordSetPersistence.findByPrimaryKey(primaryKeyObj);
343            }
344    
345            @Override
346            public List<DDLRecordSet> getDDLRecordSetsByUuidAndCompanyId(String uuid,
347                    long companyId) {
348                    return ddlRecordSetPersistence.findByUuid_C(uuid, companyId);
349            }
350    
351            @Override
352            public List<DDLRecordSet> getDDLRecordSetsByUuidAndCompanyId(String uuid,
353                    long companyId, int start, int end,
354                    OrderByComparator<DDLRecordSet> orderByComparator) {
355                    return ddlRecordSetPersistence.findByUuid_C(uuid, companyId, start,
356                            end, orderByComparator);
357            }
358    
359            /**
360             * Returns the d d l record set matching the UUID and group.
361             *
362             * @param uuid the d d l record set's UUID
363             * @param groupId the primary key of the group
364             * @return the matching d d l record set
365             * @throws PortalException if a matching d d l record set could not be found
366             */
367            @Override
368            public DDLRecordSet getDDLRecordSetByUuidAndGroupId(String uuid,
369                    long groupId) throws PortalException {
370                    return ddlRecordSetPersistence.findByUUID_G(uuid, groupId);
371            }
372    
373            /**
374             * Returns a range of all the d d l record sets.
375             *
376             * <p>
377             * 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.dynamicdatalists.model.impl.DDLRecordSetModelImpl}. 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.
378             * </p>
379             *
380             * @param start the lower bound of the range of d d l record sets
381             * @param end the upper bound of the range of d d l record sets (not inclusive)
382             * @return the range of d d l record sets
383             */
384            @Override
385            public List<DDLRecordSet> getDDLRecordSets(int start, int end) {
386                    return ddlRecordSetPersistence.findAll(start, end);
387            }
388    
389            /**
390             * Returns the number of d d l record sets.
391             *
392             * @return the number of d d l record sets
393             */
394            @Override
395            public int getDDLRecordSetsCount() {
396                    return ddlRecordSetPersistence.countAll();
397            }
398    
399            /**
400             * Updates the d d l record set in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.
401             *
402             * @param ddlRecordSet the d d l record set
403             * @return the d d l record set that was updated
404             */
405            @Indexable(type = IndexableType.REINDEX)
406            @Override
407            public DDLRecordSet updateDDLRecordSet(DDLRecordSet ddlRecordSet) {
408                    return ddlRecordSetPersistence.update(ddlRecordSet);
409            }
410    
411            /**
412             * Returns the d d l record set local service.
413             *
414             * @return the d d l record set local service
415             */
416            public com.liferay.portlet.dynamicdatalists.service.DDLRecordSetLocalService getDDLRecordSetLocalService() {
417                    return ddlRecordSetLocalService;
418            }
419    
420            /**
421             * Sets the d d l record set local service.
422             *
423             * @param ddlRecordSetLocalService the d d l record set local service
424             */
425            public void setDDLRecordSetLocalService(
426                    com.liferay.portlet.dynamicdatalists.service.DDLRecordSetLocalService ddlRecordSetLocalService) {
427                    this.ddlRecordSetLocalService = ddlRecordSetLocalService;
428            }
429    
430            /**
431             * Returns the d d l record set remote service.
432             *
433             * @return the d d l record set remote service
434             */
435            public com.liferay.portlet.dynamicdatalists.service.DDLRecordSetService getDDLRecordSetService() {
436                    return ddlRecordSetService;
437            }
438    
439            /**
440             * Sets the d d l record set remote service.
441             *
442             * @param ddlRecordSetService the d d l record set remote service
443             */
444            public void setDDLRecordSetService(
445                    com.liferay.portlet.dynamicdatalists.service.DDLRecordSetService ddlRecordSetService) {
446                    this.ddlRecordSetService = ddlRecordSetService;
447            }
448    
449            /**
450             * Returns the d d l record set persistence.
451             *
452             * @return the d d l record set persistence
453             */
454            public DDLRecordSetPersistence getDDLRecordSetPersistence() {
455                    return ddlRecordSetPersistence;
456            }
457    
458            /**
459             * Sets the d d l record set persistence.
460             *
461             * @param ddlRecordSetPersistence the d d l record set persistence
462             */
463            public void setDDLRecordSetPersistence(
464                    DDLRecordSetPersistence ddlRecordSetPersistence) {
465                    this.ddlRecordSetPersistence = ddlRecordSetPersistence;
466            }
467    
468            /**
469             * Returns the d d l record set finder.
470             *
471             * @return the d d l record set finder
472             */
473            public DDLRecordSetFinder getDDLRecordSetFinder() {
474                    return ddlRecordSetFinder;
475            }
476    
477            /**
478             * Sets the d d l record set finder.
479             *
480             * @param ddlRecordSetFinder the d d l record set finder
481             */
482            public void setDDLRecordSetFinder(DDLRecordSetFinder ddlRecordSetFinder) {
483                    this.ddlRecordSetFinder = ddlRecordSetFinder;
484            }
485    
486            /**
487             * Returns the counter local service.
488             *
489             * @return the counter local service
490             */
491            public com.liferay.counter.service.CounterLocalService getCounterLocalService() {
492                    return counterLocalService;
493            }
494    
495            /**
496             * Sets the counter local service.
497             *
498             * @param counterLocalService the counter local service
499             */
500            public void setCounterLocalService(
501                    com.liferay.counter.service.CounterLocalService counterLocalService) {
502                    this.counterLocalService = counterLocalService;
503            }
504    
505            /**
506             * Returns the class name local service.
507             *
508             * @return the class name local service
509             */
510            public com.liferay.portal.service.ClassNameLocalService getClassNameLocalService() {
511                    return classNameLocalService;
512            }
513    
514            /**
515             * Sets the class name local service.
516             *
517             * @param classNameLocalService the class name local service
518             */
519            public void setClassNameLocalService(
520                    com.liferay.portal.service.ClassNameLocalService classNameLocalService) {
521                    this.classNameLocalService = classNameLocalService;
522            }
523    
524            /**
525             * Returns the class name remote service.
526             *
527             * @return the class name remote service
528             */
529            public com.liferay.portal.service.ClassNameService getClassNameService() {
530                    return classNameService;
531            }
532    
533            /**
534             * Sets the class name remote service.
535             *
536             * @param classNameService the class name remote service
537             */
538            public void setClassNameService(
539                    com.liferay.portal.service.ClassNameService classNameService) {
540                    this.classNameService = classNameService;
541            }
542    
543            /**
544             * Returns the class name persistence.
545             *
546             * @return the class name persistence
547             */
548            public ClassNamePersistence getClassNamePersistence() {
549                    return classNamePersistence;
550            }
551    
552            /**
553             * Sets the class name persistence.
554             *
555             * @param classNamePersistence the class name persistence
556             */
557            public void setClassNamePersistence(
558                    ClassNamePersistence classNamePersistence) {
559                    this.classNamePersistence = classNamePersistence;
560            }
561    
562            /**
563             * Returns the resource local service.
564             *
565             * @return the resource local service
566             */
567            public com.liferay.portal.service.ResourceLocalService getResourceLocalService() {
568                    return resourceLocalService;
569            }
570    
571            /**
572             * Sets the resource local service.
573             *
574             * @param resourceLocalService the resource local service
575             */
576            public void setResourceLocalService(
577                    com.liferay.portal.service.ResourceLocalService resourceLocalService) {
578                    this.resourceLocalService = resourceLocalService;
579            }
580    
581            /**
582             * Returns the user local service.
583             *
584             * @return the user local service
585             */
586            public com.liferay.portal.service.UserLocalService getUserLocalService() {
587                    return userLocalService;
588            }
589    
590            /**
591             * Sets the user local service.
592             *
593             * @param userLocalService the user local service
594             */
595            public void setUserLocalService(
596                    com.liferay.portal.service.UserLocalService userLocalService) {
597                    this.userLocalService = userLocalService;
598            }
599    
600            /**
601             * Returns the user remote service.
602             *
603             * @return the user remote service
604             */
605            public com.liferay.portal.service.UserService getUserService() {
606                    return userService;
607            }
608    
609            /**
610             * Sets the user remote service.
611             *
612             * @param userService the user remote service
613             */
614            public void setUserService(
615                    com.liferay.portal.service.UserService userService) {
616                    this.userService = userService;
617            }
618    
619            /**
620             * Returns the user persistence.
621             *
622             * @return the user persistence
623             */
624            public UserPersistence getUserPersistence() {
625                    return userPersistence;
626            }
627    
628            /**
629             * Sets the user persistence.
630             *
631             * @param userPersistence the user persistence
632             */
633            public void setUserPersistence(UserPersistence userPersistence) {
634                    this.userPersistence = userPersistence;
635            }
636    
637            /**
638             * Returns the user finder.
639             *
640             * @return the user finder
641             */
642            public UserFinder getUserFinder() {
643                    return userFinder;
644            }
645    
646            /**
647             * Sets the user finder.
648             *
649             * @param userFinder the user finder
650             */
651            public void setUserFinder(UserFinder userFinder) {
652                    this.userFinder = userFinder;
653            }
654    
655            /**
656             * Returns the workflow definition link local service.
657             *
658             * @return the workflow definition link local service
659             */
660            public com.liferay.portal.service.WorkflowDefinitionLinkLocalService getWorkflowDefinitionLinkLocalService() {
661                    return workflowDefinitionLinkLocalService;
662            }
663    
664            /**
665             * Sets the workflow definition link local service.
666             *
667             * @param workflowDefinitionLinkLocalService the workflow definition link local service
668             */
669            public void setWorkflowDefinitionLinkLocalService(
670                    com.liferay.portal.service.WorkflowDefinitionLinkLocalService workflowDefinitionLinkLocalService) {
671                    this.workflowDefinitionLinkLocalService = workflowDefinitionLinkLocalService;
672            }
673    
674            /**
675             * Returns the workflow definition link persistence.
676             *
677             * @return the workflow definition link persistence
678             */
679            public WorkflowDefinitionLinkPersistence getWorkflowDefinitionLinkPersistence() {
680                    return workflowDefinitionLinkPersistence;
681            }
682    
683            /**
684             * Sets the workflow definition link persistence.
685             *
686             * @param workflowDefinitionLinkPersistence the workflow definition link persistence
687             */
688            public void setWorkflowDefinitionLinkPersistence(
689                    WorkflowDefinitionLinkPersistence workflowDefinitionLinkPersistence) {
690                    this.workflowDefinitionLinkPersistence = workflowDefinitionLinkPersistence;
691            }
692    
693            /**
694             * Returns the d d l record local service.
695             *
696             * @return the d d l record local service
697             */
698            public com.liferay.portlet.dynamicdatalists.service.DDLRecordLocalService getDDLRecordLocalService() {
699                    return ddlRecordLocalService;
700            }
701    
702            /**
703             * Sets the d d l record local service.
704             *
705             * @param ddlRecordLocalService the d d l record local service
706             */
707            public void setDDLRecordLocalService(
708                    com.liferay.portlet.dynamicdatalists.service.DDLRecordLocalService ddlRecordLocalService) {
709                    this.ddlRecordLocalService = ddlRecordLocalService;
710            }
711    
712            /**
713             * Returns the d d l record remote service.
714             *
715             * @return the d d l record remote service
716             */
717            public com.liferay.portlet.dynamicdatalists.service.DDLRecordService getDDLRecordService() {
718                    return ddlRecordService;
719            }
720    
721            /**
722             * Sets the d d l record remote service.
723             *
724             * @param ddlRecordService the d d l record remote service
725             */
726            public void setDDLRecordService(
727                    com.liferay.portlet.dynamicdatalists.service.DDLRecordService ddlRecordService) {
728                    this.ddlRecordService = ddlRecordService;
729            }
730    
731            /**
732             * Returns the d d l record persistence.
733             *
734             * @return the d d l record persistence
735             */
736            public DDLRecordPersistence getDDLRecordPersistence() {
737                    return ddlRecordPersistence;
738            }
739    
740            /**
741             * Sets the d d l record persistence.
742             *
743             * @param ddlRecordPersistence the d d l record persistence
744             */
745            public void setDDLRecordPersistence(
746                    DDLRecordPersistence ddlRecordPersistence) {
747                    this.ddlRecordPersistence = ddlRecordPersistence;
748            }
749    
750            /**
751             * Returns the d d l record finder.
752             *
753             * @return the d d l record finder
754             */
755            public DDLRecordFinder getDDLRecordFinder() {
756                    return ddlRecordFinder;
757            }
758    
759            /**
760             * Sets the d d l record finder.
761             *
762             * @param ddlRecordFinder the d d l record finder
763             */
764            public void setDDLRecordFinder(DDLRecordFinder ddlRecordFinder) {
765                    this.ddlRecordFinder = ddlRecordFinder;
766            }
767    
768            /**
769             * Returns the d d m structure local service.
770             *
771             * @return the d d m structure local service
772             */
773            public com.liferay.portlet.dynamicdatamapping.service.DDMStructureLocalService getDDMStructureLocalService() {
774                    return ddmStructureLocalService;
775            }
776    
777            /**
778             * Sets the d d m structure local service.
779             *
780             * @param ddmStructureLocalService the d d m structure local service
781             */
782            public void setDDMStructureLocalService(
783                    com.liferay.portlet.dynamicdatamapping.service.DDMStructureLocalService ddmStructureLocalService) {
784                    this.ddmStructureLocalService = ddmStructureLocalService;
785            }
786    
787            /**
788             * Returns the d d m structure remote service.
789             *
790             * @return the d d m structure remote service
791             */
792            public com.liferay.portlet.dynamicdatamapping.service.DDMStructureService getDDMStructureService() {
793                    return ddmStructureService;
794            }
795    
796            /**
797             * Sets the d d m structure remote service.
798             *
799             * @param ddmStructureService the d d m structure remote service
800             */
801            public void setDDMStructureService(
802                    com.liferay.portlet.dynamicdatamapping.service.DDMStructureService ddmStructureService) {
803                    this.ddmStructureService = ddmStructureService;
804            }
805    
806            /**
807             * Returns the d d m structure persistence.
808             *
809             * @return the d d m structure persistence
810             */
811            public DDMStructurePersistence getDDMStructurePersistence() {
812                    return ddmStructurePersistence;
813            }
814    
815            /**
816             * Sets the d d m structure persistence.
817             *
818             * @param ddmStructurePersistence the d d m structure persistence
819             */
820            public void setDDMStructurePersistence(
821                    DDMStructurePersistence ddmStructurePersistence) {
822                    this.ddmStructurePersistence = ddmStructurePersistence;
823            }
824    
825            /**
826             * Returns the d d m structure finder.
827             *
828             * @return the d d m structure finder
829             */
830            public DDMStructureFinder getDDMStructureFinder() {
831                    return ddmStructureFinder;
832            }
833    
834            /**
835             * Sets the d d m structure finder.
836             *
837             * @param ddmStructureFinder the d d m structure finder
838             */
839            public void setDDMStructureFinder(DDMStructureFinder ddmStructureFinder) {
840                    this.ddmStructureFinder = ddmStructureFinder;
841            }
842    
843            /**
844             * Returns the d d m structure link local service.
845             *
846             * @return the d d m structure link local service
847             */
848            public com.liferay.portlet.dynamicdatamapping.service.DDMStructureLinkLocalService getDDMStructureLinkLocalService() {
849                    return ddmStructureLinkLocalService;
850            }
851    
852            /**
853             * Sets the d d m structure link local service.
854             *
855             * @param ddmStructureLinkLocalService the d d m structure link local service
856             */
857            public void setDDMStructureLinkLocalService(
858                    com.liferay.portlet.dynamicdatamapping.service.DDMStructureLinkLocalService ddmStructureLinkLocalService) {
859                    this.ddmStructureLinkLocalService = ddmStructureLinkLocalService;
860            }
861    
862            /**
863             * Returns the d d m structure link persistence.
864             *
865             * @return the d d m structure link persistence
866             */
867            public DDMStructureLinkPersistence getDDMStructureLinkPersistence() {
868                    return ddmStructureLinkPersistence;
869            }
870    
871            /**
872             * Sets the d d m structure link persistence.
873             *
874             * @param ddmStructureLinkPersistence the d d m structure link persistence
875             */
876            public void setDDMStructureLinkPersistence(
877                    DDMStructureLinkPersistence ddmStructureLinkPersistence) {
878                    this.ddmStructureLinkPersistence = ddmStructureLinkPersistence;
879            }
880    
881            public void afterPropertiesSet() {
882                    persistedModelLocalServiceRegistry.register("com.liferay.portlet.dynamicdatalists.model.DDLRecordSet",
883                            ddlRecordSetLocalService);
884            }
885    
886            public void destroy() {
887                    persistedModelLocalServiceRegistry.unregister(
888                            "com.liferay.portlet.dynamicdatalists.model.DDLRecordSet");
889            }
890    
891            /**
892             * Returns the Spring bean ID for this bean.
893             *
894             * @return the Spring bean ID for this bean
895             */
896            @Override
897            public String getBeanIdentifier() {
898                    return _beanIdentifier;
899            }
900    
901            /**
902             * Sets the Spring bean ID for this bean.
903             *
904             * @param beanIdentifier the Spring bean ID for this bean
905             */
906            @Override
907            public void setBeanIdentifier(String beanIdentifier) {
908                    _beanIdentifier = beanIdentifier;
909            }
910    
911            protected Class<?> getModelClass() {
912                    return DDLRecordSet.class;
913            }
914    
915            protected String getModelClassName() {
916                    return DDLRecordSet.class.getName();
917            }
918    
919            /**
920             * Performs a SQL query.
921             *
922             * @param sql the sql query
923             */
924            protected void runSQL(String sql) {
925                    try {
926                            DataSource dataSource = ddlRecordSetPersistence.getDataSource();
927    
928                            DB db = DBFactoryUtil.getDB();
929    
930                            sql = db.buildSQL(sql);
931                            sql = PortalUtil.transformSQL(sql);
932    
933                            SqlUpdate sqlUpdate = SqlUpdateFactoryUtil.getSqlUpdate(dataSource,
934                                            sql, new int[0]);
935    
936                            sqlUpdate.update();
937                    }
938                    catch (Exception e) {
939                            throw new SystemException(e);
940                    }
941            }
942    
943            @BeanReference(type = com.liferay.portlet.dynamicdatalists.service.DDLRecordSetLocalService.class)
944            protected com.liferay.portlet.dynamicdatalists.service.DDLRecordSetLocalService ddlRecordSetLocalService;
945            @BeanReference(type = com.liferay.portlet.dynamicdatalists.service.DDLRecordSetService.class)
946            protected com.liferay.portlet.dynamicdatalists.service.DDLRecordSetService ddlRecordSetService;
947            @BeanReference(type = DDLRecordSetPersistence.class)
948            protected DDLRecordSetPersistence ddlRecordSetPersistence;
949            @BeanReference(type = DDLRecordSetFinder.class)
950            protected DDLRecordSetFinder ddlRecordSetFinder;
951            @BeanReference(type = com.liferay.counter.service.CounterLocalService.class)
952            protected com.liferay.counter.service.CounterLocalService counterLocalService;
953            @BeanReference(type = com.liferay.portal.service.ClassNameLocalService.class)
954            protected com.liferay.portal.service.ClassNameLocalService classNameLocalService;
955            @BeanReference(type = com.liferay.portal.service.ClassNameService.class)
956            protected com.liferay.portal.service.ClassNameService classNameService;
957            @BeanReference(type = ClassNamePersistence.class)
958            protected ClassNamePersistence classNamePersistence;
959            @BeanReference(type = com.liferay.portal.service.ResourceLocalService.class)
960            protected com.liferay.portal.service.ResourceLocalService resourceLocalService;
961            @BeanReference(type = com.liferay.portal.service.UserLocalService.class)
962            protected com.liferay.portal.service.UserLocalService userLocalService;
963            @BeanReference(type = com.liferay.portal.service.UserService.class)
964            protected com.liferay.portal.service.UserService userService;
965            @BeanReference(type = UserPersistence.class)
966            protected UserPersistence userPersistence;
967            @BeanReference(type = UserFinder.class)
968            protected UserFinder userFinder;
969            @BeanReference(type = com.liferay.portal.service.WorkflowDefinitionLinkLocalService.class)
970            protected com.liferay.portal.service.WorkflowDefinitionLinkLocalService workflowDefinitionLinkLocalService;
971            @BeanReference(type = WorkflowDefinitionLinkPersistence.class)
972            protected WorkflowDefinitionLinkPersistence workflowDefinitionLinkPersistence;
973            @BeanReference(type = com.liferay.portlet.dynamicdatalists.service.DDLRecordLocalService.class)
974            protected com.liferay.portlet.dynamicdatalists.service.DDLRecordLocalService ddlRecordLocalService;
975            @BeanReference(type = com.liferay.portlet.dynamicdatalists.service.DDLRecordService.class)
976            protected com.liferay.portlet.dynamicdatalists.service.DDLRecordService ddlRecordService;
977            @BeanReference(type = DDLRecordPersistence.class)
978            protected DDLRecordPersistence ddlRecordPersistence;
979            @BeanReference(type = DDLRecordFinder.class)
980            protected DDLRecordFinder ddlRecordFinder;
981            @BeanReference(type = com.liferay.portlet.dynamicdatamapping.service.DDMStructureLocalService.class)
982            protected com.liferay.portlet.dynamicdatamapping.service.DDMStructureLocalService ddmStructureLocalService;
983            @BeanReference(type = com.liferay.portlet.dynamicdatamapping.service.DDMStructureService.class)
984            protected com.liferay.portlet.dynamicdatamapping.service.DDMStructureService ddmStructureService;
985            @BeanReference(type = DDMStructurePersistence.class)
986            protected DDMStructurePersistence ddmStructurePersistence;
987            @BeanReference(type = DDMStructureFinder.class)
988            protected DDMStructureFinder ddmStructureFinder;
989            @BeanReference(type = com.liferay.portlet.dynamicdatamapping.service.DDMStructureLinkLocalService.class)
990            protected com.liferay.portlet.dynamicdatamapping.service.DDMStructureLinkLocalService ddmStructureLinkLocalService;
991            @BeanReference(type = DDMStructureLinkPersistence.class)
992            protected DDMStructureLinkPersistence ddmStructureLinkPersistence;
993            @BeanReference(type = PersistedModelLocalServiceRegistry.class)
994            protected PersistedModelLocalServiceRegistry persistedModelLocalServiceRegistry;
995            private String _beanIdentifier;
996    }