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.expando.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.expando.model.ExpandoValue;
031    import com.liferay.portlet.expando.service.ExpandoValueService;
032    import com.liferay.portlet.expando.service.persistence.ExpandoColumnPersistence;
033    import com.liferay.portlet.expando.service.persistence.ExpandoRowPersistence;
034    import com.liferay.portlet.expando.service.persistence.ExpandoTablePersistence;
035    import com.liferay.portlet.expando.service.persistence.ExpandoValuePersistence;
036    
037    import javax.sql.DataSource;
038    
039    /**
040     * Provides the base implementation for the expando value remote service.
041     *
042     * <p>
043     * 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.expando.service.impl.ExpandoValueServiceImpl}.
044     * </p>
045     *
046     * @author Brian Wing Shun Chan
047     * @see com.liferay.portlet.expando.service.impl.ExpandoValueServiceImpl
048     * @see com.liferay.portlet.expando.service.ExpandoValueServiceUtil
049     * @generated
050     */
051    public abstract class ExpandoValueServiceBaseImpl extends BaseServiceImpl
052            implements ExpandoValueService, IdentifiableOSGiService {
053            /*
054             * NOTE FOR DEVELOPERS:
055             *
056             * Never modify or reference this class directly. Always use {@link com.liferay.portlet.expando.service.ExpandoValueServiceUtil} to access the expando value remote service.
057             */
058    
059            /**
060             * Returns the expando column local service.
061             *
062             * @return the expando column local service
063             */
064            public com.liferay.portlet.expando.service.ExpandoColumnLocalService getExpandoColumnLocalService() {
065                    return expandoColumnLocalService;
066            }
067    
068            /**
069             * Sets the expando column local service.
070             *
071             * @param expandoColumnLocalService the expando column local service
072             */
073            public void setExpandoColumnLocalService(
074                    com.liferay.portlet.expando.service.ExpandoColumnLocalService expandoColumnLocalService) {
075                    this.expandoColumnLocalService = expandoColumnLocalService;
076            }
077    
078            /**
079             * Returns the expando column remote service.
080             *
081             * @return the expando column remote service
082             */
083            public com.liferay.portlet.expando.service.ExpandoColumnService getExpandoColumnService() {
084                    return expandoColumnService;
085            }
086    
087            /**
088             * Sets the expando column remote service.
089             *
090             * @param expandoColumnService the expando column remote service
091             */
092            public void setExpandoColumnService(
093                    com.liferay.portlet.expando.service.ExpandoColumnService expandoColumnService) {
094                    this.expandoColumnService = expandoColumnService;
095            }
096    
097            /**
098             * Returns the expando column persistence.
099             *
100             * @return the expando column persistence
101             */
102            public ExpandoColumnPersistence getExpandoColumnPersistence() {
103                    return expandoColumnPersistence;
104            }
105    
106            /**
107             * Sets the expando column persistence.
108             *
109             * @param expandoColumnPersistence the expando column persistence
110             */
111            public void setExpandoColumnPersistence(
112                    ExpandoColumnPersistence expandoColumnPersistence) {
113                    this.expandoColumnPersistence = expandoColumnPersistence;
114            }
115    
116            /**
117             * Returns the expando row local service.
118             *
119             * @return the expando row local service
120             */
121            public com.liferay.portlet.expando.service.ExpandoRowLocalService getExpandoRowLocalService() {
122                    return expandoRowLocalService;
123            }
124    
125            /**
126             * Sets the expando row local service.
127             *
128             * @param expandoRowLocalService the expando row local service
129             */
130            public void setExpandoRowLocalService(
131                    com.liferay.portlet.expando.service.ExpandoRowLocalService expandoRowLocalService) {
132                    this.expandoRowLocalService = expandoRowLocalService;
133            }
134    
135            /**
136             * Returns the expando row persistence.
137             *
138             * @return the expando row persistence
139             */
140            public ExpandoRowPersistence getExpandoRowPersistence() {
141                    return expandoRowPersistence;
142            }
143    
144            /**
145             * Sets the expando row persistence.
146             *
147             * @param expandoRowPersistence the expando row persistence
148             */
149            public void setExpandoRowPersistence(
150                    ExpandoRowPersistence expandoRowPersistence) {
151                    this.expandoRowPersistence = expandoRowPersistence;
152            }
153    
154            /**
155             * Returns the expando table local service.
156             *
157             * @return the expando table local service
158             */
159            public com.liferay.portlet.expando.service.ExpandoTableLocalService getExpandoTableLocalService() {
160                    return expandoTableLocalService;
161            }
162    
163            /**
164             * Sets the expando table local service.
165             *
166             * @param expandoTableLocalService the expando table local service
167             */
168            public void setExpandoTableLocalService(
169                    com.liferay.portlet.expando.service.ExpandoTableLocalService expandoTableLocalService) {
170                    this.expandoTableLocalService = expandoTableLocalService;
171            }
172    
173            /**
174             * Returns the expando table persistence.
175             *
176             * @return the expando table persistence
177             */
178            public ExpandoTablePersistence getExpandoTablePersistence() {
179                    return expandoTablePersistence;
180            }
181    
182            /**
183             * Sets the expando table persistence.
184             *
185             * @param expandoTablePersistence the expando table persistence
186             */
187            public void setExpandoTablePersistence(
188                    ExpandoTablePersistence expandoTablePersistence) {
189                    this.expandoTablePersistence = expandoTablePersistence;
190            }
191    
192            /**
193             * Returns the expando value local service.
194             *
195             * @return the expando value local service
196             */
197            public com.liferay.portlet.expando.service.ExpandoValueLocalService getExpandoValueLocalService() {
198                    return expandoValueLocalService;
199            }
200    
201            /**
202             * Sets the expando value local service.
203             *
204             * @param expandoValueLocalService the expando value local service
205             */
206            public void setExpandoValueLocalService(
207                    com.liferay.portlet.expando.service.ExpandoValueLocalService expandoValueLocalService) {
208                    this.expandoValueLocalService = expandoValueLocalService;
209            }
210    
211            /**
212             * Returns the expando value remote service.
213             *
214             * @return the expando value remote service
215             */
216            public ExpandoValueService getExpandoValueService() {
217                    return expandoValueService;
218            }
219    
220            /**
221             * Sets the expando value remote service.
222             *
223             * @param expandoValueService the expando value remote service
224             */
225            public void setExpandoValueService(ExpandoValueService expandoValueService) {
226                    this.expandoValueService = expandoValueService;
227            }
228    
229            /**
230             * Returns the expando value persistence.
231             *
232             * @return the expando value persistence
233             */
234            public ExpandoValuePersistence getExpandoValuePersistence() {
235                    return expandoValuePersistence;
236            }
237    
238            /**
239             * Sets the expando value persistence.
240             *
241             * @param expandoValuePersistence the expando value persistence
242             */
243            public void setExpandoValuePersistence(
244                    ExpandoValuePersistence expandoValuePersistence) {
245                    this.expandoValuePersistence = expandoValuePersistence;
246            }
247    
248            /**
249             * Returns the counter local service.
250             *
251             * @return the counter local service
252             */
253            public com.liferay.counter.service.CounterLocalService getCounterLocalService() {
254                    return counterLocalService;
255            }
256    
257            /**
258             * Sets the counter local service.
259             *
260             * @param counterLocalService the counter local service
261             */
262            public void setCounterLocalService(
263                    com.liferay.counter.service.CounterLocalService counterLocalService) {
264                    this.counterLocalService = counterLocalService;
265            }
266    
267            /**
268             * Returns the class name local service.
269             *
270             * @return the class name local service
271             */
272            public com.liferay.portal.service.ClassNameLocalService getClassNameLocalService() {
273                    return classNameLocalService;
274            }
275    
276            /**
277             * Sets the class name local service.
278             *
279             * @param classNameLocalService the class name local service
280             */
281            public void setClassNameLocalService(
282                    com.liferay.portal.service.ClassNameLocalService classNameLocalService) {
283                    this.classNameLocalService = classNameLocalService;
284            }
285    
286            /**
287             * Returns the class name remote service.
288             *
289             * @return the class name remote service
290             */
291            public com.liferay.portal.service.ClassNameService getClassNameService() {
292                    return classNameService;
293            }
294    
295            /**
296             * Sets the class name remote service.
297             *
298             * @param classNameService the class name remote service
299             */
300            public void setClassNameService(
301                    com.liferay.portal.service.ClassNameService classNameService) {
302                    this.classNameService = classNameService;
303            }
304    
305            /**
306             * Returns the class name persistence.
307             *
308             * @return the class name persistence
309             */
310            public ClassNamePersistence getClassNamePersistence() {
311                    return classNamePersistence;
312            }
313    
314            /**
315             * Sets the class name persistence.
316             *
317             * @param classNamePersistence the class name persistence
318             */
319            public void setClassNamePersistence(
320                    ClassNamePersistence classNamePersistence) {
321                    this.classNamePersistence = classNamePersistence;
322            }
323    
324            /**
325             * Returns the resource local service.
326             *
327             * @return the resource local service
328             */
329            public com.liferay.portal.service.ResourceLocalService getResourceLocalService() {
330                    return resourceLocalService;
331            }
332    
333            /**
334             * Sets the resource local service.
335             *
336             * @param resourceLocalService the resource local service
337             */
338            public void setResourceLocalService(
339                    com.liferay.portal.service.ResourceLocalService resourceLocalService) {
340                    this.resourceLocalService = resourceLocalService;
341            }
342    
343            /**
344             * Returns the user local service.
345             *
346             * @return the user local service
347             */
348            public com.liferay.portal.service.UserLocalService getUserLocalService() {
349                    return userLocalService;
350            }
351    
352            /**
353             * Sets the user local service.
354             *
355             * @param userLocalService the user local service
356             */
357            public void setUserLocalService(
358                    com.liferay.portal.service.UserLocalService userLocalService) {
359                    this.userLocalService = userLocalService;
360            }
361    
362            /**
363             * Returns the user remote service.
364             *
365             * @return the user remote service
366             */
367            public com.liferay.portal.service.UserService getUserService() {
368                    return userService;
369            }
370    
371            /**
372             * Sets the user remote service.
373             *
374             * @param userService the user remote service
375             */
376            public void setUserService(
377                    com.liferay.portal.service.UserService userService) {
378                    this.userService = userService;
379            }
380    
381            /**
382             * Returns the user persistence.
383             *
384             * @return the user persistence
385             */
386            public UserPersistence getUserPersistence() {
387                    return userPersistence;
388            }
389    
390            /**
391             * Sets the user persistence.
392             *
393             * @param userPersistence the user persistence
394             */
395            public void setUserPersistence(UserPersistence userPersistence) {
396                    this.userPersistence = userPersistence;
397            }
398    
399            /**
400             * Returns the user finder.
401             *
402             * @return the user finder
403             */
404            public UserFinder getUserFinder() {
405                    return userFinder;
406            }
407    
408            /**
409             * Sets the user finder.
410             *
411             * @param userFinder the user finder
412             */
413            public void setUserFinder(UserFinder userFinder) {
414                    this.userFinder = userFinder;
415            }
416    
417            public void afterPropertiesSet() {
418            }
419    
420            public void destroy() {
421            }
422    
423            /**
424             * Returns the OSGi service identifier.
425             *
426             * @return the OSGi service identifier
427             */
428            @Override
429            public String getOSGiServiceIdentifier() {
430                    return ExpandoValueService.class.getName();
431            }
432    
433            protected Class<?> getModelClass() {
434                    return ExpandoValue.class;
435            }
436    
437            protected String getModelClassName() {
438                    return ExpandoValue.class.getName();
439            }
440    
441            /**
442             * Performs a SQL query.
443             *
444             * @param sql the sql query
445             */
446            protected void runSQL(String sql) {
447                    try {
448                            DataSource dataSource = expandoValuePersistence.getDataSource();
449    
450                            DB db = DBManagerUtil.getDB();
451    
452                            sql = db.buildSQL(sql);
453                            sql = PortalUtil.transformSQL(sql);
454    
455                            SqlUpdate sqlUpdate = SqlUpdateFactoryUtil.getSqlUpdate(dataSource,
456                                            sql, new int[0]);
457    
458                            sqlUpdate.update();
459                    }
460                    catch (Exception e) {
461                            throw new SystemException(e);
462                    }
463            }
464    
465            @BeanReference(type = com.liferay.portlet.expando.service.ExpandoColumnLocalService.class)
466            protected com.liferay.portlet.expando.service.ExpandoColumnLocalService expandoColumnLocalService;
467            @BeanReference(type = com.liferay.portlet.expando.service.ExpandoColumnService.class)
468            protected com.liferay.portlet.expando.service.ExpandoColumnService expandoColumnService;
469            @BeanReference(type = ExpandoColumnPersistence.class)
470            protected ExpandoColumnPersistence expandoColumnPersistence;
471            @BeanReference(type = com.liferay.portlet.expando.service.ExpandoRowLocalService.class)
472            protected com.liferay.portlet.expando.service.ExpandoRowLocalService expandoRowLocalService;
473            @BeanReference(type = ExpandoRowPersistence.class)
474            protected ExpandoRowPersistence expandoRowPersistence;
475            @BeanReference(type = com.liferay.portlet.expando.service.ExpandoTableLocalService.class)
476            protected com.liferay.portlet.expando.service.ExpandoTableLocalService expandoTableLocalService;
477            @BeanReference(type = ExpandoTablePersistence.class)
478            protected ExpandoTablePersistence expandoTablePersistence;
479            @BeanReference(type = com.liferay.portlet.expando.service.ExpandoValueLocalService.class)
480            protected com.liferay.portlet.expando.service.ExpandoValueLocalService expandoValueLocalService;
481            @BeanReference(type = com.liferay.portlet.expando.service.ExpandoValueService.class)
482            protected ExpandoValueService expandoValueService;
483            @BeanReference(type = ExpandoValuePersistence.class)
484            protected ExpandoValuePersistence expandoValuePersistence;
485            @BeanReference(type = com.liferay.counter.service.CounterLocalService.class)
486            protected com.liferay.counter.service.CounterLocalService counterLocalService;
487            @BeanReference(type = com.liferay.portal.service.ClassNameLocalService.class)
488            protected com.liferay.portal.service.ClassNameLocalService classNameLocalService;
489            @BeanReference(type = com.liferay.portal.service.ClassNameService.class)
490            protected com.liferay.portal.service.ClassNameService classNameService;
491            @BeanReference(type = ClassNamePersistence.class)
492            protected ClassNamePersistence classNamePersistence;
493            @BeanReference(type = com.liferay.portal.service.ResourceLocalService.class)
494            protected com.liferay.portal.service.ResourceLocalService resourceLocalService;
495            @BeanReference(type = com.liferay.portal.service.UserLocalService.class)
496            protected com.liferay.portal.service.UserLocalService userLocalService;
497            @BeanReference(type = com.liferay.portal.service.UserService.class)
498            protected com.liferay.portal.service.UserService userService;
499            @BeanReference(type = UserPersistence.class)
500            protected UserPersistence userPersistence;
501            @BeanReference(type = UserFinder.class)
502            protected UserFinder userFinder;
503    }