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.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, IdentifiableOSGiService {
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 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                    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 persistence.
119             *
120             * @return the social activity persistence
121             */
122            public SocialActivityPersistence getSocialActivityPersistence() {
123                    return socialActivityPersistence;
124            }
125    
126            /**
127             * Sets the social activity persistence.
128             *
129             * @param socialActivityPersistence the social activity persistence
130             */
131            public void setSocialActivityPersistence(
132                    SocialActivityPersistence socialActivityPersistence) {
133                    this.socialActivityPersistence = socialActivityPersistence;
134            }
135    
136            /**
137             * Returns the social activity finder.
138             *
139             * @return the social activity finder
140             */
141            public SocialActivityFinder getSocialActivityFinder() {
142                    return socialActivityFinder;
143            }
144    
145            /**
146             * Sets the social activity finder.
147             *
148             * @param socialActivityFinder the social activity finder
149             */
150            public void setSocialActivityFinder(
151                    SocialActivityFinder socialActivityFinder) {
152                    this.socialActivityFinder = socialActivityFinder;
153            }
154    
155            /**
156             * Returns the social activity set local service.
157             *
158             * @return the social activity set local service
159             */
160            public com.liferay.portlet.social.service.SocialActivitySetLocalService getSocialActivitySetLocalService() {
161                    return socialActivitySetLocalService;
162            }
163    
164            /**
165             * Sets the social activity set local service.
166             *
167             * @param socialActivitySetLocalService the social activity set local service
168             */
169            public void setSocialActivitySetLocalService(
170                    com.liferay.portlet.social.service.SocialActivitySetLocalService socialActivitySetLocalService) {
171                    this.socialActivitySetLocalService = socialActivitySetLocalService;
172            }
173    
174            /**
175             * Returns the social activity set persistence.
176             *
177             * @return the social activity set persistence
178             */
179            public SocialActivitySetPersistence getSocialActivitySetPersistence() {
180                    return socialActivitySetPersistence;
181            }
182    
183            /**
184             * Sets the social activity set persistence.
185             *
186             * @param socialActivitySetPersistence the social activity set persistence
187             */
188            public void setSocialActivitySetPersistence(
189                    SocialActivitySetPersistence socialActivitySetPersistence) {
190                    this.socialActivitySetPersistence = socialActivitySetPersistence;
191            }
192    
193            /**
194             * Returns the social activity set finder.
195             *
196             * @return the social activity set finder
197             */
198            public SocialActivitySetFinder getSocialActivitySetFinder() {
199                    return socialActivitySetFinder;
200            }
201    
202            /**
203             * Sets the social activity set finder.
204             *
205             * @param socialActivitySetFinder the social activity set finder
206             */
207            public void setSocialActivitySetFinder(
208                    SocialActivitySetFinder socialActivitySetFinder) {
209                    this.socialActivitySetFinder = socialActivitySetFinder;
210            }
211    
212            public void afterPropertiesSet() {
213            }
214    
215            public void destroy() {
216            }
217    
218            /**
219             * Returns the OSGi service identifier.
220             *
221             * @return the OSGi service identifier
222             */
223            @Override
224            public String getOSGiServiceIdentifier() {
225                    return SocialActivityInterpreterLocalService.class.getName();
226            }
227    
228            /**
229             * Performs a SQL query.
230             *
231             * @param sql the sql query
232             */
233            protected void runSQL(String sql) {
234                    try {
235                            DataSource dataSource = InfrastructureUtil.getDataSource();
236    
237                            DB db = DBManagerUtil.getDB();
238    
239                            sql = db.buildSQL(sql);
240                            sql = PortalUtil.transformSQL(sql);
241    
242                            SqlUpdate sqlUpdate = SqlUpdateFactoryUtil.getSqlUpdate(dataSource,
243                                            sql, new int[0]);
244    
245                            sqlUpdate.update();
246                    }
247                    catch (Exception e) {
248                            throw new SystemException(e);
249                    }
250            }
251    
252            @BeanReference(type = com.liferay.portlet.social.service.SocialActivityInterpreterLocalService.class)
253            protected SocialActivityInterpreterLocalService socialActivityInterpreterLocalService;
254            @BeanReference(type = com.liferay.counter.service.CounterLocalService.class)
255            protected com.liferay.counter.service.CounterLocalService counterLocalService;
256            @BeanReference(type = com.liferay.portlet.social.service.SocialActivityLocalService.class)
257            protected com.liferay.portlet.social.service.SocialActivityLocalService socialActivityLocalService;
258            @BeanReference(type = SocialActivityPersistence.class)
259            protected SocialActivityPersistence socialActivityPersistence;
260            @BeanReference(type = SocialActivityFinder.class)
261            protected SocialActivityFinder socialActivityFinder;
262            @BeanReference(type = com.liferay.portlet.social.service.SocialActivitySetLocalService.class)
263            protected com.liferay.portlet.social.service.SocialActivitySetLocalService socialActivitySetLocalService;
264            @BeanReference(type = SocialActivitySetPersistence.class)
265            protected SocialActivitySetPersistence socialActivitySetPersistence;
266            @BeanReference(type = SocialActivitySetFinder.class)
267            protected SocialActivitySetFinder socialActivitySetFinder;
268    }