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.expando.kernel.model.ExpandoColumn;
018    import com.liferay.expando.kernel.service.ExpandoColumnService;
019    import com.liferay.expando.kernel.service.persistence.ExpandoColumnPersistence;
020    import com.liferay.expando.kernel.service.persistence.ExpandoRowPersistence;
021    import com.liferay.expando.kernel.service.persistence.ExpandoTablePersistence;
022    import com.liferay.expando.kernel.service.persistence.ExpandoValuePersistence;
023    
024    import com.liferay.portal.kernel.bean.BeanReference;
025    import com.liferay.portal.kernel.dao.db.DB;
026    import com.liferay.portal.kernel.dao.db.DBManagerUtil;
027    import com.liferay.portal.kernel.dao.jdbc.SqlUpdate;
028    import com.liferay.portal.kernel.dao.jdbc.SqlUpdateFactoryUtil;
029    import com.liferay.portal.kernel.exception.SystemException;
030    import com.liferay.portal.kernel.module.framework.service.IdentifiableOSGiService;
031    import com.liferay.portal.kernel.service.BaseServiceImpl;
032    import com.liferay.portal.kernel.service.persistence.ClassNamePersistence;
033    import com.liferay.portal.kernel.service.persistence.UserFinder;
034    import com.liferay.portal.kernel.service.persistence.UserPersistence;
035    import com.liferay.portal.kernel.util.PortalUtil;
036    
037    import javax.sql.DataSource;
038    
039    /**
040     * Provides the base implementation for the expando column 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.ExpandoColumnServiceImpl}.
044     * </p>
045     *
046     * @author Brian Wing Shun Chan
047     * @see com.liferay.portlet.expando.service.impl.ExpandoColumnServiceImpl
048     * @see com.liferay.expando.kernel.service.ExpandoColumnServiceUtil
049     * @generated
050     */
051    public abstract class ExpandoColumnServiceBaseImpl extends BaseServiceImpl
052            implements ExpandoColumnService, IdentifiableOSGiService {
053            /*
054             * NOTE FOR DEVELOPERS:
055             *
056             * Never modify or reference this class directly. Always use {@link com.liferay.expando.kernel.service.ExpandoColumnServiceUtil} to access the expando column 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.expando.kernel.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.expando.kernel.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 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                    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.expando.kernel.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.expando.kernel.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.expando.kernel.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.expando.kernel.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.expando.kernel.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.expando.kernel.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 com.liferay.expando.kernel.service.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(
226                    com.liferay.expando.kernel.service.ExpandoValueService expandoValueService) {
227                    this.expandoValueService = expandoValueService;
228            }
229    
230            /**
231             * Returns the expando value persistence.
232             *
233             * @return the expando value persistence
234             */
235            public ExpandoValuePersistence getExpandoValuePersistence() {
236                    return expandoValuePersistence;
237            }
238    
239            /**
240             * Sets the expando value persistence.
241             *
242             * @param expandoValuePersistence the expando value persistence
243             */
244            public void setExpandoValuePersistence(
245                    ExpandoValuePersistence expandoValuePersistence) {
246                    this.expandoValuePersistence = expandoValuePersistence;
247            }
248    
249            /**
250             * Returns the counter local service.
251             *
252             * @return the counter local service
253             */
254            public com.liferay.counter.kernel.service.CounterLocalService getCounterLocalService() {
255                    return counterLocalService;
256            }
257    
258            /**
259             * Sets the counter local service.
260             *
261             * @param counterLocalService the counter local service
262             */
263            public void setCounterLocalService(
264                    com.liferay.counter.kernel.service.CounterLocalService counterLocalService) {
265                    this.counterLocalService = counterLocalService;
266            }
267    
268            /**
269             * Returns the class name local service.
270             *
271             * @return the class name local service
272             */
273            public com.liferay.portal.kernel.service.ClassNameLocalService getClassNameLocalService() {
274                    return classNameLocalService;
275            }
276    
277            /**
278             * Sets the class name local service.
279             *
280             * @param classNameLocalService the class name local service
281             */
282            public void setClassNameLocalService(
283                    com.liferay.portal.kernel.service.ClassNameLocalService classNameLocalService) {
284                    this.classNameLocalService = classNameLocalService;
285            }
286    
287            /**
288             * Returns the class name remote service.
289             *
290             * @return the class name remote service
291             */
292            public com.liferay.portal.kernel.service.ClassNameService getClassNameService() {
293                    return classNameService;
294            }
295    
296            /**
297             * Sets the class name remote service.
298             *
299             * @param classNameService the class name remote service
300             */
301            public void setClassNameService(
302                    com.liferay.portal.kernel.service.ClassNameService classNameService) {
303                    this.classNameService = classNameService;
304            }
305    
306            /**
307             * Returns the class name persistence.
308             *
309             * @return the class name persistence
310             */
311            public ClassNamePersistence getClassNamePersistence() {
312                    return classNamePersistence;
313            }
314    
315            /**
316             * Sets the class name persistence.
317             *
318             * @param classNamePersistence the class name persistence
319             */
320            public void setClassNamePersistence(
321                    ClassNamePersistence classNamePersistence) {
322                    this.classNamePersistence = classNamePersistence;
323            }
324    
325            /**
326             * Returns the resource local service.
327             *
328             * @return the resource local service
329             */
330            public com.liferay.portal.kernel.service.ResourceLocalService getResourceLocalService() {
331                    return resourceLocalService;
332            }
333    
334            /**
335             * Sets the resource local service.
336             *
337             * @param resourceLocalService the resource local service
338             */
339            public void setResourceLocalService(
340                    com.liferay.portal.kernel.service.ResourceLocalService resourceLocalService) {
341                    this.resourceLocalService = resourceLocalService;
342            }
343    
344            /**
345             * Returns the user local service.
346             *
347             * @return the user local service
348             */
349            public com.liferay.portal.kernel.service.UserLocalService getUserLocalService() {
350                    return userLocalService;
351            }
352    
353            /**
354             * Sets the user local service.
355             *
356             * @param userLocalService the user local service
357             */
358            public void setUserLocalService(
359                    com.liferay.portal.kernel.service.UserLocalService userLocalService) {
360                    this.userLocalService = userLocalService;
361            }
362    
363            /**
364             * Returns the user remote service.
365             *
366             * @return the user remote service
367             */
368            public com.liferay.portal.kernel.service.UserService getUserService() {
369                    return userService;
370            }
371    
372            /**
373             * Sets the user remote service.
374             *
375             * @param userService the user remote service
376             */
377            public void setUserService(
378                    com.liferay.portal.kernel.service.UserService userService) {
379                    this.userService = userService;
380            }
381    
382            /**
383             * Returns the user persistence.
384             *
385             * @return the user persistence
386             */
387            public UserPersistence getUserPersistence() {
388                    return userPersistence;
389            }
390    
391            /**
392             * Sets the user persistence.
393             *
394             * @param userPersistence the user persistence
395             */
396            public void setUserPersistence(UserPersistence userPersistence) {
397                    this.userPersistence = userPersistence;
398            }
399    
400            /**
401             * Returns the user finder.
402             *
403             * @return the user finder
404             */
405            public UserFinder getUserFinder() {
406                    return userFinder;
407            }
408    
409            /**
410             * Sets the user finder.
411             *
412             * @param userFinder the user finder
413             */
414            public void setUserFinder(UserFinder userFinder) {
415                    this.userFinder = userFinder;
416            }
417    
418            public void afterPropertiesSet() {
419            }
420    
421            public void destroy() {
422            }
423    
424            /**
425             * Returns the OSGi service identifier.
426             *
427             * @return the OSGi service identifier
428             */
429            @Override
430            public String getOSGiServiceIdentifier() {
431                    return ExpandoColumnService.class.getName();
432            }
433    
434            protected Class<?> getModelClass() {
435                    return ExpandoColumn.class;
436            }
437    
438            protected String getModelClassName() {
439                    return ExpandoColumn.class.getName();
440            }
441    
442            /**
443             * Performs a SQL query.
444             *
445             * @param sql the sql query
446             */
447            protected void runSQL(String sql) {
448                    try {
449                            DataSource dataSource = expandoColumnPersistence.getDataSource();
450    
451                            DB db = DBManagerUtil.getDB();
452    
453                            sql = db.buildSQL(sql);
454                            sql = PortalUtil.transformSQL(sql);
455    
456                            SqlUpdate sqlUpdate = SqlUpdateFactoryUtil.getSqlUpdate(dataSource,
457                                            sql);
458    
459                            sqlUpdate.update();
460                    }
461                    catch (Exception e) {
462                            throw new SystemException(e);
463                    }
464            }
465    
466            @BeanReference(type = com.liferay.expando.kernel.service.ExpandoColumnLocalService.class)
467            protected com.liferay.expando.kernel.service.ExpandoColumnLocalService expandoColumnLocalService;
468            @BeanReference(type = ExpandoColumnService.class)
469            protected ExpandoColumnService expandoColumnService;
470            @BeanReference(type = ExpandoColumnPersistence.class)
471            protected ExpandoColumnPersistence expandoColumnPersistence;
472            @BeanReference(type = com.liferay.expando.kernel.service.ExpandoRowLocalService.class)
473            protected com.liferay.expando.kernel.service.ExpandoRowLocalService expandoRowLocalService;
474            @BeanReference(type = ExpandoRowPersistence.class)
475            protected ExpandoRowPersistence expandoRowPersistence;
476            @BeanReference(type = com.liferay.expando.kernel.service.ExpandoTableLocalService.class)
477            protected com.liferay.expando.kernel.service.ExpandoTableLocalService expandoTableLocalService;
478            @BeanReference(type = ExpandoTablePersistence.class)
479            protected ExpandoTablePersistence expandoTablePersistence;
480            @BeanReference(type = com.liferay.expando.kernel.service.ExpandoValueLocalService.class)
481            protected com.liferay.expando.kernel.service.ExpandoValueLocalService expandoValueLocalService;
482            @BeanReference(type = com.liferay.expando.kernel.service.ExpandoValueService.class)
483            protected com.liferay.expando.kernel.service.ExpandoValueService expandoValueService;
484            @BeanReference(type = ExpandoValuePersistence.class)
485            protected ExpandoValuePersistence expandoValuePersistence;
486            @BeanReference(type = com.liferay.counter.kernel.service.CounterLocalService.class)
487            protected com.liferay.counter.kernel.service.CounterLocalService counterLocalService;
488            @BeanReference(type = com.liferay.portal.kernel.service.ClassNameLocalService.class)
489            protected com.liferay.portal.kernel.service.ClassNameLocalService classNameLocalService;
490            @BeanReference(type = com.liferay.portal.kernel.service.ClassNameService.class)
491            protected com.liferay.portal.kernel.service.ClassNameService classNameService;
492            @BeanReference(type = ClassNamePersistence.class)
493            protected ClassNamePersistence classNamePersistence;
494            @BeanReference(type = com.liferay.portal.kernel.service.ResourceLocalService.class)
495            protected com.liferay.portal.kernel.service.ResourceLocalService resourceLocalService;
496            @BeanReference(type = com.liferay.portal.kernel.service.UserLocalService.class)
497            protected com.liferay.portal.kernel.service.UserLocalService userLocalService;
498            @BeanReference(type = com.liferay.portal.kernel.service.UserService.class)
499            protected com.liferay.portal.kernel.service.UserService userService;
500            @BeanReference(type = UserPersistence.class)
501            protected UserPersistence userPersistence;
502            @BeanReference(type = UserFinder.class)
503            protected UserFinder userFinder;
504    }