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 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.util.PortalUtil;
029    
030    import com.liferay.portlet.social.model.SocialActivitySetting;
031    import com.liferay.portlet.social.service.SocialActivitySettingService;
032    import com.liferay.portlet.social.service.persistence.SocialActivitySettingPersistence;
033    
034    import javax.sql.DataSource;
035    
036    /**
037     * Provides the base implementation for the social activity setting remote service.
038     *
039     * <p>
040     * 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.SocialActivitySettingServiceImpl}.
041     * </p>
042     *
043     * @author Brian Wing Shun Chan
044     * @see com.liferay.portlet.social.service.impl.SocialActivitySettingServiceImpl
045     * @see com.liferay.portlet.social.service.SocialActivitySettingServiceUtil
046     * @generated
047     */
048    public abstract class SocialActivitySettingServiceBaseImpl
049            extends BaseServiceImpl implements SocialActivitySettingService,
050                    IdentifiableOSGiService {
051            /*
052             * NOTE FOR DEVELOPERS:
053             *
054             * Never modify or reference this class directly. Always use {@link com.liferay.portlet.social.service.SocialActivitySettingServiceUtil} to access the social activity setting remote service.
055             */
056    
057            /**
058             * Returns the social activity setting local service.
059             *
060             * @return the social activity setting local service
061             */
062            public com.liferay.portlet.social.service.SocialActivitySettingLocalService getSocialActivitySettingLocalService() {
063                    return socialActivitySettingLocalService;
064            }
065    
066            /**
067             * Sets the social activity setting local service.
068             *
069             * @param socialActivitySettingLocalService the social activity setting local service
070             */
071            public void setSocialActivitySettingLocalService(
072                    com.liferay.portlet.social.service.SocialActivitySettingLocalService socialActivitySettingLocalService) {
073                    this.socialActivitySettingLocalService = socialActivitySettingLocalService;
074            }
075    
076            /**
077             * Returns the social activity setting remote service.
078             *
079             * @return the social activity setting remote service
080             */
081            public SocialActivitySettingService getSocialActivitySettingService() {
082                    return socialActivitySettingService;
083            }
084    
085            /**
086             * Sets the social activity setting remote service.
087             *
088             * @param socialActivitySettingService the social activity setting remote service
089             */
090            public void setSocialActivitySettingService(
091                    SocialActivitySettingService socialActivitySettingService) {
092                    this.socialActivitySettingService = socialActivitySettingService;
093            }
094    
095            /**
096             * Returns the social activity setting persistence.
097             *
098             * @return the social activity setting persistence
099             */
100            public SocialActivitySettingPersistence getSocialActivitySettingPersistence() {
101                    return socialActivitySettingPersistence;
102            }
103    
104            /**
105             * Sets the social activity setting persistence.
106             *
107             * @param socialActivitySettingPersistence the social activity setting persistence
108             */
109            public void setSocialActivitySettingPersistence(
110                    SocialActivitySettingPersistence socialActivitySettingPersistence) {
111                    this.socialActivitySettingPersistence = socialActivitySettingPersistence;
112            }
113    
114            /**
115             * Returns the counter local service.
116             *
117             * @return the counter local service
118             */
119            public com.liferay.counter.service.CounterLocalService getCounterLocalService() {
120                    return counterLocalService;
121            }
122    
123            /**
124             * Sets the counter local service.
125             *
126             * @param counterLocalService the counter local service
127             */
128            public void setCounterLocalService(
129                    com.liferay.counter.service.CounterLocalService counterLocalService) {
130                    this.counterLocalService = counterLocalService;
131            }
132    
133            /**
134             * Returns the class name local service.
135             *
136             * @return the class name local service
137             */
138            public com.liferay.portal.service.ClassNameLocalService getClassNameLocalService() {
139                    return classNameLocalService;
140            }
141    
142            /**
143             * Sets the class name local service.
144             *
145             * @param classNameLocalService the class name local service
146             */
147            public void setClassNameLocalService(
148                    com.liferay.portal.service.ClassNameLocalService classNameLocalService) {
149                    this.classNameLocalService = classNameLocalService;
150            }
151    
152            /**
153             * Returns the class name remote service.
154             *
155             * @return the class name remote service
156             */
157            public com.liferay.portal.service.ClassNameService getClassNameService() {
158                    return classNameService;
159            }
160    
161            /**
162             * Sets the class name remote service.
163             *
164             * @param classNameService the class name remote service
165             */
166            public void setClassNameService(
167                    com.liferay.portal.service.ClassNameService classNameService) {
168                    this.classNameService = classNameService;
169            }
170    
171            /**
172             * Returns the class name persistence.
173             *
174             * @return the class name persistence
175             */
176            public ClassNamePersistence getClassNamePersistence() {
177                    return classNamePersistence;
178            }
179    
180            /**
181             * Sets the class name persistence.
182             *
183             * @param classNamePersistence the class name persistence
184             */
185            public void setClassNamePersistence(
186                    ClassNamePersistence classNamePersistence) {
187                    this.classNamePersistence = classNamePersistence;
188            }
189    
190            /**
191             * Returns the group local service.
192             *
193             * @return the group local service
194             */
195            public com.liferay.portal.service.GroupLocalService getGroupLocalService() {
196                    return groupLocalService;
197            }
198    
199            /**
200             * Sets the group local service.
201             *
202             * @param groupLocalService the group local service
203             */
204            public void setGroupLocalService(
205                    com.liferay.portal.service.GroupLocalService groupLocalService) {
206                    this.groupLocalService = groupLocalService;
207            }
208    
209            /**
210             * Returns the group remote service.
211             *
212             * @return the group remote service
213             */
214            public com.liferay.portal.service.GroupService getGroupService() {
215                    return groupService;
216            }
217    
218            /**
219             * Sets the group remote service.
220             *
221             * @param groupService the group remote service
222             */
223            public void setGroupService(
224                    com.liferay.portal.service.GroupService groupService) {
225                    this.groupService = groupService;
226            }
227    
228            /**
229             * Returns the group persistence.
230             *
231             * @return the group persistence
232             */
233            public GroupPersistence getGroupPersistence() {
234                    return groupPersistence;
235            }
236    
237            /**
238             * Sets the group persistence.
239             *
240             * @param groupPersistence the group persistence
241             */
242            public void setGroupPersistence(GroupPersistence groupPersistence) {
243                    this.groupPersistence = groupPersistence;
244            }
245    
246            /**
247             * Returns the group finder.
248             *
249             * @return the group finder
250             */
251            public GroupFinder getGroupFinder() {
252                    return groupFinder;
253            }
254    
255            /**
256             * Sets the group finder.
257             *
258             * @param groupFinder the group finder
259             */
260            public void setGroupFinder(GroupFinder groupFinder) {
261                    this.groupFinder = groupFinder;
262            }
263    
264            public void afterPropertiesSet() {
265            }
266    
267            public void destroy() {
268            }
269    
270            /**
271             * Returns the OSGi service identifier.
272             *
273             * @return the OSGi service identifier
274             */
275            @Override
276            public String getOSGiServiceIdentifier() {
277                    return SocialActivitySettingService.class.getName();
278            }
279    
280            protected Class<?> getModelClass() {
281                    return SocialActivitySetting.class;
282            }
283    
284            protected String getModelClassName() {
285                    return SocialActivitySetting.class.getName();
286            }
287    
288            /**
289             * Performs a SQL query.
290             *
291             * @param sql the sql query
292             */
293            protected void runSQL(String sql) {
294                    try {
295                            DataSource dataSource = socialActivitySettingPersistence.getDataSource();
296    
297                            DB db = DBManagerUtil.getDB();
298    
299                            sql = db.buildSQL(sql);
300                            sql = PortalUtil.transformSQL(sql);
301    
302                            SqlUpdate sqlUpdate = SqlUpdateFactoryUtil.getSqlUpdate(dataSource,
303                                            sql, new int[0]);
304    
305                            sqlUpdate.update();
306                    }
307                    catch (Exception e) {
308                            throw new SystemException(e);
309                    }
310            }
311    
312            @BeanReference(type = com.liferay.portlet.social.service.SocialActivitySettingLocalService.class)
313            protected com.liferay.portlet.social.service.SocialActivitySettingLocalService socialActivitySettingLocalService;
314            @BeanReference(type = com.liferay.portlet.social.service.SocialActivitySettingService.class)
315            protected SocialActivitySettingService socialActivitySettingService;
316            @BeanReference(type = SocialActivitySettingPersistence.class)
317            protected SocialActivitySettingPersistence socialActivitySettingPersistence;
318            @BeanReference(type = com.liferay.counter.service.CounterLocalService.class)
319            protected com.liferay.counter.service.CounterLocalService counterLocalService;
320            @BeanReference(type = com.liferay.portal.service.ClassNameLocalService.class)
321            protected com.liferay.portal.service.ClassNameLocalService classNameLocalService;
322            @BeanReference(type = com.liferay.portal.service.ClassNameService.class)
323            protected com.liferay.portal.service.ClassNameService classNameService;
324            @BeanReference(type = ClassNamePersistence.class)
325            protected ClassNamePersistence classNamePersistence;
326            @BeanReference(type = com.liferay.portal.service.GroupLocalService.class)
327            protected com.liferay.portal.service.GroupLocalService groupLocalService;
328            @BeanReference(type = com.liferay.portal.service.GroupService.class)
329            protected com.liferay.portal.service.GroupService groupService;
330            @BeanReference(type = GroupPersistence.class)
331            protected GroupPersistence groupPersistence;
332            @BeanReference(type = GroupFinder.class)
333            protected GroupFinder groupFinder;
334    }