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.bookmarks.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.asset.service.AssetEntryLocalService;
034    import com.liferay.portlet.asset.service.AssetEntryService;
035    import com.liferay.portlet.asset.service.AssetTagLocalService;
036    import com.liferay.portlet.asset.service.AssetTagService;
037    import com.liferay.portlet.asset.service.persistence.AssetEntryFinder;
038    import com.liferay.portlet.asset.service.persistence.AssetEntryPersistence;
039    import com.liferay.portlet.asset.service.persistence.AssetTagFinder;
040    import com.liferay.portlet.asset.service.persistence.AssetTagPersistence;
041    import com.liferay.portlet.bookmarks.service.BookmarksEntryLocalService;
042    import com.liferay.portlet.bookmarks.service.BookmarksEntryService;
043    import com.liferay.portlet.bookmarks.service.BookmarksFolderLocalService;
044    import com.liferay.portlet.bookmarks.service.BookmarksFolderService;
045    import com.liferay.portlet.bookmarks.service.persistence.BookmarksEntryFinder;
046    import com.liferay.portlet.bookmarks.service.persistence.BookmarksEntryPersistence;
047    import com.liferay.portlet.bookmarks.service.persistence.BookmarksFolderPersistence;
048    import com.liferay.portlet.expando.service.ExpandoValueLocalService;
049    import com.liferay.portlet.expando.service.ExpandoValueService;
050    import com.liferay.portlet.expando.service.persistence.ExpandoValuePersistence;
051    
052    import javax.sql.DataSource;
053    
054    /**
055     * @author Brian Wing Shun Chan
056     */
057    public abstract class BookmarksEntryServiceBaseImpl extends PrincipalBean
058            implements BookmarksEntryService {
059            public BookmarksEntryLocalService getBookmarksEntryLocalService() {
060                    return bookmarksEntryLocalService;
061            }
062    
063            public void setBookmarksEntryLocalService(
064                    BookmarksEntryLocalService bookmarksEntryLocalService) {
065                    this.bookmarksEntryLocalService = bookmarksEntryLocalService;
066            }
067    
068            public BookmarksEntryService getBookmarksEntryService() {
069                    return bookmarksEntryService;
070            }
071    
072            public void setBookmarksEntryService(
073                    BookmarksEntryService bookmarksEntryService) {
074                    this.bookmarksEntryService = bookmarksEntryService;
075            }
076    
077            public BookmarksEntryPersistence getBookmarksEntryPersistence() {
078                    return bookmarksEntryPersistence;
079            }
080    
081            public void setBookmarksEntryPersistence(
082                    BookmarksEntryPersistence bookmarksEntryPersistence) {
083                    this.bookmarksEntryPersistence = bookmarksEntryPersistence;
084            }
085    
086            public BookmarksEntryFinder getBookmarksEntryFinder() {
087                    return bookmarksEntryFinder;
088            }
089    
090            public void setBookmarksEntryFinder(
091                    BookmarksEntryFinder bookmarksEntryFinder) {
092                    this.bookmarksEntryFinder = bookmarksEntryFinder;
093            }
094    
095            public BookmarksFolderLocalService getBookmarksFolderLocalService() {
096                    return bookmarksFolderLocalService;
097            }
098    
099            public void setBookmarksFolderLocalService(
100                    BookmarksFolderLocalService bookmarksFolderLocalService) {
101                    this.bookmarksFolderLocalService = bookmarksFolderLocalService;
102            }
103    
104            public BookmarksFolderService getBookmarksFolderService() {
105                    return bookmarksFolderService;
106            }
107    
108            public void setBookmarksFolderService(
109                    BookmarksFolderService bookmarksFolderService) {
110                    this.bookmarksFolderService = bookmarksFolderService;
111            }
112    
113            public BookmarksFolderPersistence getBookmarksFolderPersistence() {
114                    return bookmarksFolderPersistence;
115            }
116    
117            public void setBookmarksFolderPersistence(
118                    BookmarksFolderPersistence bookmarksFolderPersistence) {
119                    this.bookmarksFolderPersistence = bookmarksFolderPersistence;
120            }
121    
122            public CounterLocalService getCounterLocalService() {
123                    return counterLocalService;
124            }
125    
126            public void setCounterLocalService(CounterLocalService counterLocalService) {
127                    this.counterLocalService = counterLocalService;
128            }
129    
130            public ResourceLocalService getResourceLocalService() {
131                    return resourceLocalService;
132            }
133    
134            public void setResourceLocalService(
135                    ResourceLocalService resourceLocalService) {
136                    this.resourceLocalService = resourceLocalService;
137            }
138    
139            public ResourceService getResourceService() {
140                    return resourceService;
141            }
142    
143            public void setResourceService(ResourceService resourceService) {
144                    this.resourceService = resourceService;
145            }
146    
147            public ResourcePersistence getResourcePersistence() {
148                    return resourcePersistence;
149            }
150    
151            public void setResourcePersistence(ResourcePersistence resourcePersistence) {
152                    this.resourcePersistence = resourcePersistence;
153            }
154    
155            public ResourceFinder getResourceFinder() {
156                    return resourceFinder;
157            }
158    
159            public void setResourceFinder(ResourceFinder resourceFinder) {
160                    this.resourceFinder = resourceFinder;
161            }
162    
163            public UserLocalService getUserLocalService() {
164                    return userLocalService;
165            }
166    
167            public void setUserLocalService(UserLocalService userLocalService) {
168                    this.userLocalService = userLocalService;
169            }
170    
171            public UserService getUserService() {
172                    return userService;
173            }
174    
175            public void setUserService(UserService userService) {
176                    this.userService = userService;
177            }
178    
179            public UserPersistence getUserPersistence() {
180                    return userPersistence;
181            }
182    
183            public void setUserPersistence(UserPersistence userPersistence) {
184                    this.userPersistence = userPersistence;
185            }
186    
187            public UserFinder getUserFinder() {
188                    return userFinder;
189            }
190    
191            public void setUserFinder(UserFinder userFinder) {
192                    this.userFinder = userFinder;
193            }
194    
195            public AssetEntryLocalService getAssetEntryLocalService() {
196                    return assetEntryLocalService;
197            }
198    
199            public void setAssetEntryLocalService(
200                    AssetEntryLocalService assetEntryLocalService) {
201                    this.assetEntryLocalService = assetEntryLocalService;
202            }
203    
204            public AssetEntryService getAssetEntryService() {
205                    return assetEntryService;
206            }
207    
208            public void setAssetEntryService(AssetEntryService assetEntryService) {
209                    this.assetEntryService = assetEntryService;
210            }
211    
212            public AssetEntryPersistence getAssetEntryPersistence() {
213                    return assetEntryPersistence;
214            }
215    
216            public void setAssetEntryPersistence(
217                    AssetEntryPersistence assetEntryPersistence) {
218                    this.assetEntryPersistence = assetEntryPersistence;
219            }
220    
221            public AssetEntryFinder getAssetEntryFinder() {
222                    return assetEntryFinder;
223            }
224    
225            public void setAssetEntryFinder(AssetEntryFinder assetEntryFinder) {
226                    this.assetEntryFinder = assetEntryFinder;
227            }
228    
229            public AssetTagLocalService getAssetTagLocalService() {
230                    return assetTagLocalService;
231            }
232    
233            public void setAssetTagLocalService(
234                    AssetTagLocalService assetTagLocalService) {
235                    this.assetTagLocalService = assetTagLocalService;
236            }
237    
238            public AssetTagService getAssetTagService() {
239                    return assetTagService;
240            }
241    
242            public void setAssetTagService(AssetTagService assetTagService) {
243                    this.assetTagService = assetTagService;
244            }
245    
246            public AssetTagPersistence getAssetTagPersistence() {
247                    return assetTagPersistence;
248            }
249    
250            public void setAssetTagPersistence(AssetTagPersistence assetTagPersistence) {
251                    this.assetTagPersistence = assetTagPersistence;
252            }
253    
254            public AssetTagFinder getAssetTagFinder() {
255                    return assetTagFinder;
256            }
257    
258            public void setAssetTagFinder(AssetTagFinder assetTagFinder) {
259                    this.assetTagFinder = assetTagFinder;
260            }
261    
262            public ExpandoValueLocalService getExpandoValueLocalService() {
263                    return expandoValueLocalService;
264            }
265    
266            public void setExpandoValueLocalService(
267                    ExpandoValueLocalService expandoValueLocalService) {
268                    this.expandoValueLocalService = expandoValueLocalService;
269            }
270    
271            public ExpandoValueService getExpandoValueService() {
272                    return expandoValueService;
273            }
274    
275            public void setExpandoValueService(ExpandoValueService expandoValueService) {
276                    this.expandoValueService = expandoValueService;
277            }
278    
279            public ExpandoValuePersistence getExpandoValuePersistence() {
280                    return expandoValuePersistence;
281            }
282    
283            public void setExpandoValuePersistence(
284                    ExpandoValuePersistence expandoValuePersistence) {
285                    this.expandoValuePersistence = expandoValuePersistence;
286            }
287    
288            protected void runSQL(String sql) throws SystemException {
289                    try {
290                            DataSource dataSource = bookmarksEntryPersistence.getDataSource();
291    
292                            SqlUpdate sqlUpdate = SqlUpdateFactoryUtil.getSqlUpdate(dataSource,
293                                            sql, new int[0]);
294    
295                            sqlUpdate.update();
296                    }
297                    catch (Exception e) {
298                            throw new SystemException(e);
299                    }
300            }
301    
302            @BeanReference(type = BookmarksEntryLocalService.class)
303            protected BookmarksEntryLocalService bookmarksEntryLocalService;
304            @BeanReference(type = BookmarksEntryService.class)
305            protected BookmarksEntryService bookmarksEntryService;
306            @BeanReference(type = BookmarksEntryPersistence.class)
307            protected BookmarksEntryPersistence bookmarksEntryPersistence;
308            @BeanReference(type = BookmarksEntryFinder.class)
309            protected BookmarksEntryFinder bookmarksEntryFinder;
310            @BeanReference(type = BookmarksFolderLocalService.class)
311            protected BookmarksFolderLocalService bookmarksFolderLocalService;
312            @BeanReference(type = BookmarksFolderService.class)
313            protected BookmarksFolderService bookmarksFolderService;
314            @BeanReference(type = BookmarksFolderPersistence.class)
315            protected BookmarksFolderPersistence bookmarksFolderPersistence;
316            @BeanReference(type = CounterLocalService.class)
317            protected CounterLocalService counterLocalService;
318            @BeanReference(type = ResourceLocalService.class)
319            protected ResourceLocalService resourceLocalService;
320            @BeanReference(type = ResourceService.class)
321            protected ResourceService resourceService;
322            @BeanReference(type = ResourcePersistence.class)
323            protected ResourcePersistence resourcePersistence;
324            @BeanReference(type = ResourceFinder.class)
325            protected ResourceFinder resourceFinder;
326            @BeanReference(type = UserLocalService.class)
327            protected UserLocalService userLocalService;
328            @BeanReference(type = UserService.class)
329            protected UserService userService;
330            @BeanReference(type = UserPersistence.class)
331            protected UserPersistence userPersistence;
332            @BeanReference(type = UserFinder.class)
333            protected UserFinder userFinder;
334            @BeanReference(type = AssetEntryLocalService.class)
335            protected AssetEntryLocalService assetEntryLocalService;
336            @BeanReference(type = AssetEntryService.class)
337            protected AssetEntryService assetEntryService;
338            @BeanReference(type = AssetEntryPersistence.class)
339            protected AssetEntryPersistence assetEntryPersistence;
340            @BeanReference(type = AssetEntryFinder.class)
341            protected AssetEntryFinder assetEntryFinder;
342            @BeanReference(type = AssetTagLocalService.class)
343            protected AssetTagLocalService assetTagLocalService;
344            @BeanReference(type = AssetTagService.class)
345            protected AssetTagService assetTagService;
346            @BeanReference(type = AssetTagPersistence.class)
347            protected AssetTagPersistence assetTagPersistence;
348            @BeanReference(type = AssetTagFinder.class)
349            protected AssetTagFinder assetTagFinder;
350            @BeanReference(type = ExpandoValueLocalService.class)
351            protected ExpandoValueLocalService expandoValueLocalService;
352            @BeanReference(type = ExpandoValueService.class)
353            protected ExpandoValueService expandoValueService;
354            @BeanReference(type = ExpandoValuePersistence.class)
355            protected ExpandoValuePersistence expandoValuePersistence;
356    }