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