001    /**
002     * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
003     *
004     * This library is free software; you can redistribute it and/or modify it under
005     * the terms of the GNU Lesser General Public License as published by the Free
006     * Software Foundation; either version 2.1 of the License, or (at your option)
007     * any later version.
008     *
009     * This library is distributed in the hope that it will be useful, but WITHOUT
010     * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
011     * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
012     * details.
013     */
014    
015    package com.liferay.portlet.dynamicdatalists.service.base;
016    
017    import com.liferay.counter.service.CounterLocalService;
018    
019    import com.liferay.portal.kernel.bean.BeanReference;
020    import com.liferay.portal.kernel.bean.IdentifiableBean;
021    import com.liferay.portal.kernel.dao.jdbc.SqlUpdate;
022    import com.liferay.portal.kernel.dao.jdbc.SqlUpdateFactoryUtil;
023    import com.liferay.portal.kernel.dao.orm.DynamicQuery;
024    import com.liferay.portal.kernel.dao.orm.DynamicQueryFactoryUtil;
025    import com.liferay.portal.kernel.exception.PortalException;
026    import com.liferay.portal.kernel.exception.SystemException;
027    import com.liferay.portal.kernel.search.Indexable;
028    import com.liferay.portal.kernel.search.IndexableType;
029    import com.liferay.portal.kernel.util.OrderByComparator;
030    import com.liferay.portal.model.PersistedModel;
031    import com.liferay.portal.service.BaseLocalServiceImpl;
032    import com.liferay.portal.service.PersistedModelLocalServiceRegistry;
033    import com.liferay.portal.service.ResourceLocalService;
034    import com.liferay.portal.service.ResourceService;
035    import com.liferay.portal.service.UserLocalService;
036    import com.liferay.portal.service.UserService;
037    import com.liferay.portal.service.WorkflowDefinitionLinkLocalService;
038    import com.liferay.portal.service.persistence.ResourceFinder;
039    import com.liferay.portal.service.persistence.ResourcePersistence;
040    import com.liferay.portal.service.persistence.UserFinder;
041    import com.liferay.portal.service.persistence.UserPersistence;
042    import com.liferay.portal.service.persistence.WorkflowDefinitionLinkPersistence;
043    
044    import com.liferay.portlet.dynamicdatalists.model.DDLRecordSet;
045    import com.liferay.portlet.dynamicdatalists.service.DDLRecordLocalService;
046    import com.liferay.portlet.dynamicdatalists.service.DDLRecordService;
047    import com.liferay.portlet.dynamicdatalists.service.DDLRecordSetLocalService;
048    import com.liferay.portlet.dynamicdatalists.service.DDLRecordSetService;
049    import com.liferay.portlet.dynamicdatalists.service.persistence.DDLRecordFinder;
050    import com.liferay.portlet.dynamicdatalists.service.persistence.DDLRecordPersistence;
051    import com.liferay.portlet.dynamicdatalists.service.persistence.DDLRecordSetFinder;
052    import com.liferay.portlet.dynamicdatalists.service.persistence.DDLRecordSetPersistence;
053    import com.liferay.portlet.dynamicdatalists.service.persistence.DDLRecordVersionPersistence;
054    import com.liferay.portlet.dynamicdatamapping.service.DDMStructureLinkLocalService;
055    import com.liferay.portlet.dynamicdatamapping.service.DDMStructureLocalService;
056    import com.liferay.portlet.dynamicdatamapping.service.DDMStructureService;
057    import com.liferay.portlet.dynamicdatamapping.service.persistence.DDMStructureFinder;
058    import com.liferay.portlet.dynamicdatamapping.service.persistence.DDMStructureLinkPersistence;
059    import com.liferay.portlet.dynamicdatamapping.service.persistence.DDMStructurePersistence;
060    
061    import java.io.Serializable;
062    
063    import java.util.List;
064    
065    import javax.sql.DataSource;
066    
067    /**
068     * The base implementation of the d d l record set local service.
069     *
070     * <p>
071     * 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}.
072     * </p>
073     *
074     * @author Brian Wing Shun Chan
075     * @see com.liferay.portlet.dynamicdatalists.service.impl.DDLRecordSetLocalServiceImpl
076     * @see com.liferay.portlet.dynamicdatalists.service.DDLRecordSetLocalServiceUtil
077     * @generated
078     */
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             * @throws SystemException if a system exception occurred
094             */
095            @Indexable(type = IndexableType.REINDEX)
096            public DDLRecordSet addDDLRecordSet(DDLRecordSet ddlRecordSet)
097                    throws SystemException {
098                    ddlRecordSet.setNew(true);
099    
100                    return ddlRecordSetPersistence.update(ddlRecordSet, false);
101            }
102    
103            /**
104             * Creates a new d d l record set with the primary key. Does not add the d d l record set to the database.
105             *
106             * @param recordSetId the primary key for the new d d l record set
107             * @return the new d d l record set
108             */
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             * @throws SystemException if a system exception occurred
120             */
121            @Indexable(type = IndexableType.DELETE)
122            public DDLRecordSet deleteDDLRecordSet(long recordSetId)
123                    throws PortalException, SystemException {
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             * @throws SystemException if a system exception occurred
133             */
134            @Indexable(type = IndexableType.DELETE)
135            public DDLRecordSet deleteDDLRecordSet(DDLRecordSet ddlRecordSet)
136                    throws SystemException {
137                    return ddlRecordSetPersistence.remove(ddlRecordSet);
138            }
139    
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             * @throws SystemException if a system exception occurred
153             */
154            @SuppressWarnings("rawtypes")
155            public List dynamicQuery(DynamicQuery dynamicQuery)
156                    throws SystemException {
157                    return ddlRecordSetPersistence.findWithDynamicQuery(dynamicQuery);
158            }
159    
160            /**
161             * Performs a dynamic query on the database and returns a range of the matching rows.
162             *
163             * <p>
164             * 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.
165             * </p>
166             *
167             * @param dynamicQuery the dynamic query
168             * @param start the lower bound of the range of model instances
169             * @param end the upper bound of the range of model instances (not inclusive)
170             * @return the range of matching rows
171             * @throws SystemException if a system exception occurred
172             */
173            @SuppressWarnings("rawtypes")
174            public List dynamicQuery(DynamicQuery dynamicQuery, int start, int end)
175                    throws SystemException {
176                    return ddlRecordSetPersistence.findWithDynamicQuery(dynamicQuery,
177                            start, end);
178            }
179    
180            /**
181             * Performs a dynamic query on the database and returns an ordered range of the matching rows.
182             *
183             * <p>
184             * 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.
185             * </p>
186             *
187             * @param dynamicQuery the dynamic query
188             * @param start the lower bound of the range of model instances
189             * @param end the upper bound of the range of model instances (not inclusive)
190             * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
191             * @return the ordered range of matching rows
192             * @throws SystemException if a system exception occurred
193             */
194            @SuppressWarnings("rawtypes")
195            public List dynamicQuery(DynamicQuery dynamicQuery, int start, int end,
196                    OrderByComparator orderByComparator) throws SystemException {
197                    return ddlRecordSetPersistence.findWithDynamicQuery(dynamicQuery,
198                            start, end, orderByComparator);
199            }
200    
201            /**
202             * Returns the number of rows that match the dynamic query.
203             *
204             * @param dynamicQuery the dynamic query
205             * @return the number of rows that match the dynamic query
206             * @throws SystemException if a system exception occurred
207             */
208            public long dynamicQueryCount(DynamicQuery dynamicQuery)
209                    throws SystemException {
210                    return ddlRecordSetPersistence.countWithDynamicQuery(dynamicQuery);
211            }
212    
213            public DDLRecordSet fetchDDLRecordSet(long recordSetId)
214                    throws SystemException {
215                    return ddlRecordSetPersistence.fetchByPrimaryKey(recordSetId);
216            }
217    
218            /**
219             * Returns the d d l record set with the primary key.
220             *
221             * @param recordSetId the primary key of the d d l record set
222             * @return the d d l record set
223             * @throws PortalException if a d d l record set with the primary key could not be found
224             * @throws SystemException if a system exception occurred
225             */
226            public DDLRecordSet getDDLRecordSet(long recordSetId)
227                    throws PortalException, SystemException {
228                    return ddlRecordSetPersistence.findByPrimaryKey(recordSetId);
229            }
230    
231            public PersistedModel getPersistedModel(Serializable primaryKeyObj)
232                    throws PortalException, SystemException {
233                    return ddlRecordSetPersistence.findByPrimaryKey(primaryKeyObj);
234            }
235    
236            /**
237             * Returns the d d l record set with the UUID in the group.
238             *
239             * @param uuid the UUID of d d l record set
240             * @param groupId the group id of the d d l record set
241             * @return the d d l record set
242             * @throws PortalException if a d d l record set with the UUID in the group could not be found
243             * @throws SystemException if a system exception occurred
244             */
245            public DDLRecordSet getDDLRecordSetByUuidAndGroupId(String uuid,
246                    long groupId) throws PortalException, SystemException {
247                    return ddlRecordSetPersistence.findByUUID_G(uuid, groupId);
248            }
249    
250            /**
251             * Returns a range of all the d d l record sets.
252             *
253             * <p>
254             * 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.
255             * </p>
256             *
257             * @param start the lower bound of the range of d d l record sets
258             * @param end the upper bound of the range of d d l record sets (not inclusive)
259             * @return the range of d d l record sets
260             * @throws SystemException if a system exception occurred
261             */
262            public List<DDLRecordSet> getDDLRecordSets(int start, int end)
263                    throws SystemException {
264                    return ddlRecordSetPersistence.findAll(start, end);
265            }
266    
267            /**
268             * Returns the number of d d l record sets.
269             *
270             * @return the number of d d l record sets
271             * @throws SystemException if a system exception occurred
272             */
273            public int getDDLRecordSetsCount() throws SystemException {
274                    return ddlRecordSetPersistence.countAll();
275            }
276    
277            /**
278             * 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.
279             *
280             * @param ddlRecordSet the d d l record set
281             * @return the d d l record set that was updated
282             * @throws SystemException if a system exception occurred
283             */
284            @Indexable(type = IndexableType.REINDEX)
285            public DDLRecordSet updateDDLRecordSet(DDLRecordSet ddlRecordSet)
286                    throws SystemException {
287                    return updateDDLRecordSet(ddlRecordSet, true);
288            }
289    
290            /**
291             * 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.
292             *
293             * @param ddlRecordSet the d d l record set
294             * @param merge whether to merge the d d l record set with the current session. See {@link com.liferay.portal.service.persistence.BatchSession#update(com.liferay.portal.kernel.dao.orm.Session, com.liferay.portal.model.BaseModel, boolean)} for an explanation.
295             * @return the d d l record set that was updated
296             * @throws SystemException if a system exception occurred
297             */
298            @Indexable(type = IndexableType.REINDEX)
299            public DDLRecordSet updateDDLRecordSet(DDLRecordSet ddlRecordSet,
300                    boolean merge) throws SystemException {
301                    ddlRecordSet.setNew(false);
302    
303                    return ddlRecordSetPersistence.update(ddlRecordSet, merge);
304            }
305    
306            /**
307             * Returns the d d l record local service.
308             *
309             * @return the d d l record local service
310             */
311            public DDLRecordLocalService getDDLRecordLocalService() {
312                    return ddlRecordLocalService;
313            }
314    
315            /**
316             * Sets the d d l record local service.
317             *
318             * @param ddlRecordLocalService the d d l record local service
319             */
320            public void setDDLRecordLocalService(
321                    DDLRecordLocalService ddlRecordLocalService) {
322                    this.ddlRecordLocalService = ddlRecordLocalService;
323            }
324    
325            /**
326             * Returns the d d l record remote service.
327             *
328             * @return the d d l record remote service
329             */
330            public DDLRecordService getDDLRecordService() {
331                    return ddlRecordService;
332            }
333    
334            /**
335             * Sets the d d l record remote service.
336             *
337             * @param ddlRecordService the d d l record remote service
338             */
339            public void setDDLRecordService(DDLRecordService ddlRecordService) {
340                    this.ddlRecordService = ddlRecordService;
341            }
342    
343            /**
344             * Returns the d d l record persistence.
345             *
346             * @return the d d l record persistence
347             */
348            public DDLRecordPersistence getDDLRecordPersistence() {
349                    return ddlRecordPersistence;
350            }
351    
352            /**
353             * Sets the d d l record persistence.
354             *
355             * @param ddlRecordPersistence the d d l record persistence
356             */
357            public void setDDLRecordPersistence(
358                    DDLRecordPersistence ddlRecordPersistence) {
359                    this.ddlRecordPersistence = ddlRecordPersistence;
360            }
361    
362            /**
363             * Returns the d d l record finder.
364             *
365             * @return the d d l record finder
366             */
367            public DDLRecordFinder getDDLRecordFinder() {
368                    return ddlRecordFinder;
369            }
370    
371            /**
372             * Sets the d d l record finder.
373             *
374             * @param ddlRecordFinder the d d l record finder
375             */
376            public void setDDLRecordFinder(DDLRecordFinder ddlRecordFinder) {
377                    this.ddlRecordFinder = ddlRecordFinder;
378            }
379    
380            /**
381             * Returns the d d l record set local service.
382             *
383             * @return the d d l record set local service
384             */
385            public DDLRecordSetLocalService getDDLRecordSetLocalService() {
386                    return ddlRecordSetLocalService;
387            }
388    
389            /**
390             * Sets the d d l record set local service.
391             *
392             * @param ddlRecordSetLocalService the d d l record set local service
393             */
394            public void setDDLRecordSetLocalService(
395                    DDLRecordSetLocalService ddlRecordSetLocalService) {
396                    this.ddlRecordSetLocalService = ddlRecordSetLocalService;
397            }
398    
399            /**
400             * Returns the d d l record set remote service.
401             *
402             * @return the d d l record set remote service
403             */
404            public DDLRecordSetService getDDLRecordSetService() {
405                    return ddlRecordSetService;
406            }
407    
408            /**
409             * Sets the d d l record set remote service.
410             *
411             * @param ddlRecordSetService the d d l record set remote service
412             */
413            public void setDDLRecordSetService(DDLRecordSetService ddlRecordSetService) {
414                    this.ddlRecordSetService = ddlRecordSetService;
415            }
416    
417            /**
418             * Returns the d d l record set persistence.
419             *
420             * @return the d d l record set persistence
421             */
422            public DDLRecordSetPersistence getDDLRecordSetPersistence() {
423                    return ddlRecordSetPersistence;
424            }
425    
426            /**
427             * Sets the d d l record set persistence.
428             *
429             * @param ddlRecordSetPersistence the d d l record set persistence
430             */
431            public void setDDLRecordSetPersistence(
432                    DDLRecordSetPersistence ddlRecordSetPersistence) {
433                    this.ddlRecordSetPersistence = ddlRecordSetPersistence;
434            }
435    
436            /**
437             * Returns the d d l record set finder.
438             *
439             * @return the d d l record set finder
440             */
441            public DDLRecordSetFinder getDDLRecordSetFinder() {
442                    return ddlRecordSetFinder;
443            }
444    
445            /**
446             * Sets the d d l record set finder.
447             *
448             * @param ddlRecordSetFinder the d d l record set finder
449             */
450            public void setDDLRecordSetFinder(DDLRecordSetFinder ddlRecordSetFinder) {
451                    this.ddlRecordSetFinder = ddlRecordSetFinder;
452            }
453    
454            /**
455             * Returns the d d l record version persistence.
456             *
457             * @return the d d l record version persistence
458             */
459            public DDLRecordVersionPersistence getDDLRecordVersionPersistence() {
460                    return ddlRecordVersionPersistence;
461            }
462    
463            /**
464             * Sets the d d l record version persistence.
465             *
466             * @param ddlRecordVersionPersistence the d d l record version persistence
467             */
468            public void setDDLRecordVersionPersistence(
469                    DDLRecordVersionPersistence ddlRecordVersionPersistence) {
470                    this.ddlRecordVersionPersistence = ddlRecordVersionPersistence;
471            }
472    
473            /**
474             * Returns the counter local service.
475             *
476             * @return the counter local service
477             */
478            public CounterLocalService getCounterLocalService() {
479                    return counterLocalService;
480            }
481    
482            /**
483             * Sets the counter local service.
484             *
485             * @param counterLocalService the counter local service
486             */
487            public void setCounterLocalService(CounterLocalService counterLocalService) {
488                    this.counterLocalService = counterLocalService;
489            }
490    
491            /**
492             * Returns the resource local service.
493             *
494             * @return the resource local service
495             */
496            public ResourceLocalService getResourceLocalService() {
497                    return resourceLocalService;
498            }
499    
500            /**
501             * Sets the resource local service.
502             *
503             * @param resourceLocalService the resource local service
504             */
505            public void setResourceLocalService(
506                    ResourceLocalService resourceLocalService) {
507                    this.resourceLocalService = resourceLocalService;
508            }
509    
510            /**
511             * Returns the resource remote service.
512             *
513             * @return the resource remote service
514             */
515            public ResourceService getResourceService() {
516                    return resourceService;
517            }
518    
519            /**
520             * Sets the resource remote service.
521             *
522             * @param resourceService the resource remote service
523             */
524            public void setResourceService(ResourceService resourceService) {
525                    this.resourceService = resourceService;
526            }
527    
528            /**
529             * Returns the resource persistence.
530             *
531             * @return the resource persistence
532             */
533            public ResourcePersistence getResourcePersistence() {
534                    return resourcePersistence;
535            }
536    
537            /**
538             * Sets the resource persistence.
539             *
540             * @param resourcePersistence the resource persistence
541             */
542            public void setResourcePersistence(ResourcePersistence resourcePersistence) {
543                    this.resourcePersistence = resourcePersistence;
544            }
545    
546            /**
547             * Returns the resource finder.
548             *
549             * @return the resource finder
550             */
551            public ResourceFinder getResourceFinder() {
552                    return resourceFinder;
553            }
554    
555            /**
556             * Sets the resource finder.
557             *
558             * @param resourceFinder the resource finder
559             */
560            public void setResourceFinder(ResourceFinder resourceFinder) {
561                    this.resourceFinder = resourceFinder;
562            }
563    
564            /**
565             * Returns the user local service.
566             *
567             * @return the user local service
568             */
569            public UserLocalService getUserLocalService() {
570                    return userLocalService;
571            }
572    
573            /**
574             * Sets the user local service.
575             *
576             * @param userLocalService the user local service
577             */
578            public void setUserLocalService(UserLocalService userLocalService) {
579                    this.userLocalService = userLocalService;
580            }
581    
582            /**
583             * Returns the user remote service.
584             *
585             * @return the user remote service
586             */
587            public UserService getUserService() {
588                    return userService;
589            }
590    
591            /**
592             * Sets the user remote service.
593             *
594             * @param userService the user remote service
595             */
596            public void setUserService(UserService userService) {
597                    this.userService = userService;
598            }
599    
600            /**
601             * Returns the user persistence.
602             *
603             * @return the user persistence
604             */
605            public UserPersistence getUserPersistence() {
606                    return userPersistence;
607            }
608    
609            /**
610             * Sets the user persistence.
611             *
612             * @param userPersistence the user persistence
613             */
614            public void setUserPersistence(UserPersistence userPersistence) {
615                    this.userPersistence = userPersistence;
616            }
617    
618            /**
619             * Returns the user finder.
620             *
621             * @return the user finder
622             */
623            public UserFinder getUserFinder() {
624                    return userFinder;
625            }
626    
627            /**
628             * Sets the user finder.
629             *
630             * @param userFinder the user finder
631             */
632            public void setUserFinder(UserFinder userFinder) {
633                    this.userFinder = userFinder;
634            }
635    
636            /**
637             * Returns the workflow definition link local service.
638             *
639             * @return the workflow definition link local service
640             */
641            public WorkflowDefinitionLinkLocalService getWorkflowDefinitionLinkLocalService() {
642                    return workflowDefinitionLinkLocalService;
643            }
644    
645            /**
646             * Sets the workflow definition link local service.
647             *
648             * @param workflowDefinitionLinkLocalService the workflow definition link local service
649             */
650            public void setWorkflowDefinitionLinkLocalService(
651                    WorkflowDefinitionLinkLocalService workflowDefinitionLinkLocalService) {
652                    this.workflowDefinitionLinkLocalService = workflowDefinitionLinkLocalService;
653            }
654    
655            /**
656             * Returns the workflow definition link persistence.
657             *
658             * @return the workflow definition link persistence
659             */
660            public WorkflowDefinitionLinkPersistence getWorkflowDefinitionLinkPersistence() {
661                    return workflowDefinitionLinkPersistence;
662            }
663    
664            /**
665             * Sets the workflow definition link persistence.
666             *
667             * @param workflowDefinitionLinkPersistence the workflow definition link persistence
668             */
669            public void setWorkflowDefinitionLinkPersistence(
670                    WorkflowDefinitionLinkPersistence workflowDefinitionLinkPersistence) {
671                    this.workflowDefinitionLinkPersistence = workflowDefinitionLinkPersistence;
672            }
673    
674            /**
675             * Returns the d d m structure local service.
676             *
677             * @return the d d m structure local service
678             */
679            public DDMStructureLocalService getDDMStructureLocalService() {
680                    return ddmStructureLocalService;
681            }
682    
683            /**
684             * Sets the d d m structure local service.
685             *
686             * @param ddmStructureLocalService the d d m structure local service
687             */
688            public void setDDMStructureLocalService(
689                    DDMStructureLocalService ddmStructureLocalService) {
690                    this.ddmStructureLocalService = ddmStructureLocalService;
691            }
692    
693            /**
694             * Returns the d d m structure remote service.
695             *
696             * @return the d d m structure remote service
697             */
698            public DDMStructureService getDDMStructureService() {
699                    return ddmStructureService;
700            }
701    
702            /**
703             * Sets the d d m structure remote service.
704             *
705             * @param ddmStructureService the d d m structure remote service
706             */
707            public void setDDMStructureService(DDMStructureService ddmStructureService) {
708                    this.ddmStructureService = ddmStructureService;
709            }
710    
711            /**
712             * Returns the d d m structure persistence.
713             *
714             * @return the d d m structure persistence
715             */
716            public DDMStructurePersistence getDDMStructurePersistence() {
717                    return ddmStructurePersistence;
718            }
719    
720            /**
721             * Sets the d d m structure persistence.
722             *
723             * @param ddmStructurePersistence the d d m structure persistence
724             */
725            public void setDDMStructurePersistence(
726                    DDMStructurePersistence ddmStructurePersistence) {
727                    this.ddmStructurePersistence = ddmStructurePersistence;
728            }
729    
730            /**
731             * Returns the d d m structure finder.
732             *
733             * @return the d d m structure finder
734             */
735            public DDMStructureFinder getDDMStructureFinder() {
736                    return ddmStructureFinder;
737            }
738    
739            /**
740             * Sets the d d m structure finder.
741             *
742             * @param ddmStructureFinder the d d m structure finder
743             */
744            public void setDDMStructureFinder(DDMStructureFinder ddmStructureFinder) {
745                    this.ddmStructureFinder = ddmStructureFinder;
746            }
747    
748            /**
749             * Returns the d d m structure link local service.
750             *
751             * @return the d d m structure link local service
752             */
753            public DDMStructureLinkLocalService getDDMStructureLinkLocalService() {
754                    return ddmStructureLinkLocalService;
755            }
756    
757            /**
758             * Sets the d d m structure link local service.
759             *
760             * @param ddmStructureLinkLocalService the d d m structure link local service
761             */
762            public void setDDMStructureLinkLocalService(
763                    DDMStructureLinkLocalService ddmStructureLinkLocalService) {
764                    this.ddmStructureLinkLocalService = ddmStructureLinkLocalService;
765            }
766    
767            /**
768             * Returns the d d m structure link persistence.
769             *
770             * @return the d d m structure link persistence
771             */
772            public DDMStructureLinkPersistence getDDMStructureLinkPersistence() {
773                    return ddmStructureLinkPersistence;
774            }
775    
776            /**
777             * Sets the d d m structure link persistence.
778             *
779             * @param ddmStructureLinkPersistence the d d m structure link persistence
780             */
781            public void setDDMStructureLinkPersistence(
782                    DDMStructureLinkPersistence ddmStructureLinkPersistence) {
783                    this.ddmStructureLinkPersistence = ddmStructureLinkPersistence;
784            }
785    
786            public void afterPropertiesSet() {
787                    persistedModelLocalServiceRegistry.register("com.liferay.portlet.dynamicdatalists.model.DDLRecordSet",
788                            ddlRecordSetLocalService);
789            }
790    
791            public void destroy() {
792                    persistedModelLocalServiceRegistry.unregister(
793                            "com.liferay.portlet.dynamicdatalists.model.DDLRecordSet");
794            }
795    
796            /**
797             * Returns the Spring bean ID for this bean.
798             *
799             * @return the Spring bean ID for this bean
800             */
801            public String getBeanIdentifier() {
802                    return _beanIdentifier;
803            }
804    
805            /**
806             * Sets the Spring bean ID for this bean.
807             *
808             * @param beanIdentifier the Spring bean ID for this bean
809             */
810            public void setBeanIdentifier(String beanIdentifier) {
811                    _beanIdentifier = beanIdentifier;
812            }
813    
814            protected Class<?> getModelClass() {
815                    return DDLRecordSet.class;
816            }
817    
818            protected String getModelClassName() {
819                    return DDLRecordSet.class.getName();
820            }
821    
822            /**
823             * Performs an SQL query.
824             *
825             * @param sql the sql query
826             */
827            protected void runSQL(String sql) throws SystemException {
828                    try {
829                            DataSource dataSource = ddlRecordSetPersistence.getDataSource();
830    
831                            SqlUpdate sqlUpdate = SqlUpdateFactoryUtil.getSqlUpdate(dataSource,
832                                            sql, new int[0]);
833    
834                            sqlUpdate.update();
835                    }
836                    catch (Exception e) {
837                            throw new SystemException(e);
838                    }
839            }
840    
841            @BeanReference(type = DDLRecordLocalService.class)
842            protected DDLRecordLocalService ddlRecordLocalService;
843            @BeanReference(type = DDLRecordService.class)
844            protected DDLRecordService ddlRecordService;
845            @BeanReference(type = DDLRecordPersistence.class)
846            protected DDLRecordPersistence ddlRecordPersistence;
847            @BeanReference(type = DDLRecordFinder.class)
848            protected DDLRecordFinder ddlRecordFinder;
849            @BeanReference(type = DDLRecordSetLocalService.class)
850            protected DDLRecordSetLocalService ddlRecordSetLocalService;
851            @BeanReference(type = DDLRecordSetService.class)
852            protected DDLRecordSetService ddlRecordSetService;
853            @BeanReference(type = DDLRecordSetPersistence.class)
854            protected DDLRecordSetPersistence ddlRecordSetPersistence;
855            @BeanReference(type = DDLRecordSetFinder.class)
856            protected DDLRecordSetFinder ddlRecordSetFinder;
857            @BeanReference(type = DDLRecordVersionPersistence.class)
858            protected DDLRecordVersionPersistence ddlRecordVersionPersistence;
859            @BeanReference(type = CounterLocalService.class)
860            protected CounterLocalService counterLocalService;
861            @BeanReference(type = ResourceLocalService.class)
862            protected ResourceLocalService resourceLocalService;
863            @BeanReference(type = ResourceService.class)
864            protected ResourceService resourceService;
865            @BeanReference(type = ResourcePersistence.class)
866            protected ResourcePersistence resourcePersistence;
867            @BeanReference(type = ResourceFinder.class)
868            protected ResourceFinder resourceFinder;
869            @BeanReference(type = UserLocalService.class)
870            protected UserLocalService userLocalService;
871            @BeanReference(type = UserService.class)
872            protected UserService userService;
873            @BeanReference(type = UserPersistence.class)
874            protected UserPersistence userPersistence;
875            @BeanReference(type = UserFinder.class)
876            protected UserFinder userFinder;
877            @BeanReference(type = WorkflowDefinitionLinkLocalService.class)
878            protected WorkflowDefinitionLinkLocalService workflowDefinitionLinkLocalService;
879            @BeanReference(type = WorkflowDefinitionLinkPersistence.class)
880            protected WorkflowDefinitionLinkPersistence workflowDefinitionLinkPersistence;
881            @BeanReference(type = DDMStructureLocalService.class)
882            protected DDMStructureLocalService ddmStructureLocalService;
883            @BeanReference(type = DDMStructureService.class)
884            protected DDMStructureService ddmStructureService;
885            @BeanReference(type = DDMStructurePersistence.class)
886            protected DDMStructurePersistence ddmStructurePersistence;
887            @BeanReference(type = DDMStructureFinder.class)
888            protected DDMStructureFinder ddmStructureFinder;
889            @BeanReference(type = DDMStructureLinkLocalService.class)
890            protected DDMStructureLinkLocalService ddmStructureLinkLocalService;
891            @BeanReference(type = DDMStructureLinkPersistence.class)
892            protected DDMStructureLinkPersistence ddmStructureLinkPersistence;
893            @BeanReference(type = PersistedModelLocalServiceRegistry.class)
894            protected PersistedModelLocalServiceRegistry persistedModelLocalServiceRegistry;
895            private String _beanIdentifier;
896    }