1   /**
2    * Copyright (c) 2000-2008 Liferay, Inc. All rights reserved.
3    *
4    * Permission is hereby granted, free of charge, to any person obtaining a copy
5    * of this software and associated documentation files (the "Software"), to deal
6    * in the Software without restriction, including without limitation the rights
7    * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8    * copies of the Software, and to permit persons to whom the Software is
9    * furnished to do so, subject to the following conditions:
10   *
11   * The above copyright notice and this permission notice shall be included in
12   * all copies or substantial portions of the Software.
13   *
14   * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15   * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16   * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17   * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18   * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19   * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20   * SOFTWARE.
21   */
22  
23  package com.liferay.portlet.bookmarks.service.base;
24  
25  import com.liferay.counter.service.CounterLocalService;
26  import com.liferay.counter.service.CounterService;
27  
28  import com.liferay.portal.PortalException;
29  import com.liferay.portal.SystemException;
30  import com.liferay.portal.kernel.annotation.BeanReference;
31  import com.liferay.portal.kernel.dao.orm.DynamicQuery;
32  import com.liferay.portal.service.ResourceLocalService;
33  import com.liferay.portal.service.ResourceService;
34  import com.liferay.portal.service.UserLocalService;
35  import com.liferay.portal.service.UserService;
36  import com.liferay.portal.service.persistence.ResourceFinder;
37  import com.liferay.portal.service.persistence.ResourcePersistence;
38  import com.liferay.portal.service.persistence.UserFinder;
39  import com.liferay.portal.service.persistence.UserPersistence;
40  
41  import com.liferay.portlet.bookmarks.model.BookmarksEntry;
42  import com.liferay.portlet.bookmarks.service.BookmarksEntryLocalService;
43  import com.liferay.portlet.bookmarks.service.BookmarksEntryService;
44  import com.liferay.portlet.bookmarks.service.BookmarksFolderLocalService;
45  import com.liferay.portlet.bookmarks.service.BookmarksFolderService;
46  import com.liferay.portlet.bookmarks.service.persistence.BookmarksEntryFinder;
47  import com.liferay.portlet.bookmarks.service.persistence.BookmarksEntryPersistence;
48  import com.liferay.portlet.bookmarks.service.persistence.BookmarksFolderPersistence;
49  import com.liferay.portlet.tags.service.TagsAssetLocalService;
50  import com.liferay.portlet.tags.service.TagsAssetService;
51  import com.liferay.portlet.tags.service.persistence.TagsAssetFinder;
52  import com.liferay.portlet.tags.service.persistence.TagsAssetPersistence;
53  
54  import java.util.List;
55  
56  /**
57   * <a href="BookmarksEntryLocalServiceBaseImpl.java.html"><b><i>View Source</i></b></a>
58   *
59   * @author Brian Wing Shun Chan
60   *
61   */
62  public abstract class BookmarksEntryLocalServiceBaseImpl
63      implements BookmarksEntryLocalService {
64      public BookmarksEntry addBookmarksEntry(BookmarksEntry bookmarksEntry)
65          throws SystemException {
66          bookmarksEntry.setNew(true);
67  
68          return bookmarksEntryPersistence.update(bookmarksEntry, false);
69      }
70  
71      public BookmarksEntry createBookmarksEntry(long entryId) {
72          return bookmarksEntryPersistence.create(entryId);
73      }
74  
75      public void deleteBookmarksEntry(long entryId)
76          throws PortalException, SystemException {
77          bookmarksEntryPersistence.remove(entryId);
78      }
79  
80      public void deleteBookmarksEntry(BookmarksEntry bookmarksEntry)
81          throws SystemException {
82          bookmarksEntryPersistence.remove(bookmarksEntry);
83      }
84  
85      public List<Object> dynamicQuery(DynamicQuery dynamicQuery)
86          throws SystemException {
87          return bookmarksEntryPersistence.findWithDynamicQuery(dynamicQuery);
88      }
89  
90      public List<Object> dynamicQuery(DynamicQuery dynamicQuery, int start,
91          int end) throws SystemException {
92          return bookmarksEntryPersistence.findWithDynamicQuery(dynamicQuery,
93              start, end);
94      }
95  
96      public BookmarksEntry getBookmarksEntry(long entryId)
97          throws PortalException, SystemException {
98          return bookmarksEntryPersistence.findByPrimaryKey(entryId);
99      }
100 
101     public List<BookmarksEntry> getBookmarksEntries(int start, int end)
102         throws SystemException {
103         return bookmarksEntryPersistence.findAll(start, end);
104     }
105 
106     public int getBookmarksEntriesCount() throws SystemException {
107         return bookmarksEntryPersistence.countAll();
108     }
109 
110     public BookmarksEntry updateBookmarksEntry(BookmarksEntry bookmarksEntry)
111         throws SystemException {
112         bookmarksEntry.setNew(false);
113 
114         return bookmarksEntryPersistence.update(bookmarksEntry, true);
115     }
116 
117     public BookmarksEntryLocalService getBookmarksEntryLocalService() {
118         return bookmarksEntryLocalService;
119     }
120 
121     public void setBookmarksEntryLocalService(
122         BookmarksEntryLocalService bookmarksEntryLocalService) {
123         this.bookmarksEntryLocalService = bookmarksEntryLocalService;
124     }
125 
126     public BookmarksEntryService getBookmarksEntryService() {
127         return bookmarksEntryService;
128     }
129 
130     public void setBookmarksEntryService(
131         BookmarksEntryService bookmarksEntryService) {
132         this.bookmarksEntryService = bookmarksEntryService;
133     }
134 
135     public BookmarksEntryPersistence getBookmarksEntryPersistence() {
136         return bookmarksEntryPersistence;
137     }
138 
139     public void setBookmarksEntryPersistence(
140         BookmarksEntryPersistence bookmarksEntryPersistence) {
141         this.bookmarksEntryPersistence = bookmarksEntryPersistence;
142     }
143 
144     public BookmarksEntryFinder getBookmarksEntryFinder() {
145         return bookmarksEntryFinder;
146     }
147 
148     public void setBookmarksEntryFinder(
149         BookmarksEntryFinder bookmarksEntryFinder) {
150         this.bookmarksEntryFinder = bookmarksEntryFinder;
151     }
152 
153     public BookmarksFolderLocalService getBookmarksFolderLocalService() {
154         return bookmarksFolderLocalService;
155     }
156 
157     public void setBookmarksFolderLocalService(
158         BookmarksFolderLocalService bookmarksFolderLocalService) {
159         this.bookmarksFolderLocalService = bookmarksFolderLocalService;
160     }
161 
162     public BookmarksFolderService getBookmarksFolderService() {
163         return bookmarksFolderService;
164     }
165 
166     public void setBookmarksFolderService(
167         BookmarksFolderService bookmarksFolderService) {
168         this.bookmarksFolderService = bookmarksFolderService;
169     }
170 
171     public BookmarksFolderPersistence getBookmarksFolderPersistence() {
172         return bookmarksFolderPersistence;
173     }
174 
175     public void setBookmarksFolderPersistence(
176         BookmarksFolderPersistence bookmarksFolderPersistence) {
177         this.bookmarksFolderPersistence = bookmarksFolderPersistence;
178     }
179 
180     public CounterLocalService getCounterLocalService() {
181         return counterLocalService;
182     }
183 
184     public void setCounterLocalService(CounterLocalService counterLocalService) {
185         this.counterLocalService = counterLocalService;
186     }
187 
188     public CounterService getCounterService() {
189         return counterService;
190     }
191 
192     public void setCounterService(CounterService counterService) {
193         this.counterService = counterService;
194     }
195 
196     public ResourceLocalService getResourceLocalService() {
197         return resourceLocalService;
198     }
199 
200     public void setResourceLocalService(
201         ResourceLocalService resourceLocalService) {
202         this.resourceLocalService = resourceLocalService;
203     }
204 
205     public ResourceService getResourceService() {
206         return resourceService;
207     }
208 
209     public void setResourceService(ResourceService resourceService) {
210         this.resourceService = resourceService;
211     }
212 
213     public ResourcePersistence getResourcePersistence() {
214         return resourcePersistence;
215     }
216 
217     public void setResourcePersistence(ResourcePersistence resourcePersistence) {
218         this.resourcePersistence = resourcePersistence;
219     }
220 
221     public ResourceFinder getResourceFinder() {
222         return resourceFinder;
223     }
224 
225     public void setResourceFinder(ResourceFinder resourceFinder) {
226         this.resourceFinder = resourceFinder;
227     }
228 
229     public UserLocalService getUserLocalService() {
230         return userLocalService;
231     }
232 
233     public void setUserLocalService(UserLocalService userLocalService) {
234         this.userLocalService = userLocalService;
235     }
236 
237     public UserService getUserService() {
238         return userService;
239     }
240 
241     public void setUserService(UserService userService) {
242         this.userService = userService;
243     }
244 
245     public UserPersistence getUserPersistence() {
246         return userPersistence;
247     }
248 
249     public void setUserPersistence(UserPersistence userPersistence) {
250         this.userPersistence = userPersistence;
251     }
252 
253     public UserFinder getUserFinder() {
254         return userFinder;
255     }
256 
257     public void setUserFinder(UserFinder userFinder) {
258         this.userFinder = userFinder;
259     }
260 
261     public TagsAssetLocalService getTagsAssetLocalService() {
262         return tagsAssetLocalService;
263     }
264 
265     public void setTagsAssetLocalService(
266         TagsAssetLocalService tagsAssetLocalService) {
267         this.tagsAssetLocalService = tagsAssetLocalService;
268     }
269 
270     public TagsAssetService getTagsAssetService() {
271         return tagsAssetService;
272     }
273 
274     public void setTagsAssetService(TagsAssetService tagsAssetService) {
275         this.tagsAssetService = tagsAssetService;
276     }
277 
278     public TagsAssetPersistence getTagsAssetPersistence() {
279         return tagsAssetPersistence;
280     }
281 
282     public void setTagsAssetPersistence(
283         TagsAssetPersistence tagsAssetPersistence) {
284         this.tagsAssetPersistence = tagsAssetPersistence;
285     }
286 
287     public TagsAssetFinder getTagsAssetFinder() {
288         return tagsAssetFinder;
289     }
290 
291     public void setTagsAssetFinder(TagsAssetFinder tagsAssetFinder) {
292         this.tagsAssetFinder = tagsAssetFinder;
293     }
294 
295     @BeanReference(name = "com.liferay.portlet.bookmarks.service.BookmarksEntryLocalService.impl")
296     protected BookmarksEntryLocalService bookmarksEntryLocalService;
297     @BeanReference(name = "com.liferay.portlet.bookmarks.service.BookmarksEntryService.impl")
298     protected BookmarksEntryService bookmarksEntryService;
299     @BeanReference(name = "com.liferay.portlet.bookmarks.service.persistence.BookmarksEntryPersistence.impl")
300     protected BookmarksEntryPersistence bookmarksEntryPersistence;
301     @BeanReference(name = "com.liferay.portlet.bookmarks.service.persistence.BookmarksEntryFinder.impl")
302     protected BookmarksEntryFinder bookmarksEntryFinder;
303     @BeanReference(name = "com.liferay.portlet.bookmarks.service.BookmarksFolderLocalService.impl")
304     protected BookmarksFolderLocalService bookmarksFolderLocalService;
305     @BeanReference(name = "com.liferay.portlet.bookmarks.service.BookmarksFolderService.impl")
306     protected BookmarksFolderService bookmarksFolderService;
307     @BeanReference(name = "com.liferay.portlet.bookmarks.service.persistence.BookmarksFolderPersistence.impl")
308     protected BookmarksFolderPersistence bookmarksFolderPersistence;
309     @BeanReference(name = "com.liferay.counter.service.CounterLocalService.impl")
310     protected CounterLocalService counterLocalService;
311     @BeanReference(name = "com.liferay.counter.service.CounterService.impl")
312     protected CounterService counterService;
313     @BeanReference(name = "com.liferay.portal.service.ResourceLocalService.impl")
314     protected ResourceLocalService resourceLocalService;
315     @BeanReference(name = "com.liferay.portal.service.ResourceService.impl")
316     protected ResourceService resourceService;
317     @BeanReference(name = "com.liferay.portal.service.persistence.ResourcePersistence.impl")
318     protected ResourcePersistence resourcePersistence;
319     @BeanReference(name = "com.liferay.portal.service.persistence.ResourceFinder.impl")
320     protected ResourceFinder resourceFinder;
321     @BeanReference(name = "com.liferay.portal.service.UserLocalService.impl")
322     protected UserLocalService userLocalService;
323     @BeanReference(name = "com.liferay.portal.service.UserService.impl")
324     protected UserService userService;
325     @BeanReference(name = "com.liferay.portal.service.persistence.UserPersistence.impl")
326     protected UserPersistence userPersistence;
327     @BeanReference(name = "com.liferay.portal.service.persistence.UserFinder.impl")
328     protected UserFinder userFinder;
329     @BeanReference(name = "com.liferay.portlet.tags.service.TagsAssetLocalService.impl")
330     protected TagsAssetLocalService tagsAssetLocalService;
331     @BeanReference(name = "com.liferay.portlet.tags.service.TagsAssetService.impl")
332     protected TagsAssetService tagsAssetService;
333     @BeanReference(name = "com.liferay.portlet.tags.service.persistence.TagsAssetPersistence.impl")
334     protected TagsAssetPersistence tagsAssetPersistence;
335     @BeanReference(name = "com.liferay.portlet.tags.service.persistence.TagsAssetFinder.impl")
336     protected TagsAssetFinder tagsAssetFinder;
337 }