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