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