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.asset.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.ClassNamePersistence;
026    import com.liferay.portal.service.persistence.GroupFinder;
027    import com.liferay.portal.service.persistence.GroupPersistence;
028    import com.liferay.portal.service.persistence.UserFinder;
029    import com.liferay.portal.service.persistence.UserPersistence;
030    import com.liferay.portal.util.PortalUtil;
031    
032    import com.liferay.portlet.asset.model.AssetTag;
033    import com.liferay.portlet.asset.service.AssetTagService;
034    import com.liferay.portlet.asset.service.persistence.AssetEntryFinder;
035    import com.liferay.portlet.asset.service.persistence.AssetEntryPersistence;
036    import com.liferay.portlet.asset.service.persistence.AssetTagFinder;
037    import com.liferay.portlet.asset.service.persistence.AssetTagPersistence;
038    import com.liferay.portlet.asset.service.persistence.AssetTagPropertyFinder;
039    import com.liferay.portlet.asset.service.persistence.AssetTagPropertyPersistence;
040    import com.liferay.portlet.asset.service.persistence.AssetTagStatsPersistence;
041    
042    import javax.sql.DataSource;
043    
044    /**
045     * Provides the base implementation for the asset tag 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.asset.service.impl.AssetTagServiceImpl}.
049     * </p>
050     *
051     * @author Brian Wing Shun Chan
052     * @see com.liferay.portlet.asset.service.impl.AssetTagServiceImpl
053     * @see com.liferay.portlet.asset.service.AssetTagServiceUtil
054     * @generated
055     */
056    public abstract class AssetTagServiceBaseImpl extends BaseServiceImpl
057            implements AssetTagService, IdentifiableBean {
058            /*
059             * NOTE FOR DEVELOPERS:
060             *
061             * Never modify or reference this class directly. Always use {@link com.liferay.portlet.asset.service.AssetTagServiceUtil} to access the asset tag remote service.
062             */
063    
064            /**
065             * Returns the asset tag local service.
066             *
067             * @return the asset tag local service
068             */
069            public com.liferay.portlet.asset.service.AssetTagLocalService getAssetTagLocalService() {
070                    return assetTagLocalService;
071            }
072    
073            /**
074             * Sets the asset tag local service.
075             *
076             * @param assetTagLocalService the asset tag local service
077             */
078            public void setAssetTagLocalService(
079                    com.liferay.portlet.asset.service.AssetTagLocalService assetTagLocalService) {
080                    this.assetTagLocalService = assetTagLocalService;
081            }
082    
083            /**
084             * Returns the asset tag remote service.
085             *
086             * @return the asset tag remote service
087             */
088            public com.liferay.portlet.asset.service.AssetTagService getAssetTagService() {
089                    return assetTagService;
090            }
091    
092            /**
093             * Sets the asset tag remote service.
094             *
095             * @param assetTagService the asset tag remote service
096             */
097            public void setAssetTagService(
098                    com.liferay.portlet.asset.service.AssetTagService assetTagService) {
099                    this.assetTagService = assetTagService;
100            }
101    
102            /**
103             * Returns the asset tag persistence.
104             *
105             * @return the asset tag persistence
106             */
107            public AssetTagPersistence getAssetTagPersistence() {
108                    return assetTagPersistence;
109            }
110    
111            /**
112             * Sets the asset tag persistence.
113             *
114             * @param assetTagPersistence the asset tag persistence
115             */
116            public void setAssetTagPersistence(AssetTagPersistence assetTagPersistence) {
117                    this.assetTagPersistence = assetTagPersistence;
118            }
119    
120            /**
121             * Returns the asset tag finder.
122             *
123             * @return the asset tag finder
124             */
125            public AssetTagFinder getAssetTagFinder() {
126                    return assetTagFinder;
127            }
128    
129            /**
130             * Sets the asset tag finder.
131             *
132             * @param assetTagFinder the asset tag finder
133             */
134            public void setAssetTagFinder(AssetTagFinder assetTagFinder) {
135                    this.assetTagFinder = assetTagFinder;
136            }
137    
138            /**
139             * Returns the counter local service.
140             *
141             * @return the counter local service
142             */
143            public com.liferay.counter.service.CounterLocalService getCounterLocalService() {
144                    return counterLocalService;
145            }
146    
147            /**
148             * Sets the counter local service.
149             *
150             * @param counterLocalService the counter local service
151             */
152            public void setCounterLocalService(
153                    com.liferay.counter.service.CounterLocalService counterLocalService) {
154                    this.counterLocalService = counterLocalService;
155            }
156    
157            /**
158             * Returns the class name local service.
159             *
160             * @return the class name local service
161             */
162            public com.liferay.portal.service.ClassNameLocalService getClassNameLocalService() {
163                    return classNameLocalService;
164            }
165    
166            /**
167             * Sets the class name local service.
168             *
169             * @param classNameLocalService the class name local service
170             */
171            public void setClassNameLocalService(
172                    com.liferay.portal.service.ClassNameLocalService classNameLocalService) {
173                    this.classNameLocalService = classNameLocalService;
174            }
175    
176            /**
177             * Returns the class name remote service.
178             *
179             * @return the class name remote service
180             */
181            public com.liferay.portal.service.ClassNameService getClassNameService() {
182                    return classNameService;
183            }
184    
185            /**
186             * Sets the class name remote service.
187             *
188             * @param classNameService the class name remote service
189             */
190            public void setClassNameService(
191                    com.liferay.portal.service.ClassNameService classNameService) {
192                    this.classNameService = classNameService;
193            }
194    
195            /**
196             * Returns the class name persistence.
197             *
198             * @return the class name persistence
199             */
200            public ClassNamePersistence getClassNamePersistence() {
201                    return classNamePersistence;
202            }
203    
204            /**
205             * Sets the class name persistence.
206             *
207             * @param classNamePersistence the class name persistence
208             */
209            public void setClassNamePersistence(
210                    ClassNamePersistence classNamePersistence) {
211                    this.classNamePersistence = classNamePersistence;
212            }
213    
214            /**
215             * Returns the group local service.
216             *
217             * @return the group local service
218             */
219            public com.liferay.portal.service.GroupLocalService getGroupLocalService() {
220                    return groupLocalService;
221            }
222    
223            /**
224             * Sets the group local service.
225             *
226             * @param groupLocalService the group local service
227             */
228            public void setGroupLocalService(
229                    com.liferay.portal.service.GroupLocalService groupLocalService) {
230                    this.groupLocalService = groupLocalService;
231            }
232    
233            /**
234             * Returns the group remote service.
235             *
236             * @return the group remote service
237             */
238            public com.liferay.portal.service.GroupService getGroupService() {
239                    return groupService;
240            }
241    
242            /**
243             * Sets the group remote service.
244             *
245             * @param groupService the group remote service
246             */
247            public void setGroupService(
248                    com.liferay.portal.service.GroupService groupService) {
249                    this.groupService = groupService;
250            }
251    
252            /**
253             * Returns the group persistence.
254             *
255             * @return the group persistence
256             */
257            public GroupPersistence getGroupPersistence() {
258                    return groupPersistence;
259            }
260    
261            /**
262             * Sets the group persistence.
263             *
264             * @param groupPersistence the group persistence
265             */
266            public void setGroupPersistence(GroupPersistence groupPersistence) {
267                    this.groupPersistence = groupPersistence;
268            }
269    
270            /**
271             * Returns the group finder.
272             *
273             * @return the group finder
274             */
275            public GroupFinder getGroupFinder() {
276                    return groupFinder;
277            }
278    
279            /**
280             * Sets the group finder.
281             *
282             * @param groupFinder the group finder
283             */
284            public void setGroupFinder(GroupFinder groupFinder) {
285                    this.groupFinder = groupFinder;
286            }
287    
288            /**
289             * Returns the resource local service.
290             *
291             * @return the resource local service
292             */
293            public com.liferay.portal.service.ResourceLocalService getResourceLocalService() {
294                    return resourceLocalService;
295            }
296    
297            /**
298             * Sets the resource local service.
299             *
300             * @param resourceLocalService the resource local service
301             */
302            public void setResourceLocalService(
303                    com.liferay.portal.service.ResourceLocalService resourceLocalService) {
304                    this.resourceLocalService = resourceLocalService;
305            }
306    
307            /**
308             * Returns the user local service.
309             *
310             * @return the user local service
311             */
312            public com.liferay.portal.service.UserLocalService getUserLocalService() {
313                    return userLocalService;
314            }
315    
316            /**
317             * Sets the user local service.
318             *
319             * @param userLocalService the user local service
320             */
321            public void setUserLocalService(
322                    com.liferay.portal.service.UserLocalService userLocalService) {
323                    this.userLocalService = userLocalService;
324            }
325    
326            /**
327             * Returns the user remote service.
328             *
329             * @return the user remote service
330             */
331            public com.liferay.portal.service.UserService getUserService() {
332                    return userService;
333            }
334    
335            /**
336             * Sets the user remote service.
337             *
338             * @param userService the user remote service
339             */
340            public void setUserService(
341                    com.liferay.portal.service.UserService userService) {
342                    this.userService = userService;
343            }
344    
345            /**
346             * Returns the user persistence.
347             *
348             * @return the user persistence
349             */
350            public UserPersistence getUserPersistence() {
351                    return userPersistence;
352            }
353    
354            /**
355             * Sets the user persistence.
356             *
357             * @param userPersistence the user persistence
358             */
359            public void setUserPersistence(UserPersistence userPersistence) {
360                    this.userPersistence = userPersistence;
361            }
362    
363            /**
364             * Returns the user finder.
365             *
366             * @return the user finder
367             */
368            public UserFinder getUserFinder() {
369                    return userFinder;
370            }
371    
372            /**
373             * Sets the user finder.
374             *
375             * @param userFinder the user finder
376             */
377            public void setUserFinder(UserFinder userFinder) {
378                    this.userFinder = userFinder;
379            }
380    
381            /**
382             * Returns the asset entry local service.
383             *
384             * @return the asset entry local service
385             */
386            public com.liferay.portlet.asset.service.AssetEntryLocalService getAssetEntryLocalService() {
387                    return assetEntryLocalService;
388            }
389    
390            /**
391             * Sets the asset entry local service.
392             *
393             * @param assetEntryLocalService the asset entry local service
394             */
395            public void setAssetEntryLocalService(
396                    com.liferay.portlet.asset.service.AssetEntryLocalService assetEntryLocalService) {
397                    this.assetEntryLocalService = assetEntryLocalService;
398            }
399    
400            /**
401             * Returns the asset entry remote service.
402             *
403             * @return the asset entry remote service
404             */
405            public com.liferay.portlet.asset.service.AssetEntryService getAssetEntryService() {
406                    return assetEntryService;
407            }
408    
409            /**
410             * Sets the asset entry remote service.
411             *
412             * @param assetEntryService the asset entry remote service
413             */
414            public void setAssetEntryService(
415                    com.liferay.portlet.asset.service.AssetEntryService assetEntryService) {
416                    this.assetEntryService = assetEntryService;
417            }
418    
419            /**
420             * Returns the asset entry persistence.
421             *
422             * @return the asset entry persistence
423             */
424            public AssetEntryPersistence getAssetEntryPersistence() {
425                    return assetEntryPersistence;
426            }
427    
428            /**
429             * Sets the asset entry persistence.
430             *
431             * @param assetEntryPersistence the asset entry persistence
432             */
433            public void setAssetEntryPersistence(
434                    AssetEntryPersistence assetEntryPersistence) {
435                    this.assetEntryPersistence = assetEntryPersistence;
436            }
437    
438            /**
439             * Returns the asset entry finder.
440             *
441             * @return the asset entry finder
442             */
443            public AssetEntryFinder getAssetEntryFinder() {
444                    return assetEntryFinder;
445            }
446    
447            /**
448             * Sets the asset entry finder.
449             *
450             * @param assetEntryFinder the asset entry finder
451             */
452            public void setAssetEntryFinder(AssetEntryFinder assetEntryFinder) {
453                    this.assetEntryFinder = assetEntryFinder;
454            }
455    
456            /**
457             * Returns the asset tag property local service.
458             *
459             * @return the asset tag property local service
460             */
461            public com.liferay.portlet.asset.service.AssetTagPropertyLocalService getAssetTagPropertyLocalService() {
462                    return assetTagPropertyLocalService;
463            }
464    
465            /**
466             * Sets the asset tag property local service.
467             *
468             * @param assetTagPropertyLocalService the asset tag property local service
469             */
470            public void setAssetTagPropertyLocalService(
471                    com.liferay.portlet.asset.service.AssetTagPropertyLocalService assetTagPropertyLocalService) {
472                    this.assetTagPropertyLocalService = assetTagPropertyLocalService;
473            }
474    
475            /**
476             * Returns the asset tag property remote service.
477             *
478             * @return the asset tag property remote service
479             */
480            public com.liferay.portlet.asset.service.AssetTagPropertyService getAssetTagPropertyService() {
481                    return assetTagPropertyService;
482            }
483    
484            /**
485             * Sets the asset tag property remote service.
486             *
487             * @param assetTagPropertyService the asset tag property remote service
488             */
489            public void setAssetTagPropertyService(
490                    com.liferay.portlet.asset.service.AssetTagPropertyService assetTagPropertyService) {
491                    this.assetTagPropertyService = assetTagPropertyService;
492            }
493    
494            /**
495             * Returns the asset tag property persistence.
496             *
497             * @return the asset tag property persistence
498             */
499            public AssetTagPropertyPersistence getAssetTagPropertyPersistence() {
500                    return assetTagPropertyPersistence;
501            }
502    
503            /**
504             * Sets the asset tag property persistence.
505             *
506             * @param assetTagPropertyPersistence the asset tag property persistence
507             */
508            public void setAssetTagPropertyPersistence(
509                    AssetTagPropertyPersistence assetTagPropertyPersistence) {
510                    this.assetTagPropertyPersistence = assetTagPropertyPersistence;
511            }
512    
513            /**
514             * Returns the asset tag property finder.
515             *
516             * @return the asset tag property finder
517             */
518            public AssetTagPropertyFinder getAssetTagPropertyFinder() {
519                    return assetTagPropertyFinder;
520            }
521    
522            /**
523             * Sets the asset tag property finder.
524             *
525             * @param assetTagPropertyFinder the asset tag property finder
526             */
527            public void setAssetTagPropertyFinder(
528                    AssetTagPropertyFinder assetTagPropertyFinder) {
529                    this.assetTagPropertyFinder = assetTagPropertyFinder;
530            }
531    
532            /**
533             * Returns the asset tag stats local service.
534             *
535             * @return the asset tag stats local service
536             */
537            public com.liferay.portlet.asset.service.AssetTagStatsLocalService getAssetTagStatsLocalService() {
538                    return assetTagStatsLocalService;
539            }
540    
541            /**
542             * Sets the asset tag stats local service.
543             *
544             * @param assetTagStatsLocalService the asset tag stats local service
545             */
546            public void setAssetTagStatsLocalService(
547                    com.liferay.portlet.asset.service.AssetTagStatsLocalService assetTagStatsLocalService) {
548                    this.assetTagStatsLocalService = assetTagStatsLocalService;
549            }
550    
551            /**
552             * Returns the asset tag stats persistence.
553             *
554             * @return the asset tag stats persistence
555             */
556            public AssetTagStatsPersistence getAssetTagStatsPersistence() {
557                    return assetTagStatsPersistence;
558            }
559    
560            /**
561             * Sets the asset tag stats persistence.
562             *
563             * @param assetTagStatsPersistence the asset tag stats persistence
564             */
565            public void setAssetTagStatsPersistence(
566                    AssetTagStatsPersistence assetTagStatsPersistence) {
567                    this.assetTagStatsPersistence = assetTagStatsPersistence;
568            }
569    
570            public void afterPropertiesSet() {
571            }
572    
573            public void destroy() {
574            }
575    
576            /**
577             * Returns the Spring bean ID for this bean.
578             *
579             * @return the Spring bean ID for this bean
580             */
581            @Override
582            public String getBeanIdentifier() {
583                    return _beanIdentifier;
584            }
585    
586            /**
587             * Sets the Spring bean ID for this bean.
588             *
589             * @param beanIdentifier the Spring bean ID for this bean
590             */
591            @Override
592            public void setBeanIdentifier(String beanIdentifier) {
593                    _beanIdentifier = beanIdentifier;
594            }
595    
596            protected Class<?> getModelClass() {
597                    return AssetTag.class;
598            }
599    
600            protected String getModelClassName() {
601                    return AssetTag.class.getName();
602            }
603    
604            /**
605             * Performs a SQL query.
606             *
607             * @param sql the sql query
608             */
609            protected void runSQL(String sql) {
610                    try {
611                            DataSource dataSource = assetTagPersistence.getDataSource();
612    
613                            DB db = DBFactoryUtil.getDB();
614    
615                            sql = db.buildSQL(sql);
616                            sql = PortalUtil.transformSQL(sql);
617    
618                            SqlUpdate sqlUpdate = SqlUpdateFactoryUtil.getSqlUpdate(dataSource,
619                                            sql, new int[0]);
620    
621                            sqlUpdate.update();
622                    }
623                    catch (Exception e) {
624                            throw new SystemException(e);
625                    }
626            }
627    
628            @BeanReference(type = com.liferay.portlet.asset.service.AssetTagLocalService.class)
629            protected com.liferay.portlet.asset.service.AssetTagLocalService assetTagLocalService;
630            @BeanReference(type = com.liferay.portlet.asset.service.AssetTagService.class)
631            protected com.liferay.portlet.asset.service.AssetTagService assetTagService;
632            @BeanReference(type = AssetTagPersistence.class)
633            protected AssetTagPersistence assetTagPersistence;
634            @BeanReference(type = AssetTagFinder.class)
635            protected AssetTagFinder assetTagFinder;
636            @BeanReference(type = com.liferay.counter.service.CounterLocalService.class)
637            protected com.liferay.counter.service.CounterLocalService counterLocalService;
638            @BeanReference(type = com.liferay.portal.service.ClassNameLocalService.class)
639            protected com.liferay.portal.service.ClassNameLocalService classNameLocalService;
640            @BeanReference(type = com.liferay.portal.service.ClassNameService.class)
641            protected com.liferay.portal.service.ClassNameService classNameService;
642            @BeanReference(type = ClassNamePersistence.class)
643            protected ClassNamePersistence classNamePersistence;
644            @BeanReference(type = com.liferay.portal.service.GroupLocalService.class)
645            protected com.liferay.portal.service.GroupLocalService groupLocalService;
646            @BeanReference(type = com.liferay.portal.service.GroupService.class)
647            protected com.liferay.portal.service.GroupService groupService;
648            @BeanReference(type = GroupPersistence.class)
649            protected GroupPersistence groupPersistence;
650            @BeanReference(type = GroupFinder.class)
651            protected GroupFinder groupFinder;
652            @BeanReference(type = com.liferay.portal.service.ResourceLocalService.class)
653            protected com.liferay.portal.service.ResourceLocalService resourceLocalService;
654            @BeanReference(type = com.liferay.portal.service.UserLocalService.class)
655            protected com.liferay.portal.service.UserLocalService userLocalService;
656            @BeanReference(type = com.liferay.portal.service.UserService.class)
657            protected com.liferay.portal.service.UserService userService;
658            @BeanReference(type = UserPersistence.class)
659            protected UserPersistence userPersistence;
660            @BeanReference(type = UserFinder.class)
661            protected UserFinder userFinder;
662            @BeanReference(type = com.liferay.portlet.asset.service.AssetEntryLocalService.class)
663            protected com.liferay.portlet.asset.service.AssetEntryLocalService assetEntryLocalService;
664            @BeanReference(type = com.liferay.portlet.asset.service.AssetEntryService.class)
665            protected com.liferay.portlet.asset.service.AssetEntryService assetEntryService;
666            @BeanReference(type = AssetEntryPersistence.class)
667            protected AssetEntryPersistence assetEntryPersistence;
668            @BeanReference(type = AssetEntryFinder.class)
669            protected AssetEntryFinder assetEntryFinder;
670            @BeanReference(type = com.liferay.portlet.asset.service.AssetTagPropertyLocalService.class)
671            protected com.liferay.portlet.asset.service.AssetTagPropertyLocalService assetTagPropertyLocalService;
672            @BeanReference(type = com.liferay.portlet.asset.service.AssetTagPropertyService.class)
673            protected com.liferay.portlet.asset.service.AssetTagPropertyService assetTagPropertyService;
674            @BeanReference(type = AssetTagPropertyPersistence.class)
675            protected AssetTagPropertyPersistence assetTagPropertyPersistence;
676            @BeanReference(type = AssetTagPropertyFinder.class)
677            protected AssetTagPropertyFinder assetTagPropertyFinder;
678            @BeanReference(type = com.liferay.portlet.asset.service.AssetTagStatsLocalService.class)
679            protected com.liferay.portlet.asset.service.AssetTagStatsLocalService assetTagStatsLocalService;
680            @BeanReference(type = AssetTagStatsPersistence.class)
681            protected AssetTagStatsPersistence assetTagStatsPersistence;
682            private String _beanIdentifier;
683    }