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