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.social.service.base;
016    
017    import aQute.bnd.annotation.ProviderType;
018    
019    import com.liferay.portal.kernel.bean.BeanReference;
020    import com.liferay.portal.kernel.dao.db.DB;
021    import com.liferay.portal.kernel.dao.db.DBManagerUtil;
022    import com.liferay.portal.kernel.dao.jdbc.SqlUpdate;
023    import com.liferay.portal.kernel.dao.jdbc.SqlUpdateFactoryUtil;
024    import com.liferay.portal.kernel.exception.SystemException;
025    import com.liferay.portal.kernel.module.framework.service.IdentifiableOSGiService;
026    import com.liferay.portal.kernel.util.InfrastructureUtil;
027    import com.liferay.portal.service.BaseLocalServiceImpl;
028    import com.liferay.portal.util.PortalUtil;
029    
030    import com.liferay.portlet.social.service.SocialRequestInterpreterLocalService;
031    
032    import javax.sql.DataSource;
033    
034    /**
035     * Provides the base implementation for the social request interpreter local service.
036     *
037     * <p>
038     * 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.social.service.impl.SocialRequestInterpreterLocalServiceImpl}.
039     * </p>
040     *
041     * @author Brian Wing Shun Chan
042     * @see com.liferay.portlet.social.service.impl.SocialRequestInterpreterLocalServiceImpl
043     * @see com.liferay.portlet.social.service.SocialRequestInterpreterLocalServiceUtil
044     * @generated
045     */
046    @ProviderType
047    public abstract class SocialRequestInterpreterLocalServiceBaseImpl
048            extends BaseLocalServiceImpl implements SocialRequestInterpreterLocalService,
049                    IdentifiableOSGiService {
050            /*
051             * NOTE FOR DEVELOPERS:
052             *
053             * Never modify or reference this class directly. Always use {@link com.liferay.portlet.social.service.SocialRequestInterpreterLocalServiceUtil} to access the social request interpreter local service.
054             */
055    
056            /**
057             * Returns the social request interpreter local service.
058             *
059             * @return the social request interpreter local service
060             */
061            public SocialRequestInterpreterLocalService getSocialRequestInterpreterLocalService() {
062                    return socialRequestInterpreterLocalService;
063            }
064    
065            /**
066             * Sets the social request interpreter local service.
067             *
068             * @param socialRequestInterpreterLocalService the social request interpreter local service
069             */
070            public void setSocialRequestInterpreterLocalService(
071                    SocialRequestInterpreterLocalService socialRequestInterpreterLocalService) {
072                    this.socialRequestInterpreterLocalService = socialRequestInterpreterLocalService;
073            }
074    
075            /**
076             * Returns the counter local service.
077             *
078             * @return the counter local service
079             */
080            public com.liferay.counter.service.CounterLocalService getCounterLocalService() {
081                    return counterLocalService;
082            }
083    
084            /**
085             * Sets the counter local service.
086             *
087             * @param counterLocalService the counter local service
088             */
089            public void setCounterLocalService(
090                    com.liferay.counter.service.CounterLocalService counterLocalService) {
091                    this.counterLocalService = counterLocalService;
092            }
093    
094            public void afterPropertiesSet() {
095            }
096    
097            public void destroy() {
098            }
099    
100            /**
101             * Returns the OSGi service identifier.
102             *
103             * @return the OSGi service identifier
104             */
105            @Override
106            public String getOSGiServiceIdentifier() {
107                    return SocialRequestInterpreterLocalService.class.getName();
108            }
109    
110            /**
111             * Performs a SQL query.
112             *
113             * @param sql the sql query
114             */
115            protected void runSQL(String sql) {
116                    try {
117                            DataSource dataSource = InfrastructureUtil.getDataSource();
118    
119                            DB db = DBManagerUtil.getDB();
120    
121                            sql = db.buildSQL(sql);
122                            sql = PortalUtil.transformSQL(sql);
123    
124                            SqlUpdate sqlUpdate = SqlUpdateFactoryUtil.getSqlUpdate(dataSource,
125                                            sql, new int[0]);
126    
127                            sqlUpdate.update();
128                    }
129                    catch (Exception e) {
130                            throw new SystemException(e);
131                    }
132            }
133    
134            @BeanReference(type = com.liferay.portlet.social.service.SocialRequestInterpreterLocalService.class)
135            protected SocialRequestInterpreterLocalService socialRequestInterpreterLocalService;
136            @BeanReference(type = com.liferay.counter.service.CounterLocalService.class)
137            protected com.liferay.counter.service.CounterLocalService counterLocalService;
138    }