001    /**
002     * Copyright (c) 2000-2012 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.UserLocalService;
035    import com.liferay.portal.service.UserService;
036    import com.liferay.portal.service.WorkflowInstanceLinkLocalService;
037    import com.liferay.portal.service.persistence.UserFinder;
038    import com.liferay.portal.service.persistence.UserPersistence;
039    import com.liferay.portal.service.persistence.WorkflowInstanceLinkPersistence;
040    
041    import com.liferay.portlet.asset.service.AssetEntryLocalService;
042    import com.liferay.portlet.asset.service.AssetEntryService;
043    import com.liferay.portlet.asset.service.persistence.AssetEntryFinder;
044    import com.liferay.portlet.asset.service.persistence.AssetEntryPersistence;
045    import com.liferay.portlet.dynamicdatalists.model.DDLRecord;
046    import com.liferay.portlet.dynamicdatalists.service.DDLRecordLocalService;
047    import com.liferay.portlet.dynamicdatalists.service.DDLRecordService;
048    import com.liferay.portlet.dynamicdatalists.service.DDLRecordSetLocalService;
049    import com.liferay.portlet.dynamicdatalists.service.DDLRecordSetService;
050    import com.liferay.portlet.dynamicdatalists.service.persistence.DDLRecordFinder;
051    import com.liferay.portlet.dynamicdatalists.service.persistence.DDLRecordPersistence;
052    import com.liferay.portlet.dynamicdatalists.service.persistence.DDLRecordSetFinder;
053    import com.liferay.portlet.dynamicdatalists.service.persistence.DDLRecordSetPersistence;
054    import com.liferay.portlet.dynamicdatalists.service.persistence.DDLRecordVersionPersistence;
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.DDMStructurePersistence;
059    
060    import java.io.Serializable;
061    
062    import java.util.List;
063    
064    import javax.sql.DataSource;
065    
066    /**
067     * The base implementation of the d d l record 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.DDLRecordLocalServiceImpl}.
071     * </p>
072     *
073     * @author Brian Wing Shun Chan
074     * @see com.liferay.portlet.dynamicdatalists.service.impl.DDLRecordLocalServiceImpl
075     * @see com.liferay.portlet.dynamicdatalists.service.DDLRecordLocalServiceUtil
076     * @generated
077     */
078    public abstract class DDLRecordLocalServiceBaseImpl extends BaseLocalServiceImpl
079            implements DDLRecordLocalService, IdentifiableBean {
080            /*
081             * NOTE FOR DEVELOPERS:
082             *
083             * Never modify or reference this class directly. Always use {@link com.liferay.portlet.dynamicdatalists.service.DDLRecordLocalServiceUtil} to access the d d l record local service.
084             */
085    
086            /**
087             * Adds the d d l record to the database. Also notifies the appropriate model listeners.
088             *
089             * @param ddlRecord the d d l record
090             * @return the d d l record that was added
091             * @throws SystemException if a system exception occurred
092             */
093            @Indexable(type = IndexableType.REINDEX)
094            public DDLRecord addDDLRecord(DDLRecord ddlRecord)
095                    throws SystemException {
096                    ddlRecord.setNew(true);
097    
098                    return ddlRecordPersistence.update(ddlRecord);
099            }
100    
101            /**
102             * Creates a new d d l record with the primary key. Does not add the d d l record to the database.
103             *
104             * @param recordId the primary key for the new d d l record
105             * @return the new d d l record
106             */
107            public DDLRecord createDDLRecord(long recordId) {
108                    return ddlRecordPersistence.create(recordId);
109            }
110    
111            /**
112             * Deletes the d d l record with the primary key from the database. Also notifies the appropriate model listeners.
113             *
114             * @param recordId the primary key of the d d l record
115             * @return the d d l record that was removed
116             * @throws PortalException if a d d l record with the primary key could not be found
117             * @throws SystemException if a system exception occurred
118             */
119            @Indexable(type = IndexableType.DELETE)
120            public DDLRecord deleteDDLRecord(long recordId)
121                    throws PortalException, SystemException {
122                    return ddlRecordPersistence.remove(recordId);
123            }
124    
125            /**
126             * Deletes the d d l record from the database. Also notifies the appropriate model listeners.
127             *
128             * @param ddlRecord the d d l record
129             * @return the d d l record that was removed
130             * @throws SystemException if a system exception occurred
131             */
132            @Indexable(type = IndexableType.DELETE)
133            public DDLRecord deleteDDLRecord(DDLRecord ddlRecord)
134                    throws SystemException {
135                    return ddlRecordPersistence.remove(ddlRecord);
136            }
137    
138            public DynamicQuery dynamicQuery() {
139                    Class<?> clazz = getClass();
140    
141                    return DynamicQueryFactoryUtil.forClass(DDLRecord.class,
142                            clazz.getClassLoader());
143            }
144    
145            /**
146             * Performs a dynamic query on the database and returns the matching rows.
147             *
148             * @param dynamicQuery the dynamic query
149             * @return the matching rows
150             * @throws SystemException if a system exception occurred
151             */
152            @SuppressWarnings("rawtypes")
153            public List dynamicQuery(DynamicQuery dynamicQuery)
154                    throws SystemException {
155                    return ddlRecordPersistence.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.
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             * @throws SystemException if a system exception occurred
170             */
171            @SuppressWarnings("rawtypes")
172            public List dynamicQuery(DynamicQuery dynamicQuery, int start, int end)
173                    throws SystemException {
174                    return ddlRecordPersistence.findWithDynamicQuery(dynamicQuery, start,
175                            end);
176            }
177    
178            /**
179             * Performs a dynamic query on the database and returns an ordered range of the matching rows.
180             *
181             * <p>
182             * 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.
183             * </p>
184             *
185             * @param dynamicQuery the dynamic query
186             * @param start the lower bound of the range of model instances
187             * @param end the upper bound of the range of model instances (not inclusive)
188             * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
189             * @return the ordered range of matching rows
190             * @throws SystemException if a system exception occurred
191             */
192            @SuppressWarnings("rawtypes")
193            public List dynamicQuery(DynamicQuery dynamicQuery, int start, int end,
194                    OrderByComparator orderByComparator) throws SystemException {
195                    return ddlRecordPersistence.findWithDynamicQuery(dynamicQuery, start,
196                            end, orderByComparator);
197            }
198    
199            /**
200             * Returns the number of rows that match the dynamic query.
201             *
202             * @param dynamicQuery the dynamic query
203             * @return the number of rows that match the dynamic query
204             * @throws SystemException if a system exception occurred
205             */
206            public long dynamicQueryCount(DynamicQuery dynamicQuery)
207                    throws SystemException {
208                    return ddlRecordPersistence.countWithDynamicQuery(dynamicQuery);
209            }
210    
211            public DDLRecord fetchDDLRecord(long recordId) throws SystemException {
212                    return ddlRecordPersistence.fetchByPrimaryKey(recordId);
213            }
214    
215            /**
216             * Returns the d d l record with the primary key.
217             *
218             * @param recordId the primary key of the d d l record
219             * @return the d d l record
220             * @throws PortalException if a d d l record with the primary key could not be found
221             * @throws SystemException if a system exception occurred
222             */
223            public DDLRecord getDDLRecord(long recordId)
224                    throws PortalException, SystemException {
225                    return ddlRecordPersistence.findByPrimaryKey(recordId);
226            }
227    
228            public PersistedModel getPersistedModel(Serializable primaryKeyObj)
229                    throws PortalException, SystemException {
230                    return ddlRecordPersistence.findByPrimaryKey(primaryKeyObj);
231            }
232    
233            /**
234             * Returns the d d l record with the UUID in the group.
235             *
236             * @param uuid the UUID of d d l record
237             * @param groupId the group id of the d d l record
238             * @return the d d l record
239             * @throws PortalException if a d d l record with the UUID in the group could not be found
240             * @throws SystemException if a system exception occurred
241             */
242            public DDLRecord getDDLRecordByUuidAndGroupId(String uuid, long groupId)
243                    throws PortalException, SystemException {
244                    return ddlRecordPersistence.findByUUID_G(uuid, groupId);
245            }
246    
247            /**
248             * Returns a range of all the d d l records.
249             *
250             * <p>
251             * 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.
252             * </p>
253             *
254             * @param start the lower bound of the range of d d l records
255             * @param end the upper bound of the range of d d l records (not inclusive)
256             * @return the range of d d l records
257             * @throws SystemException if a system exception occurred
258             */
259            public List<DDLRecord> getDDLRecords(int start, int end)
260                    throws SystemException {
261                    return ddlRecordPersistence.findAll(start, end);
262            }
263    
264            /**
265             * Returns the number of d d l records.
266             *
267             * @return the number of d d l records
268             * @throws SystemException if a system exception occurred
269             */
270            public int getDDLRecordsCount() throws SystemException {
271                    return ddlRecordPersistence.countAll();
272            }
273    
274            /**
275             * Updates the d d l record in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.
276             *
277             * @param ddlRecord the d d l record
278             * @return the d d l record that was updated
279             * @throws SystemException if a system exception occurred
280             */
281            @Indexable(type = IndexableType.REINDEX)
282            public DDLRecord updateDDLRecord(DDLRecord ddlRecord)
283                    throws SystemException {
284                    return ddlRecordPersistence.update(ddlRecord);
285            }
286    
287            /**
288             * Returns the d d l record local service.
289             *
290             * @return the d d l record local service
291             */
292            public DDLRecordLocalService getDDLRecordLocalService() {
293                    return ddlRecordLocalService;
294            }
295    
296            /**
297             * Sets the d d l record local service.
298             *
299             * @param ddlRecordLocalService the d d l record local service
300             */
301            public void setDDLRecordLocalService(
302                    DDLRecordLocalService ddlRecordLocalService) {
303                    this.ddlRecordLocalService = ddlRecordLocalService;
304            }
305    
306            /**
307             * Returns the d d l record remote service.
308             *
309             * @return the d d l record remote service
310             */
311            public DDLRecordService getDDLRecordService() {
312                    return ddlRecordService;
313            }
314    
315            /**
316             * Sets the d d l record remote service.
317             *
318             * @param ddlRecordService the d d l record remote service
319             */
320            public void setDDLRecordService(DDLRecordService ddlRecordService) {
321                    this.ddlRecordService = ddlRecordService;
322            }
323    
324            /**
325             * Returns the d d l record persistence.
326             *
327             * @return the d d l record persistence
328             */
329            public DDLRecordPersistence getDDLRecordPersistence() {
330                    return ddlRecordPersistence;
331            }
332    
333            /**
334             * Sets the d d l record persistence.
335             *
336             * @param ddlRecordPersistence the d d l record persistence
337             */
338            public void setDDLRecordPersistence(
339                    DDLRecordPersistence ddlRecordPersistence) {
340                    this.ddlRecordPersistence = ddlRecordPersistence;
341            }
342    
343            /**
344             * Returns the d d l record finder.
345             *
346             * @return the d d l record finder
347             */
348            public DDLRecordFinder getDDLRecordFinder() {
349                    return ddlRecordFinder;
350            }
351    
352            /**
353             * Sets the d d l record finder.
354             *
355             * @param ddlRecordFinder the d d l record finder
356             */
357            public void setDDLRecordFinder(DDLRecordFinder ddlRecordFinder) {
358                    this.ddlRecordFinder = ddlRecordFinder;
359            }
360    
361            /**
362             * Returns the d d l record set local service.
363             *
364             * @return the d d l record set local service
365             */
366            public DDLRecordSetLocalService getDDLRecordSetLocalService() {
367                    return ddlRecordSetLocalService;
368            }
369    
370            /**
371             * Sets the d d l record set local service.
372             *
373             * @param ddlRecordSetLocalService the d d l record set local service
374             */
375            public void setDDLRecordSetLocalService(
376                    DDLRecordSetLocalService ddlRecordSetLocalService) {
377                    this.ddlRecordSetLocalService = ddlRecordSetLocalService;
378            }
379    
380            /**
381             * Returns the d d l record set remote service.
382             *
383             * @return the d d l record set remote service
384             */
385            public DDLRecordSetService getDDLRecordSetService() {
386                    return ddlRecordSetService;
387            }
388    
389            /**
390             * Sets the d d l record set remote service.
391             *
392             * @param ddlRecordSetService the d d l record set remote service
393             */
394            public void setDDLRecordSetService(DDLRecordSetService ddlRecordSetService) {
395                    this.ddlRecordSetService = ddlRecordSetService;
396            }
397    
398            /**
399             * Returns the d d l record set persistence.
400             *
401             * @return the d d l record set persistence
402             */
403            public DDLRecordSetPersistence getDDLRecordSetPersistence() {
404                    return ddlRecordSetPersistence;
405            }
406    
407            /**
408             * Sets the d d l record set persistence.
409             *
410             * @param ddlRecordSetPersistence the d d l record set persistence
411             */
412            public void setDDLRecordSetPersistence(
413                    DDLRecordSetPersistence ddlRecordSetPersistence) {
414                    this.ddlRecordSetPersistence = ddlRecordSetPersistence;
415            }
416    
417            /**
418             * Returns the d d l record set finder.
419             *
420             * @return the d d l record set finder
421             */
422            public DDLRecordSetFinder getDDLRecordSetFinder() {
423                    return ddlRecordSetFinder;
424            }
425    
426            /**
427             * Sets the d d l record set finder.
428             *
429             * @param ddlRecordSetFinder the d d l record set finder
430             */
431            public void setDDLRecordSetFinder(DDLRecordSetFinder ddlRecordSetFinder) {
432                    this.ddlRecordSetFinder = ddlRecordSetFinder;
433            }
434    
435            /**
436             * Returns the d d l record version persistence.
437             *
438             * @return the d d l record version persistence
439             */
440            public DDLRecordVersionPersistence getDDLRecordVersionPersistence() {
441                    return ddlRecordVersionPersistence;
442            }
443    
444            /**
445             * Sets the d d l record version persistence.
446             *
447             * @param ddlRecordVersionPersistence the d d l record version persistence
448             */
449            public void setDDLRecordVersionPersistence(
450                    DDLRecordVersionPersistence ddlRecordVersionPersistence) {
451                    this.ddlRecordVersionPersistence = ddlRecordVersionPersistence;
452            }
453    
454            /**
455             * Returns the counter local service.
456             *
457             * @return the counter local service
458             */
459            public CounterLocalService getCounterLocalService() {
460                    return counterLocalService;
461            }
462    
463            /**
464             * Sets the counter local service.
465             *
466             * @param counterLocalService the counter local service
467             */
468            public void setCounterLocalService(CounterLocalService counterLocalService) {
469                    this.counterLocalService = counterLocalService;
470            }
471    
472            /**
473             * Returns the resource local service.
474             *
475             * @return the resource local service
476             */
477            public ResourceLocalService getResourceLocalService() {
478                    return resourceLocalService;
479            }
480    
481            /**
482             * Sets the resource local service.
483             *
484             * @param resourceLocalService the resource local service
485             */
486            public void setResourceLocalService(
487                    ResourceLocalService resourceLocalService) {
488                    this.resourceLocalService = resourceLocalService;
489            }
490    
491            /**
492             * Returns the user local service.
493             *
494             * @return the user local service
495             */
496            public UserLocalService getUserLocalService() {
497                    return userLocalService;
498            }
499    
500            /**
501             * Sets the user local service.
502             *
503             * @param userLocalService the user local service
504             */
505            public void setUserLocalService(UserLocalService userLocalService) {
506                    this.userLocalService = userLocalService;
507            }
508    
509            /**
510             * Returns the user remote service.
511             *
512             * @return the user remote service
513             */
514            public UserService getUserService() {
515                    return userService;
516            }
517    
518            /**
519             * Sets the user remote service.
520             *
521             * @param userService the user remote service
522             */
523            public void setUserService(UserService userService) {
524                    this.userService = userService;
525            }
526    
527            /**
528             * Returns the user persistence.
529             *
530             * @return the user persistence
531             */
532            public UserPersistence getUserPersistence() {
533                    return userPersistence;
534            }
535    
536            /**
537             * Sets the user persistence.
538             *
539             * @param userPersistence the user persistence
540             */
541            public void setUserPersistence(UserPersistence userPersistence) {
542                    this.userPersistence = userPersistence;
543            }
544    
545            /**
546             * Returns the user finder.
547             *
548             * @return the user finder
549             */
550            public UserFinder getUserFinder() {
551                    return userFinder;
552            }
553    
554            /**
555             * Sets the user finder.
556             *
557             * @param userFinder the user finder
558             */
559            public void setUserFinder(UserFinder userFinder) {
560                    this.userFinder = userFinder;
561            }
562    
563            /**
564             * Returns the workflow instance link local service.
565             *
566             * @return the workflow instance link local service
567             */
568            public WorkflowInstanceLinkLocalService getWorkflowInstanceLinkLocalService() {
569                    return workflowInstanceLinkLocalService;
570            }
571    
572            /**
573             * Sets the workflow instance link local service.
574             *
575             * @param workflowInstanceLinkLocalService the workflow instance link local service
576             */
577            public void setWorkflowInstanceLinkLocalService(
578                    WorkflowInstanceLinkLocalService workflowInstanceLinkLocalService) {
579                    this.workflowInstanceLinkLocalService = workflowInstanceLinkLocalService;
580            }
581    
582            /**
583             * Returns the workflow instance link persistence.
584             *
585             * @return the workflow instance link persistence
586             */
587            public WorkflowInstanceLinkPersistence getWorkflowInstanceLinkPersistence() {
588                    return workflowInstanceLinkPersistence;
589            }
590    
591            /**
592             * Sets the workflow instance link persistence.
593             *
594             * @param workflowInstanceLinkPersistence the workflow instance link persistence
595             */
596            public void setWorkflowInstanceLinkPersistence(
597                    WorkflowInstanceLinkPersistence workflowInstanceLinkPersistence) {
598                    this.workflowInstanceLinkPersistence = workflowInstanceLinkPersistence;
599            }
600    
601            /**
602             * Returns the asset entry local service.
603             *
604             * @return the asset entry local service
605             */
606            public AssetEntryLocalService getAssetEntryLocalService() {
607                    return assetEntryLocalService;
608            }
609    
610            /**
611             * Sets the asset entry local service.
612             *
613             * @param assetEntryLocalService the asset entry local service
614             */
615            public void setAssetEntryLocalService(
616                    AssetEntryLocalService assetEntryLocalService) {
617                    this.assetEntryLocalService = assetEntryLocalService;
618            }
619    
620            /**
621             * Returns the asset entry remote service.
622             *
623             * @return the asset entry remote service
624             */
625            public AssetEntryService getAssetEntryService() {
626                    return assetEntryService;
627            }
628    
629            /**
630             * Sets the asset entry remote service.
631             *
632             * @param assetEntryService the asset entry remote service
633             */
634            public void setAssetEntryService(AssetEntryService assetEntryService) {
635                    this.assetEntryService = assetEntryService;
636            }
637    
638            /**
639             * Returns the asset entry persistence.
640             *
641             * @return the asset entry persistence
642             */
643            public AssetEntryPersistence getAssetEntryPersistence() {
644                    return assetEntryPersistence;
645            }
646    
647            /**
648             * Sets the asset entry persistence.
649             *
650             * @param assetEntryPersistence the asset entry persistence
651             */
652            public void setAssetEntryPersistence(
653                    AssetEntryPersistence assetEntryPersistence) {
654                    this.assetEntryPersistence = assetEntryPersistence;
655            }
656    
657            /**
658             * Returns the asset entry finder.
659             *
660             * @return the asset entry finder
661             */
662            public AssetEntryFinder getAssetEntryFinder() {
663                    return assetEntryFinder;
664            }
665    
666            /**
667             * Sets the asset entry finder.
668             *
669             * @param assetEntryFinder the asset entry finder
670             */
671            public void setAssetEntryFinder(AssetEntryFinder assetEntryFinder) {
672                    this.assetEntryFinder = assetEntryFinder;
673            }
674    
675            /**
676             * Returns the d d m structure local service.
677             *
678             * @return the d d m structure local service
679             */
680            public DDMStructureLocalService getDDMStructureLocalService() {
681                    return ddmStructureLocalService;
682            }
683    
684            /**
685             * Sets the d d m structure local service.
686             *
687             * @param ddmStructureLocalService the d d m structure local service
688             */
689            public void setDDMStructureLocalService(
690                    DDMStructureLocalService ddmStructureLocalService) {
691                    this.ddmStructureLocalService = ddmStructureLocalService;
692            }
693    
694            /**
695             * Returns the d d m structure remote service.
696             *
697             * @return the d d m structure remote service
698             */
699            public DDMStructureService getDDMStructureService() {
700                    return ddmStructureService;
701            }
702    
703            /**
704             * Sets the d d m structure remote service.
705             *
706             * @param ddmStructureService the d d m structure remote service
707             */
708            public void setDDMStructureService(DDMStructureService ddmStructureService) {
709                    this.ddmStructureService = ddmStructureService;
710            }
711    
712            /**
713             * Returns the d d m structure persistence.
714             *
715             * @return the d d m structure persistence
716             */
717            public DDMStructurePersistence getDDMStructurePersistence() {
718                    return ddmStructurePersistence;
719            }
720    
721            /**
722             * Sets the d d m structure persistence.
723             *
724             * @param ddmStructurePersistence the d d m structure persistence
725             */
726            public void setDDMStructurePersistence(
727                    DDMStructurePersistence ddmStructurePersistence) {
728                    this.ddmStructurePersistence = ddmStructurePersistence;
729            }
730    
731            /**
732             * Returns the d d m structure finder.
733             *
734             * @return the d d m structure finder
735             */
736            public DDMStructureFinder getDDMStructureFinder() {
737                    return ddmStructureFinder;
738            }
739    
740            /**
741             * Sets the d d m structure finder.
742             *
743             * @param ddmStructureFinder the d d m structure finder
744             */
745            public void setDDMStructureFinder(DDMStructureFinder ddmStructureFinder) {
746                    this.ddmStructureFinder = ddmStructureFinder;
747            }
748    
749            public void afterPropertiesSet() {
750                    persistedModelLocalServiceRegistry.register("com.liferay.portlet.dynamicdatalists.model.DDLRecord",
751                            ddlRecordLocalService);
752            }
753    
754            public void destroy() {
755                    persistedModelLocalServiceRegistry.unregister(
756                            "com.liferay.portlet.dynamicdatalists.model.DDLRecord");
757            }
758    
759            /**
760             * Returns the Spring bean ID for this bean.
761             *
762             * @return the Spring bean ID for this bean
763             */
764            public String getBeanIdentifier() {
765                    return _beanIdentifier;
766            }
767    
768            /**
769             * Sets the Spring bean ID for this bean.
770             *
771             * @param beanIdentifier the Spring bean ID for this bean
772             */
773            public void setBeanIdentifier(String beanIdentifier) {
774                    _beanIdentifier = beanIdentifier;
775            }
776    
777            protected Class<?> getModelClass() {
778                    return DDLRecord.class;
779            }
780    
781            protected String getModelClassName() {
782                    return DDLRecord.class.getName();
783            }
784    
785            /**
786             * Performs an SQL query.
787             *
788             * @param sql the sql query
789             */
790            protected void runSQL(String sql) throws SystemException {
791                    try {
792                            DataSource dataSource = ddlRecordPersistence.getDataSource();
793    
794                            SqlUpdate sqlUpdate = SqlUpdateFactoryUtil.getSqlUpdate(dataSource,
795                                            sql, new int[0]);
796    
797                            sqlUpdate.update();
798                    }
799                    catch (Exception e) {
800                            throw new SystemException(e);
801                    }
802            }
803    
804            @BeanReference(type = DDLRecordLocalService.class)
805            protected DDLRecordLocalService ddlRecordLocalService;
806            @BeanReference(type = DDLRecordService.class)
807            protected DDLRecordService ddlRecordService;
808            @BeanReference(type = DDLRecordPersistence.class)
809            protected DDLRecordPersistence ddlRecordPersistence;
810            @BeanReference(type = DDLRecordFinder.class)
811            protected DDLRecordFinder ddlRecordFinder;
812            @BeanReference(type = DDLRecordSetLocalService.class)
813            protected DDLRecordSetLocalService ddlRecordSetLocalService;
814            @BeanReference(type = DDLRecordSetService.class)
815            protected DDLRecordSetService ddlRecordSetService;
816            @BeanReference(type = DDLRecordSetPersistence.class)
817            protected DDLRecordSetPersistence ddlRecordSetPersistence;
818            @BeanReference(type = DDLRecordSetFinder.class)
819            protected DDLRecordSetFinder ddlRecordSetFinder;
820            @BeanReference(type = DDLRecordVersionPersistence.class)
821            protected DDLRecordVersionPersistence ddlRecordVersionPersistence;
822            @BeanReference(type = CounterLocalService.class)
823            protected CounterLocalService counterLocalService;
824            @BeanReference(type = ResourceLocalService.class)
825            protected ResourceLocalService resourceLocalService;
826            @BeanReference(type = UserLocalService.class)
827            protected UserLocalService userLocalService;
828            @BeanReference(type = UserService.class)
829            protected UserService userService;
830            @BeanReference(type = UserPersistence.class)
831            protected UserPersistence userPersistence;
832            @BeanReference(type = UserFinder.class)
833            protected UserFinder userFinder;
834            @BeanReference(type = WorkflowInstanceLinkLocalService.class)
835            protected WorkflowInstanceLinkLocalService workflowInstanceLinkLocalService;
836            @BeanReference(type = WorkflowInstanceLinkPersistence.class)
837            protected WorkflowInstanceLinkPersistence workflowInstanceLinkPersistence;
838            @BeanReference(type = AssetEntryLocalService.class)
839            protected AssetEntryLocalService assetEntryLocalService;
840            @BeanReference(type = AssetEntryService.class)
841            protected AssetEntryService assetEntryService;
842            @BeanReference(type = AssetEntryPersistence.class)
843            protected AssetEntryPersistence assetEntryPersistence;
844            @BeanReference(type = AssetEntryFinder.class)
845            protected AssetEntryFinder assetEntryFinder;
846            @BeanReference(type = DDMStructureLocalService.class)
847            protected DDMStructureLocalService ddmStructureLocalService;
848            @BeanReference(type = DDMStructureService.class)
849            protected DDMStructureService ddmStructureService;
850            @BeanReference(type = DDMStructurePersistence.class)
851            protected DDMStructurePersistence ddmStructurePersistence;
852            @BeanReference(type = DDMStructureFinder.class)
853            protected DDMStructureFinder ddmStructureFinder;
854            @BeanReference(type = PersistedModelLocalServiceRegistry.class)
855            protected PersistedModelLocalServiceRegistry persistedModelLocalServiceRegistry;
856            private String _beanIdentifier;
857    }