001    /**
002     * Copyright (c) 2000-present 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.portal.kernel.bean.BeanReference;
018    import com.liferay.portal.kernel.bean.IdentifiableBean;
019    import com.liferay.portal.kernel.dao.db.DB;
020    import com.liferay.portal.kernel.dao.db.DBFactoryUtil;
021    import com.liferay.portal.kernel.dao.jdbc.SqlUpdate;
022    import com.liferay.portal.kernel.dao.jdbc.SqlUpdateFactoryUtil;
023    import com.liferay.portal.kernel.exception.SystemException;
024    import com.liferay.portal.service.BaseServiceImpl;
025    import com.liferay.portal.service.persistence.UserFinder;
026    import com.liferay.portal.service.persistence.UserPersistence;
027    import com.liferay.portal.service.persistence.WorkflowInstanceLinkPersistence;
028    import com.liferay.portal.util.PortalUtil;
029    
030    import com.liferay.portlet.asset.service.persistence.AssetEntryFinder;
031    import com.liferay.portlet.asset.service.persistence.AssetEntryPersistence;
032    import com.liferay.portlet.dynamicdatalists.model.DDLRecord;
033    import com.liferay.portlet.dynamicdatalists.service.DDLRecordService;
034    import com.liferay.portlet.dynamicdatalists.service.persistence.DDLRecordFinder;
035    import com.liferay.portlet.dynamicdatalists.service.persistence.DDLRecordPersistence;
036    import com.liferay.portlet.dynamicdatalists.service.persistence.DDLRecordSetFinder;
037    import com.liferay.portlet.dynamicdatalists.service.persistence.DDLRecordSetPersistence;
038    import com.liferay.portlet.dynamicdatalists.service.persistence.DDLRecordVersionPersistence;
039    import com.liferay.portlet.dynamicdatamapping.service.persistence.DDMStructureFinder;
040    import com.liferay.portlet.dynamicdatamapping.service.persistence.DDMStructurePersistence;
041    
042    import javax.sql.DataSource;
043    
044    /**
045     * Provides the base implementation for the d d l record remote service.
046     *
047     * <p>
048     * 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.DDLRecordServiceImpl}.
049     * </p>
050     *
051     * @author Brian Wing Shun Chan
052     * @see com.liferay.portlet.dynamicdatalists.service.impl.DDLRecordServiceImpl
053     * @see com.liferay.portlet.dynamicdatalists.service.DDLRecordServiceUtil
054     * @generated
055     */
056    public abstract class DDLRecordServiceBaseImpl extends BaseServiceImpl
057            implements DDLRecordService, IdentifiableBean {
058            /*
059             * NOTE FOR DEVELOPERS:
060             *
061             * Never modify or reference this class directly. Always use {@link com.liferay.portlet.dynamicdatalists.service.DDLRecordServiceUtil} to access the d d l record remote service.
062             */
063    
064            /**
065             * Returns the d d l record local service.
066             *
067             * @return the d d l record local service
068             */
069            public com.liferay.portlet.dynamicdatalists.service.DDLRecordLocalService getDDLRecordLocalService() {
070                    return ddlRecordLocalService;
071            }
072    
073            /**
074             * Sets the d d l record local service.
075             *
076             * @param ddlRecordLocalService the d d l record local service
077             */
078            public void setDDLRecordLocalService(
079                    com.liferay.portlet.dynamicdatalists.service.DDLRecordLocalService ddlRecordLocalService) {
080                    this.ddlRecordLocalService = ddlRecordLocalService;
081            }
082    
083            /**
084             * Returns the d d l record remote service.
085             *
086             * @return the d d l record remote service
087             */
088            public com.liferay.portlet.dynamicdatalists.service.DDLRecordService getDDLRecordService() {
089                    return ddlRecordService;
090            }
091    
092            /**
093             * Sets the d d l record remote service.
094             *
095             * @param ddlRecordService the d d l record remote service
096             */
097            public void setDDLRecordService(
098                    com.liferay.portlet.dynamicdatalists.service.DDLRecordService ddlRecordService) {
099                    this.ddlRecordService = ddlRecordService;
100            }
101    
102            /**
103             * Returns the d d l record persistence.
104             *
105             * @return the d d l record persistence
106             */
107            public DDLRecordPersistence getDDLRecordPersistence() {
108                    return ddlRecordPersistence;
109            }
110    
111            /**
112             * Sets the d d l record persistence.
113             *
114             * @param ddlRecordPersistence the d d l record persistence
115             */
116            public void setDDLRecordPersistence(
117                    DDLRecordPersistence ddlRecordPersistence) {
118                    this.ddlRecordPersistence = ddlRecordPersistence;
119            }
120    
121            /**
122             * Returns the d d l record finder.
123             *
124             * @return the d d l record finder
125             */
126            public DDLRecordFinder getDDLRecordFinder() {
127                    return ddlRecordFinder;
128            }
129    
130            /**
131             * Sets the d d l record finder.
132             *
133             * @param ddlRecordFinder the d d l record finder
134             */
135            public void setDDLRecordFinder(DDLRecordFinder ddlRecordFinder) {
136                    this.ddlRecordFinder = ddlRecordFinder;
137            }
138    
139            /**
140             * Returns the counter local service.
141             *
142             * @return the counter local service
143             */
144            public com.liferay.counter.service.CounterLocalService getCounterLocalService() {
145                    return counterLocalService;
146            }
147    
148            /**
149             * Sets the counter local service.
150             *
151             * @param counterLocalService the counter local service
152             */
153            public void setCounterLocalService(
154                    com.liferay.counter.service.CounterLocalService counterLocalService) {
155                    this.counterLocalService = counterLocalService;
156            }
157    
158            /**
159             * Returns the user local service.
160             *
161             * @return the user local service
162             */
163            public com.liferay.portal.service.UserLocalService getUserLocalService() {
164                    return userLocalService;
165            }
166    
167            /**
168             * Sets the user local service.
169             *
170             * @param userLocalService the user local service
171             */
172            public void setUserLocalService(
173                    com.liferay.portal.service.UserLocalService userLocalService) {
174                    this.userLocalService = userLocalService;
175            }
176    
177            /**
178             * Returns the user remote service.
179             *
180             * @return the user remote service
181             */
182            public com.liferay.portal.service.UserService getUserService() {
183                    return userService;
184            }
185    
186            /**
187             * Sets the user remote service.
188             *
189             * @param userService the user remote service
190             */
191            public void setUserService(
192                    com.liferay.portal.service.UserService userService) {
193                    this.userService = userService;
194            }
195    
196            /**
197             * Returns the user persistence.
198             *
199             * @return the user persistence
200             */
201            public UserPersistence getUserPersistence() {
202                    return userPersistence;
203            }
204    
205            /**
206             * Sets the user persistence.
207             *
208             * @param userPersistence the user persistence
209             */
210            public void setUserPersistence(UserPersistence userPersistence) {
211                    this.userPersistence = userPersistence;
212            }
213    
214            /**
215             * Returns the user finder.
216             *
217             * @return the user finder
218             */
219            public UserFinder getUserFinder() {
220                    return userFinder;
221            }
222    
223            /**
224             * Sets the user finder.
225             *
226             * @param userFinder the user finder
227             */
228            public void setUserFinder(UserFinder userFinder) {
229                    this.userFinder = userFinder;
230            }
231    
232            /**
233             * Returns the workflow instance link local service.
234             *
235             * @return the workflow instance link local service
236             */
237            public com.liferay.portal.service.WorkflowInstanceLinkLocalService getWorkflowInstanceLinkLocalService() {
238                    return workflowInstanceLinkLocalService;
239            }
240    
241            /**
242             * Sets the workflow instance link local service.
243             *
244             * @param workflowInstanceLinkLocalService the workflow instance link local service
245             */
246            public void setWorkflowInstanceLinkLocalService(
247                    com.liferay.portal.service.WorkflowInstanceLinkLocalService workflowInstanceLinkLocalService) {
248                    this.workflowInstanceLinkLocalService = workflowInstanceLinkLocalService;
249            }
250    
251            /**
252             * Returns the workflow instance link persistence.
253             *
254             * @return the workflow instance link persistence
255             */
256            public WorkflowInstanceLinkPersistence getWorkflowInstanceLinkPersistence() {
257                    return workflowInstanceLinkPersistence;
258            }
259    
260            /**
261             * Sets the workflow instance link persistence.
262             *
263             * @param workflowInstanceLinkPersistence the workflow instance link persistence
264             */
265            public void setWorkflowInstanceLinkPersistence(
266                    WorkflowInstanceLinkPersistence workflowInstanceLinkPersistence) {
267                    this.workflowInstanceLinkPersistence = workflowInstanceLinkPersistence;
268            }
269    
270            /**
271             * Returns the asset entry local service.
272             *
273             * @return the asset entry local service
274             */
275            public com.liferay.portlet.asset.service.AssetEntryLocalService getAssetEntryLocalService() {
276                    return assetEntryLocalService;
277            }
278    
279            /**
280             * Sets the asset entry local service.
281             *
282             * @param assetEntryLocalService the asset entry local service
283             */
284            public void setAssetEntryLocalService(
285                    com.liferay.portlet.asset.service.AssetEntryLocalService assetEntryLocalService) {
286                    this.assetEntryLocalService = assetEntryLocalService;
287            }
288    
289            /**
290             * Returns the asset entry remote service.
291             *
292             * @return the asset entry remote service
293             */
294            public com.liferay.portlet.asset.service.AssetEntryService getAssetEntryService() {
295                    return assetEntryService;
296            }
297    
298            /**
299             * Sets the asset entry remote service.
300             *
301             * @param assetEntryService the asset entry remote service
302             */
303            public void setAssetEntryService(
304                    com.liferay.portlet.asset.service.AssetEntryService assetEntryService) {
305                    this.assetEntryService = assetEntryService;
306            }
307    
308            /**
309             * Returns the asset entry persistence.
310             *
311             * @return the asset entry persistence
312             */
313            public AssetEntryPersistence getAssetEntryPersistence() {
314                    return assetEntryPersistence;
315            }
316    
317            /**
318             * Sets the asset entry persistence.
319             *
320             * @param assetEntryPersistence the asset entry persistence
321             */
322            public void setAssetEntryPersistence(
323                    AssetEntryPersistence assetEntryPersistence) {
324                    this.assetEntryPersistence = assetEntryPersistence;
325            }
326    
327            /**
328             * Returns the asset entry finder.
329             *
330             * @return the asset entry finder
331             */
332            public AssetEntryFinder getAssetEntryFinder() {
333                    return assetEntryFinder;
334            }
335    
336            /**
337             * Sets the asset entry finder.
338             *
339             * @param assetEntryFinder the asset entry finder
340             */
341            public void setAssetEntryFinder(AssetEntryFinder assetEntryFinder) {
342                    this.assetEntryFinder = assetEntryFinder;
343            }
344    
345            /**
346             * Returns the d d m structure local service.
347             *
348             * @return the d d m structure local service
349             */
350            public com.liferay.portlet.dynamicdatamapping.service.DDMStructureLocalService getDDMStructureLocalService() {
351                    return ddmStructureLocalService;
352            }
353    
354            /**
355             * Sets the d d m structure local service.
356             *
357             * @param ddmStructureLocalService the d d m structure local service
358             */
359            public void setDDMStructureLocalService(
360                    com.liferay.portlet.dynamicdatamapping.service.DDMStructureLocalService ddmStructureLocalService) {
361                    this.ddmStructureLocalService = ddmStructureLocalService;
362            }
363    
364            /**
365             * Returns the d d m structure remote service.
366             *
367             * @return the d d m structure remote service
368             */
369            public com.liferay.portlet.dynamicdatamapping.service.DDMStructureService getDDMStructureService() {
370                    return ddmStructureService;
371            }
372    
373            /**
374             * Sets the d d m structure remote service.
375             *
376             * @param ddmStructureService the d d m structure remote service
377             */
378            public void setDDMStructureService(
379                    com.liferay.portlet.dynamicdatamapping.service.DDMStructureService ddmStructureService) {
380                    this.ddmStructureService = ddmStructureService;
381            }
382    
383            /**
384             * Returns the d d m structure persistence.
385             *
386             * @return the d d m structure persistence
387             */
388            public DDMStructurePersistence getDDMStructurePersistence() {
389                    return ddmStructurePersistence;
390            }
391    
392            /**
393             * Sets the d d m structure persistence.
394             *
395             * @param ddmStructurePersistence the d d m structure persistence
396             */
397            public void setDDMStructurePersistence(
398                    DDMStructurePersistence ddmStructurePersistence) {
399                    this.ddmStructurePersistence = ddmStructurePersistence;
400            }
401    
402            /**
403             * Returns the d d m structure finder.
404             *
405             * @return the d d m structure finder
406             */
407            public DDMStructureFinder getDDMStructureFinder() {
408                    return ddmStructureFinder;
409            }
410    
411            /**
412             * Sets the d d m structure finder.
413             *
414             * @param ddmStructureFinder the d d m structure finder
415             */
416            public void setDDMStructureFinder(DDMStructureFinder ddmStructureFinder) {
417                    this.ddmStructureFinder = ddmStructureFinder;
418            }
419    
420            /**
421             * Returns the d d l record set local service.
422             *
423             * @return the d d l record set local service
424             */
425            public com.liferay.portlet.dynamicdatalists.service.DDLRecordSetLocalService getDDLRecordSetLocalService() {
426                    return ddlRecordSetLocalService;
427            }
428    
429            /**
430             * Sets the d d l record set local service.
431             *
432             * @param ddlRecordSetLocalService the d d l record set local service
433             */
434            public void setDDLRecordSetLocalService(
435                    com.liferay.portlet.dynamicdatalists.service.DDLRecordSetLocalService ddlRecordSetLocalService) {
436                    this.ddlRecordSetLocalService = ddlRecordSetLocalService;
437            }
438    
439            /**
440             * Returns the d d l record set remote service.
441             *
442             * @return the d d l record set remote service
443             */
444            public com.liferay.portlet.dynamicdatalists.service.DDLRecordSetService getDDLRecordSetService() {
445                    return ddlRecordSetService;
446            }
447    
448            /**
449             * Sets the d d l record set remote service.
450             *
451             * @param ddlRecordSetService the d d l record set remote service
452             */
453            public void setDDLRecordSetService(
454                    com.liferay.portlet.dynamicdatalists.service.DDLRecordSetService ddlRecordSetService) {
455                    this.ddlRecordSetService = ddlRecordSetService;
456            }
457    
458            /**
459             * Returns the d d l record set persistence.
460             *
461             * @return the d d l record set persistence
462             */
463            public DDLRecordSetPersistence getDDLRecordSetPersistence() {
464                    return ddlRecordSetPersistence;
465            }
466    
467            /**
468             * Sets the d d l record set persistence.
469             *
470             * @param ddlRecordSetPersistence the d d l record set persistence
471             */
472            public void setDDLRecordSetPersistence(
473                    DDLRecordSetPersistence ddlRecordSetPersistence) {
474                    this.ddlRecordSetPersistence = ddlRecordSetPersistence;
475            }
476    
477            /**
478             * Returns the d d l record set finder.
479             *
480             * @return the d d l record set finder
481             */
482            public DDLRecordSetFinder getDDLRecordSetFinder() {
483                    return ddlRecordSetFinder;
484            }
485    
486            /**
487             * Sets the d d l record set finder.
488             *
489             * @param ddlRecordSetFinder the d d l record set finder
490             */
491            public void setDDLRecordSetFinder(DDLRecordSetFinder ddlRecordSetFinder) {
492                    this.ddlRecordSetFinder = ddlRecordSetFinder;
493            }
494    
495            /**
496             * Returns the d d l record version local service.
497             *
498             * @return the d d l record version local service
499             */
500            public com.liferay.portlet.dynamicdatalists.service.DDLRecordVersionLocalService getDDLRecordVersionLocalService() {
501                    return ddlRecordVersionLocalService;
502            }
503    
504            /**
505             * Sets the d d l record version local service.
506             *
507             * @param ddlRecordVersionLocalService the d d l record version local service
508             */
509            public void setDDLRecordVersionLocalService(
510                    com.liferay.portlet.dynamicdatalists.service.DDLRecordVersionLocalService ddlRecordVersionLocalService) {
511                    this.ddlRecordVersionLocalService = ddlRecordVersionLocalService;
512            }
513    
514            /**
515             * Returns the d d l record version remote service.
516             *
517             * @return the d d l record version remote service
518             */
519            public com.liferay.portlet.dynamicdatalists.service.DDLRecordVersionService getDDLRecordVersionService() {
520                    return ddlRecordVersionService;
521            }
522    
523            /**
524             * Sets the d d l record version remote service.
525             *
526             * @param ddlRecordVersionService the d d l record version remote service
527             */
528            public void setDDLRecordVersionService(
529                    com.liferay.portlet.dynamicdatalists.service.DDLRecordVersionService ddlRecordVersionService) {
530                    this.ddlRecordVersionService = ddlRecordVersionService;
531            }
532    
533            /**
534             * Returns the d d l record version persistence.
535             *
536             * @return the d d l record version persistence
537             */
538            public DDLRecordVersionPersistence getDDLRecordVersionPersistence() {
539                    return ddlRecordVersionPersistence;
540            }
541    
542            /**
543             * Sets the d d l record version persistence.
544             *
545             * @param ddlRecordVersionPersistence the d d l record version persistence
546             */
547            public void setDDLRecordVersionPersistence(
548                    DDLRecordVersionPersistence ddlRecordVersionPersistence) {
549                    this.ddlRecordVersionPersistence = ddlRecordVersionPersistence;
550            }
551    
552            public void afterPropertiesSet() {
553            }
554    
555            public void destroy() {
556            }
557    
558            /**
559             * Returns the Spring bean ID for this bean.
560             *
561             * @return the Spring bean ID for this bean
562             */
563            @Override
564            public String getBeanIdentifier() {
565                    return _beanIdentifier;
566            }
567    
568            /**
569             * Sets the Spring bean ID for this bean.
570             *
571             * @param beanIdentifier the Spring bean ID for this bean
572             */
573            @Override
574            public void setBeanIdentifier(String beanIdentifier) {
575                    _beanIdentifier = beanIdentifier;
576            }
577    
578            protected Class<?> getModelClass() {
579                    return DDLRecord.class;
580            }
581    
582            protected String getModelClassName() {
583                    return DDLRecord.class.getName();
584            }
585    
586            /**
587             * Performs a SQL query.
588             *
589             * @param sql the sql query
590             */
591            protected void runSQL(String sql) {
592                    try {
593                            DataSource dataSource = ddlRecordPersistence.getDataSource();
594    
595                            DB db = DBFactoryUtil.getDB();
596    
597                            sql = db.buildSQL(sql);
598                            sql = PortalUtil.transformSQL(sql);
599    
600                            SqlUpdate sqlUpdate = SqlUpdateFactoryUtil.getSqlUpdate(dataSource,
601                                            sql, new int[0]);
602    
603                            sqlUpdate.update();
604                    }
605                    catch (Exception e) {
606                            throw new SystemException(e);
607                    }
608            }
609    
610            @BeanReference(type = com.liferay.portlet.dynamicdatalists.service.DDLRecordLocalService.class)
611            protected com.liferay.portlet.dynamicdatalists.service.DDLRecordLocalService ddlRecordLocalService;
612            @BeanReference(type = com.liferay.portlet.dynamicdatalists.service.DDLRecordService.class)
613            protected com.liferay.portlet.dynamicdatalists.service.DDLRecordService ddlRecordService;
614            @BeanReference(type = DDLRecordPersistence.class)
615            protected DDLRecordPersistence ddlRecordPersistence;
616            @BeanReference(type = DDLRecordFinder.class)
617            protected DDLRecordFinder ddlRecordFinder;
618            @BeanReference(type = com.liferay.counter.service.CounterLocalService.class)
619            protected com.liferay.counter.service.CounterLocalService counterLocalService;
620            @BeanReference(type = com.liferay.portal.service.UserLocalService.class)
621            protected com.liferay.portal.service.UserLocalService userLocalService;
622            @BeanReference(type = com.liferay.portal.service.UserService.class)
623            protected com.liferay.portal.service.UserService userService;
624            @BeanReference(type = UserPersistence.class)
625            protected UserPersistence userPersistence;
626            @BeanReference(type = UserFinder.class)
627            protected UserFinder userFinder;
628            @BeanReference(type = com.liferay.portal.service.WorkflowInstanceLinkLocalService.class)
629            protected com.liferay.portal.service.WorkflowInstanceLinkLocalService workflowInstanceLinkLocalService;
630            @BeanReference(type = WorkflowInstanceLinkPersistence.class)
631            protected WorkflowInstanceLinkPersistence workflowInstanceLinkPersistence;
632            @BeanReference(type = com.liferay.portlet.asset.service.AssetEntryLocalService.class)
633            protected com.liferay.portlet.asset.service.AssetEntryLocalService assetEntryLocalService;
634            @BeanReference(type = com.liferay.portlet.asset.service.AssetEntryService.class)
635            protected com.liferay.portlet.asset.service.AssetEntryService assetEntryService;
636            @BeanReference(type = AssetEntryPersistence.class)
637            protected AssetEntryPersistence assetEntryPersistence;
638            @BeanReference(type = AssetEntryFinder.class)
639            protected AssetEntryFinder assetEntryFinder;
640            @BeanReference(type = com.liferay.portlet.dynamicdatamapping.service.DDMStructureLocalService.class)
641            protected com.liferay.portlet.dynamicdatamapping.service.DDMStructureLocalService ddmStructureLocalService;
642            @BeanReference(type = com.liferay.portlet.dynamicdatamapping.service.DDMStructureService.class)
643            protected com.liferay.portlet.dynamicdatamapping.service.DDMStructureService ddmStructureService;
644            @BeanReference(type = DDMStructurePersistence.class)
645            protected DDMStructurePersistence ddmStructurePersistence;
646            @BeanReference(type = DDMStructureFinder.class)
647            protected DDMStructureFinder ddmStructureFinder;
648            @BeanReference(type = com.liferay.portlet.dynamicdatalists.service.DDLRecordSetLocalService.class)
649            protected com.liferay.portlet.dynamicdatalists.service.DDLRecordSetLocalService ddlRecordSetLocalService;
650            @BeanReference(type = com.liferay.portlet.dynamicdatalists.service.DDLRecordSetService.class)
651            protected com.liferay.portlet.dynamicdatalists.service.DDLRecordSetService ddlRecordSetService;
652            @BeanReference(type = DDLRecordSetPersistence.class)
653            protected DDLRecordSetPersistence ddlRecordSetPersistence;
654            @BeanReference(type = DDLRecordSetFinder.class)
655            protected DDLRecordSetFinder ddlRecordSetFinder;
656            @BeanReference(type = com.liferay.portlet.dynamicdatalists.service.DDLRecordVersionLocalService.class)
657            protected com.liferay.portlet.dynamicdatalists.service.DDLRecordVersionLocalService ddlRecordVersionLocalService;
658            @BeanReference(type = com.liferay.portlet.dynamicdatalists.service.DDLRecordVersionService.class)
659            protected com.liferay.portlet.dynamicdatalists.service.DDLRecordVersionService ddlRecordVersionService;
660            @BeanReference(type = DDLRecordVersionPersistence.class)
661            protected DDLRecordVersionPersistence ddlRecordVersionPersistence;
662            private String _beanIdentifier;
663    }