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