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