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