1   /**
2    * Copyright (c) 2000-2010 Liferay, Inc. All rights reserved.
3    *
4    * The contents of this file are subject to the terms of the Liferay Enterprise
5    * Subscription License ("License"). You may not use this file except in
6    * compliance with the License. You can obtain a copy of the License by
7    * contacting Liferay, Inc. See the License for the specific language governing
8    * permissions and limitations under the License, including but not limited to
9    * distribution rights of the Software.
10   *
11   *
12   * 
13   */
14  
15  package com.liferay.portlet.bookmarks.service.base;
16  
17  import com.liferay.counter.service.CounterLocalService;
18  import com.liferay.counter.service.CounterService;
19  
20  import com.liferay.portal.PortalException;
21  import com.liferay.portal.SystemException;
22  import com.liferay.portal.kernel.annotation.BeanReference;
23  import com.liferay.portal.kernel.dao.db.DB;
24  import com.liferay.portal.kernel.dao.db.DBFactoryUtil;
25  import com.liferay.portal.kernel.dao.orm.DynamicQuery;
26  import com.liferay.portal.service.ResourceLocalService;
27  import com.liferay.portal.service.ResourceService;
28  import com.liferay.portal.service.UserLocalService;
29  import com.liferay.portal.service.UserService;
30  import com.liferay.portal.service.persistence.ResourceFinder;
31  import com.liferay.portal.service.persistence.ResourcePersistence;
32  import com.liferay.portal.service.persistence.UserFinder;
33  import com.liferay.portal.service.persistence.UserPersistence;
34  
35  import com.liferay.portlet.bookmarks.model.BookmarksEntry;
36  import com.liferay.portlet.bookmarks.service.BookmarksEntryLocalService;
37  import com.liferay.portlet.bookmarks.service.BookmarksEntryService;
38  import com.liferay.portlet.bookmarks.service.BookmarksFolderLocalService;
39  import com.liferay.portlet.bookmarks.service.BookmarksFolderService;
40  import com.liferay.portlet.bookmarks.service.persistence.BookmarksEntryFinder;
41  import com.liferay.portlet.bookmarks.service.persistence.BookmarksEntryPersistence;
42  import com.liferay.portlet.bookmarks.service.persistence.BookmarksFolderPersistence;
43  import com.liferay.portlet.tags.service.TagsAssetLocalService;
44  import com.liferay.portlet.tags.service.TagsAssetService;
45  import com.liferay.portlet.tags.service.TagsEntryLocalService;
46  import com.liferay.portlet.tags.service.TagsEntryService;
47  import com.liferay.portlet.tags.service.persistence.TagsAssetFinder;
48  import com.liferay.portlet.tags.service.persistence.TagsAssetPersistence;
49  import com.liferay.portlet.tags.service.persistence.TagsEntryFinder;
50  import com.liferay.portlet.tags.service.persistence.TagsEntryPersistence;
51  
52  import java.util.List;
53  
54  /**
55   * <a href="BookmarksEntryLocalServiceBaseImpl.java.html"><b><i>View Source</i>
56   * </b></a>
57   *
58   * @author Brian Wing Shun Chan
59   */
60  public abstract class BookmarksEntryLocalServiceBaseImpl
61      implements BookmarksEntryLocalService {
62      public BookmarksEntry addBookmarksEntry(BookmarksEntry bookmarksEntry)
63          throws SystemException {
64          bookmarksEntry.setNew(true);
65  
66          return bookmarksEntryPersistence.update(bookmarksEntry, false);
67      }
68  
69      public BookmarksEntry createBookmarksEntry(long entryId) {
70          return bookmarksEntryPersistence.create(entryId);
71      }
72  
73      public void deleteBookmarksEntry(long entryId)
74          throws PortalException, SystemException {
75          bookmarksEntryPersistence.remove(entryId);
76      }
77  
78      public void deleteBookmarksEntry(BookmarksEntry bookmarksEntry)
79          throws SystemException {
80          bookmarksEntryPersistence.remove(bookmarksEntry);
81      }
82  
83      public List<Object> dynamicQuery(DynamicQuery dynamicQuery)
84          throws SystemException {
85          return bookmarksEntryPersistence.findWithDynamicQuery(dynamicQuery);
86      }
87  
88      public List<Object> dynamicQuery(DynamicQuery dynamicQuery, int start,
89          int end) throws SystemException {
90          return bookmarksEntryPersistence.findWithDynamicQuery(dynamicQuery,
91              start, end);
92      }
93  
94      public BookmarksEntry getBookmarksEntry(long entryId)
95          throws PortalException, SystemException {
96          return bookmarksEntryPersistence.findByPrimaryKey(entryId);
97      }
98  
99      public List<BookmarksEntry> getBookmarksEntries(int start, int end)
100         throws SystemException {
101         return bookmarksEntryPersistence.findAll(start, end);
102     }
103 
104     public int getBookmarksEntriesCount() throws SystemException {
105         return bookmarksEntryPersistence.countAll();
106     }
107 
108     public BookmarksEntry updateBookmarksEntry(BookmarksEntry bookmarksEntry)
109         throws SystemException {
110         bookmarksEntry.setNew(false);
111 
112         return bookmarksEntryPersistence.update(bookmarksEntry, true);
113     }
114 
115     public BookmarksEntry updateBookmarksEntry(BookmarksEntry bookmarksEntry,
116         boolean merge) throws SystemException {
117         bookmarksEntry.setNew(false);
118 
119         return bookmarksEntryPersistence.update(bookmarksEntry, merge);
120     }
121 
122     public BookmarksEntryLocalService getBookmarksEntryLocalService() {
123         return bookmarksEntryLocalService;
124     }
125 
126     public void setBookmarksEntryLocalService(
127         BookmarksEntryLocalService bookmarksEntryLocalService) {
128         this.bookmarksEntryLocalService = bookmarksEntryLocalService;
129     }
130 
131     public BookmarksEntryService getBookmarksEntryService() {
132         return bookmarksEntryService;
133     }
134 
135     public void setBookmarksEntryService(
136         BookmarksEntryService bookmarksEntryService) {
137         this.bookmarksEntryService = bookmarksEntryService;
138     }
139 
140     public BookmarksEntryPersistence getBookmarksEntryPersistence() {
141         return bookmarksEntryPersistence;
142     }
143 
144     public void setBookmarksEntryPersistence(
145         BookmarksEntryPersistence bookmarksEntryPersistence) {
146         this.bookmarksEntryPersistence = bookmarksEntryPersistence;
147     }
148 
149     public BookmarksEntryFinder getBookmarksEntryFinder() {
150         return bookmarksEntryFinder;
151     }
152 
153     public void setBookmarksEntryFinder(
154         BookmarksEntryFinder bookmarksEntryFinder) {
155         this.bookmarksEntryFinder = bookmarksEntryFinder;
156     }
157 
158     public BookmarksFolderLocalService getBookmarksFolderLocalService() {
159         return bookmarksFolderLocalService;
160     }
161 
162     public void setBookmarksFolderLocalService(
163         BookmarksFolderLocalService bookmarksFolderLocalService) {
164         this.bookmarksFolderLocalService = bookmarksFolderLocalService;
165     }
166 
167     public BookmarksFolderService getBookmarksFolderService() {
168         return bookmarksFolderService;
169     }
170 
171     public void setBookmarksFolderService(
172         BookmarksFolderService bookmarksFolderService) {
173         this.bookmarksFolderService = bookmarksFolderService;
174     }
175 
176     public BookmarksFolderPersistence getBookmarksFolderPersistence() {
177         return bookmarksFolderPersistence;
178     }
179 
180     public void setBookmarksFolderPersistence(
181         BookmarksFolderPersistence bookmarksFolderPersistence) {
182         this.bookmarksFolderPersistence = bookmarksFolderPersistence;
183     }
184 
185     public CounterLocalService getCounterLocalService() {
186         return counterLocalService;
187     }
188 
189     public void setCounterLocalService(CounterLocalService counterLocalService) {
190         this.counterLocalService = counterLocalService;
191     }
192 
193     public CounterService getCounterService() {
194         return counterService;
195     }
196 
197     public void setCounterService(CounterService counterService) {
198         this.counterService = counterService;
199     }
200 
201     public ResourceLocalService getResourceLocalService() {
202         return resourceLocalService;
203     }
204 
205     public void setResourceLocalService(
206         ResourceLocalService resourceLocalService) {
207         this.resourceLocalService = resourceLocalService;
208     }
209 
210     public ResourceService getResourceService() {
211         return resourceService;
212     }
213 
214     public void setResourceService(ResourceService resourceService) {
215         this.resourceService = resourceService;
216     }
217 
218     public ResourcePersistence getResourcePersistence() {
219         return resourcePersistence;
220     }
221 
222     public void setResourcePersistence(ResourcePersistence resourcePersistence) {
223         this.resourcePersistence = resourcePersistence;
224     }
225 
226     public ResourceFinder getResourceFinder() {
227         return resourceFinder;
228     }
229 
230     public void setResourceFinder(ResourceFinder resourceFinder) {
231         this.resourceFinder = resourceFinder;
232     }
233 
234     public UserLocalService getUserLocalService() {
235         return userLocalService;
236     }
237 
238     public void setUserLocalService(UserLocalService userLocalService) {
239         this.userLocalService = userLocalService;
240     }
241 
242     public UserService getUserService() {
243         return userService;
244     }
245 
246     public void setUserService(UserService userService) {
247         this.userService = userService;
248     }
249 
250     public UserPersistence getUserPersistence() {
251         return userPersistence;
252     }
253 
254     public void setUserPersistence(UserPersistence userPersistence) {
255         this.userPersistence = userPersistence;
256     }
257 
258     public UserFinder getUserFinder() {
259         return userFinder;
260     }
261 
262     public void setUserFinder(UserFinder userFinder) {
263         this.userFinder = userFinder;
264     }
265 
266     public TagsAssetLocalService getTagsAssetLocalService() {
267         return tagsAssetLocalService;
268     }
269 
270     public void setTagsAssetLocalService(
271         TagsAssetLocalService tagsAssetLocalService) {
272         this.tagsAssetLocalService = tagsAssetLocalService;
273     }
274 
275     public TagsAssetService getTagsAssetService() {
276         return tagsAssetService;
277     }
278 
279     public void setTagsAssetService(TagsAssetService tagsAssetService) {
280         this.tagsAssetService = tagsAssetService;
281     }
282 
283     public TagsAssetPersistence getTagsAssetPersistence() {
284         return tagsAssetPersistence;
285     }
286 
287     public void setTagsAssetPersistence(
288         TagsAssetPersistence tagsAssetPersistence) {
289         this.tagsAssetPersistence = tagsAssetPersistence;
290     }
291 
292     public TagsAssetFinder getTagsAssetFinder() {
293         return tagsAssetFinder;
294     }
295 
296     public void setTagsAssetFinder(TagsAssetFinder tagsAssetFinder) {
297         this.tagsAssetFinder = tagsAssetFinder;
298     }
299 
300     public TagsEntryLocalService getTagsEntryLocalService() {
301         return tagsEntryLocalService;
302     }
303 
304     public void setTagsEntryLocalService(
305         TagsEntryLocalService tagsEntryLocalService) {
306         this.tagsEntryLocalService = tagsEntryLocalService;
307     }
308 
309     public TagsEntryService getTagsEntryService() {
310         return tagsEntryService;
311     }
312 
313     public void setTagsEntryService(TagsEntryService tagsEntryService) {
314         this.tagsEntryService = tagsEntryService;
315     }
316 
317     public TagsEntryPersistence getTagsEntryPersistence() {
318         return tagsEntryPersistence;
319     }
320 
321     public void setTagsEntryPersistence(
322         TagsEntryPersistence tagsEntryPersistence) {
323         this.tagsEntryPersistence = tagsEntryPersistence;
324     }
325 
326     public TagsEntryFinder getTagsEntryFinder() {
327         return tagsEntryFinder;
328     }
329 
330     public void setTagsEntryFinder(TagsEntryFinder tagsEntryFinder) {
331         this.tagsEntryFinder = tagsEntryFinder;
332     }
333 
334     protected void runSQL(String sql) throws SystemException {
335         try {
336             DB db = DBFactoryUtil.getDB();
337 
338             db.runSQL(sql);
339         }
340         catch (Exception e) {
341             throw new SystemException(e);
342         }
343     }
344 
345     @BeanReference(name = "com.liferay.portlet.bookmarks.service.BookmarksEntryLocalService")
346     protected BookmarksEntryLocalService bookmarksEntryLocalService;
347     @BeanReference(name = "com.liferay.portlet.bookmarks.service.BookmarksEntryService")
348     protected BookmarksEntryService bookmarksEntryService;
349     @BeanReference(name = "com.liferay.portlet.bookmarks.service.persistence.BookmarksEntryPersistence")
350     protected BookmarksEntryPersistence bookmarksEntryPersistence;
351     @BeanReference(name = "com.liferay.portlet.bookmarks.service.persistence.BookmarksEntryFinder")
352     protected BookmarksEntryFinder bookmarksEntryFinder;
353     @BeanReference(name = "com.liferay.portlet.bookmarks.service.BookmarksFolderLocalService")
354     protected BookmarksFolderLocalService bookmarksFolderLocalService;
355     @BeanReference(name = "com.liferay.portlet.bookmarks.service.BookmarksFolderService")
356     protected BookmarksFolderService bookmarksFolderService;
357     @BeanReference(name = "com.liferay.portlet.bookmarks.service.persistence.BookmarksFolderPersistence")
358     protected BookmarksFolderPersistence bookmarksFolderPersistence;
359     @BeanReference(name = "com.liferay.counter.service.CounterLocalService")
360     protected CounterLocalService counterLocalService;
361     @BeanReference(name = "com.liferay.counter.service.CounterService")
362     protected CounterService counterService;
363     @BeanReference(name = "com.liferay.portal.service.ResourceLocalService")
364     protected ResourceLocalService resourceLocalService;
365     @BeanReference(name = "com.liferay.portal.service.ResourceService")
366     protected ResourceService resourceService;
367     @BeanReference(name = "com.liferay.portal.service.persistence.ResourcePersistence")
368     protected ResourcePersistence resourcePersistence;
369     @BeanReference(name = "com.liferay.portal.service.persistence.ResourceFinder")
370     protected ResourceFinder resourceFinder;
371     @BeanReference(name = "com.liferay.portal.service.UserLocalService")
372     protected UserLocalService userLocalService;
373     @BeanReference(name = "com.liferay.portal.service.UserService")
374     protected UserService userService;
375     @BeanReference(name = "com.liferay.portal.service.persistence.UserPersistence")
376     protected UserPersistence userPersistence;
377     @BeanReference(name = "com.liferay.portal.service.persistence.UserFinder")
378     protected UserFinder userFinder;
379     @BeanReference(name = "com.liferay.portlet.tags.service.TagsAssetLocalService")
380     protected TagsAssetLocalService tagsAssetLocalService;
381     @BeanReference(name = "com.liferay.portlet.tags.service.TagsAssetService")
382     protected TagsAssetService tagsAssetService;
383     @BeanReference(name = "com.liferay.portlet.tags.service.persistence.TagsAssetPersistence")
384     protected TagsAssetPersistence tagsAssetPersistence;
385     @BeanReference(name = "com.liferay.portlet.tags.service.persistence.TagsAssetFinder")
386     protected TagsAssetFinder tagsAssetFinder;
387     @BeanReference(name = "com.liferay.portlet.tags.service.TagsEntryLocalService")
388     protected TagsEntryLocalService tagsEntryLocalService;
389     @BeanReference(name = "com.liferay.portlet.tags.service.TagsEntryService")
390     protected TagsEntryService tagsEntryService;
391     @BeanReference(name = "com.liferay.portlet.tags.service.persistence.TagsEntryPersistence")
392     protected TagsEntryPersistence tagsEntryPersistence;
393     @BeanReference(name = "com.liferay.portlet.tags.service.persistence.TagsEntryFinder")
394     protected TagsEntryFinder tagsEntryFinder;
395 }