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.bean.IdentifiableBean;
021    import com.liferay.portal.kernel.dao.db.DB;
022    import com.liferay.portal.kernel.dao.db.DBFactoryUtil;
023    import com.liferay.portal.kernel.dao.jdbc.SqlUpdate;
024    import com.liferay.portal.kernel.dao.jdbc.SqlUpdateFactoryUtil;
025    import com.liferay.portal.kernel.exception.SystemException;
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.SocialActivityInterpreterLocalService;
031    import com.liferay.portlet.social.service.persistence.SocialActivityFinder;
032    import com.liferay.portlet.social.service.persistence.SocialActivityPersistence;
033    import com.liferay.portlet.social.service.persistence.SocialActivitySetFinder;
034    import com.liferay.portlet.social.service.persistence.SocialActivitySetPersistence;
035    
036    import javax.sql.DataSource;
037    
038    /**
039     * Provides the base implementation for the social activity interpreter local service.
040     *
041     * <p>
042     * 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.SocialActivityInterpreterLocalServiceImpl}.
043     * </p>
044     *
045     * @author Brian Wing Shun Chan
046     * @see com.liferay.portlet.social.service.impl.SocialActivityInterpreterLocalServiceImpl
047     * @see com.liferay.portlet.social.service.SocialActivityInterpreterLocalServiceUtil
048     * @generated
049     */
050    @ProviderType
051    public abstract class SocialActivityInterpreterLocalServiceBaseImpl
052            extends BaseLocalServiceImpl
053            implements SocialActivityInterpreterLocalService, IdentifiableBean {
054            /*
055             * NOTE FOR DEVELOPERS:
056             *
057             * Never modify or reference this class directly. Always use {@link com.liferay.portlet.social.service.SocialActivityInterpreterLocalServiceUtil} to access the social activity interpreter local service.
058             */
059    
060            /**
061             * Returns the social activity interpreter local service.
062             *
063             * @return the social activity interpreter local service
064             */
065            public com.liferay.portlet.social.service.SocialActivityInterpreterLocalService getSocialActivityInterpreterLocalService() {
066                    return socialActivityInterpreterLocalService;
067            }
068    
069            /**
070             * Sets the social activity interpreter local service.
071             *
072             * @param socialActivityInterpreterLocalService the social activity interpreter local service
073             */
074            public void setSocialActivityInterpreterLocalService(
075                    com.liferay.portlet.social.service.SocialActivityInterpreterLocalService socialActivityInterpreterLocalService) {
076                    this.socialActivityInterpreterLocalService = socialActivityInterpreterLocalService;
077            }
078    
079            /**
080             * Returns the counter local service.
081             *
082             * @return the counter local service
083             */
084            public com.liferay.counter.service.CounterLocalService getCounterLocalService() {
085                    return counterLocalService;
086            }
087    
088            /**
089             * Sets the counter local service.
090             *
091             * @param counterLocalService the counter local service
092             */
093            public void setCounterLocalService(
094                    com.liferay.counter.service.CounterLocalService counterLocalService) {
095                    this.counterLocalService = counterLocalService;
096            }
097    
098            /**
099             * Returns the social activity local service.
100             *
101             * @return the social activity local service
102             */
103            public com.liferay.portlet.social.service.SocialActivityLocalService getSocialActivityLocalService() {
104                    return socialActivityLocalService;
105            }
106    
107            /**
108             * Sets the social activity local service.
109             *
110             * @param socialActivityLocalService the social activity local service
111             */
112            public void setSocialActivityLocalService(
113                    com.liferay.portlet.social.service.SocialActivityLocalService socialActivityLocalService) {
114                    this.socialActivityLocalService = socialActivityLocalService;
115            }
116    
117            /**
118             * Returns the social activity remote service.
119             *
120             * @return the social activity remote service
121             */
122            public com.liferay.portlet.social.service.SocialActivityService getSocialActivityService() {
123                    return socialActivityService;
124            }
125    
126            /**
127             * Sets the social activity remote service.
128             *
129             * @param socialActivityService the social activity remote service
130             */
131            public void setSocialActivityService(
132                    com.liferay.portlet.social.service.SocialActivityService socialActivityService) {
133                    this.socialActivityService = socialActivityService;
134            }
135    
136            /**
137             * Returns the social activity persistence.
138             *
139             * @return the social activity persistence
140             */
141            public SocialActivityPersistence getSocialActivityPersistence() {
142                    return socialActivityPersistence;
143            }
144    
145            /**
146             * Sets the social activity persistence.
147             *
148             * @param socialActivityPersistence the social activity persistence
149             */
150            public void setSocialActivityPersistence(
151                    SocialActivityPersistence socialActivityPersistence) {
152                    this.socialActivityPersistence = socialActivityPersistence;
153            }
154    
155            /**
156             * Returns the social activity finder.
157             *
158             * @return the social activity finder
159             */
160            public SocialActivityFinder getSocialActivityFinder() {
161                    return socialActivityFinder;
162            }
163    
164            /**
165             * Sets the social activity finder.
166             *
167             * @param socialActivityFinder the social activity finder
168             */
169            public void setSocialActivityFinder(
170                    SocialActivityFinder socialActivityFinder) {
171                    this.socialActivityFinder = socialActivityFinder;
172            }
173    
174            /**
175             * Returns the social activity set local service.
176             *
177             * @return the social activity set local service
178             */
179            public com.liferay.portlet.social.service.SocialActivitySetLocalService getSocialActivitySetLocalService() {
180                    return socialActivitySetLocalService;
181            }
182    
183            /**
184             * Sets the social activity set local service.
185             *
186             * @param socialActivitySetLocalService the social activity set local service
187             */
188            public void setSocialActivitySetLocalService(
189                    com.liferay.portlet.social.service.SocialActivitySetLocalService socialActivitySetLocalService) {
190                    this.socialActivitySetLocalService = socialActivitySetLocalService;
191            }
192    
193            /**
194             * Returns the social activity set persistence.
195             *
196             * @return the social activity set persistence
197             */
198            public SocialActivitySetPersistence getSocialActivitySetPersistence() {
199                    return socialActivitySetPersistence;
200            }
201    
202            /**
203             * Sets the social activity set persistence.
204             *
205             * @param socialActivitySetPersistence the social activity set persistence
206             */
207            public void setSocialActivitySetPersistence(
208                    SocialActivitySetPersistence socialActivitySetPersistence) {
209                    this.socialActivitySetPersistence = socialActivitySetPersistence;
210            }
211    
212            /**
213             * Returns the social activity set finder.
214             *
215             * @return the social activity set finder
216             */
217            public SocialActivitySetFinder getSocialActivitySetFinder() {
218                    return socialActivitySetFinder;
219            }
220    
221            /**
222             * Sets the social activity set finder.
223             *
224             * @param socialActivitySetFinder the social activity set finder
225             */
226            public void setSocialActivitySetFinder(
227                    SocialActivitySetFinder socialActivitySetFinder) {
228                    this.socialActivitySetFinder = socialActivitySetFinder;
229            }
230    
231            public void afterPropertiesSet() {
232            }
233    
234            public void destroy() {
235            }
236    
237            /**
238             * Returns the Spring bean ID for this bean.
239             *
240             * @return the Spring bean ID for this bean
241             */
242            @Override
243            public String getBeanIdentifier() {
244                    return _beanIdentifier;
245            }
246    
247            /**
248             * Sets the Spring bean ID for this bean.
249             *
250             * @param beanIdentifier the Spring bean ID for this bean
251             */
252            @Override
253            public void setBeanIdentifier(String beanIdentifier) {
254                    _beanIdentifier = beanIdentifier;
255            }
256    
257            /**
258             * Performs a SQL query.
259             *
260             * @param sql the sql query
261             */
262            protected void runSQL(String sql) {
263                    try {
264                            DataSource dataSource = InfrastructureUtil.getDataSource();
265    
266                            DB db = DBFactoryUtil.getDB();
267    
268                            sql = db.buildSQL(sql);
269                            sql = PortalUtil.transformSQL(sql);
270    
271                            SqlUpdate sqlUpdate = SqlUpdateFactoryUtil.getSqlUpdate(dataSource,
272                                            sql, new int[0]);
273    
274                            sqlUpdate.update();
275                    }
276                    catch (Exception e) {
277                            throw new SystemException(e);
278                    }
279            }
280    
281            @BeanReference(type = com.liferay.portlet.social.service.SocialActivityInterpreterLocalService.class)
282            protected com.liferay.portlet.social.service.SocialActivityInterpreterLocalService socialActivityInterpreterLocalService;
283            @BeanReference(type = com.liferay.counter.service.CounterLocalService.class)
284            protected com.liferay.counter.service.CounterLocalService counterLocalService;
285            @BeanReference(type = com.liferay.portlet.social.service.SocialActivityLocalService.class)
286            protected com.liferay.portlet.social.service.SocialActivityLocalService socialActivityLocalService;
287            @BeanReference(type = com.liferay.portlet.social.service.SocialActivityService.class)
288            protected com.liferay.portlet.social.service.SocialActivityService socialActivityService;
289            @BeanReference(type = SocialActivityPersistence.class)
290            protected SocialActivityPersistence socialActivityPersistence;
291            @BeanReference(type = SocialActivityFinder.class)
292            protected SocialActivityFinder socialActivityFinder;
293            @BeanReference(type = com.liferay.portlet.social.service.SocialActivitySetLocalService.class)
294            protected com.liferay.portlet.social.service.SocialActivitySetLocalService socialActivitySetLocalService;
295            @BeanReference(type = SocialActivitySetPersistence.class)
296            protected SocialActivitySetPersistence socialActivitySetPersistence;
297            @BeanReference(type = SocialActivitySetFinder.class)
298            protected SocialActivitySetFinder socialActivitySetFinder;
299            private String _beanIdentifier;
300    }