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