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