1
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.jdbc.SqlUpdate;
24 import com.liferay.portal.kernel.dao.jdbc.SqlUpdateFactoryUtil;
25 import com.liferay.portal.kernel.dao.orm.DynamicQuery;
26 import com.liferay.portal.kernel.util.OrderByComparator;
27 import com.liferay.portal.service.ResourceLocalService;
28 import com.liferay.portal.service.ResourceService;
29 import com.liferay.portal.service.UserLocalService;
30 import com.liferay.portal.service.UserService;
31 import com.liferay.portal.service.persistence.ResourceFinder;
32 import com.liferay.portal.service.persistence.ResourcePersistence;
33 import com.liferay.portal.service.persistence.UserFinder;
34 import com.liferay.portal.service.persistence.UserPersistence;
35
36 import com.liferay.portlet.bookmarks.model.BookmarksEntry;
37 import com.liferay.portlet.bookmarks.service.BookmarksEntryLocalService;
38 import com.liferay.portlet.bookmarks.service.BookmarksEntryService;
39 import com.liferay.portlet.bookmarks.service.BookmarksFolderLocalService;
40 import com.liferay.portlet.bookmarks.service.BookmarksFolderService;
41 import com.liferay.portlet.bookmarks.service.persistence.BookmarksEntryFinder;
42 import com.liferay.portlet.bookmarks.service.persistence.BookmarksEntryPersistence;
43 import com.liferay.portlet.bookmarks.service.persistence.BookmarksFolderPersistence;
44 import com.liferay.portlet.expando.service.ExpandoValueLocalService;
45 import com.liferay.portlet.expando.service.ExpandoValueService;
46 import com.liferay.portlet.expando.service.persistence.ExpandoValuePersistence;
47 import com.liferay.portlet.tags.service.TagsAssetLocalService;
48 import com.liferay.portlet.tags.service.TagsAssetService;
49 import com.liferay.portlet.tags.service.TagsEntryLocalService;
50 import com.liferay.portlet.tags.service.TagsEntryService;
51 import com.liferay.portlet.tags.service.persistence.TagsAssetFinder;
52 import com.liferay.portlet.tags.service.persistence.TagsAssetPersistence;
53 import com.liferay.portlet.tags.service.persistence.TagsEntryFinder;
54 import com.liferay.portlet.tags.service.persistence.TagsEntryPersistence;
55
56 import java.util.List;
57
58 import javax.sql.DataSource;
59
60
66 public abstract class BookmarksEntryLocalServiceBaseImpl
67 implements BookmarksEntryLocalService {
68 public BookmarksEntry addBookmarksEntry(BookmarksEntry bookmarksEntry)
69 throws SystemException {
70 bookmarksEntry.setNew(true);
71
72 return bookmarksEntryPersistence.update(bookmarksEntry, false);
73 }
74
75 public BookmarksEntry createBookmarksEntry(long entryId) {
76 return bookmarksEntryPersistence.create(entryId);
77 }
78
79 public void deleteBookmarksEntry(long entryId)
80 throws PortalException, SystemException {
81 bookmarksEntryPersistence.remove(entryId);
82 }
83
84 public void deleteBookmarksEntry(BookmarksEntry bookmarksEntry)
85 throws SystemException {
86 bookmarksEntryPersistence.remove(bookmarksEntry);
87 }
88
89 @SuppressWarnings("rawtypes")
90 public List dynamicQuery(DynamicQuery dynamicQuery)
91 throws SystemException {
92 return bookmarksEntryPersistence.findWithDynamicQuery(dynamicQuery);
93 }
94
95 @SuppressWarnings("rawtypes")
96 public List dynamicQuery(DynamicQuery dynamicQuery, int start, int end)
97 throws SystemException {
98 return bookmarksEntryPersistence.findWithDynamicQuery(dynamicQuery,
99 start, end);
100 }
101
102 @SuppressWarnings("rawtypes")
103 public List dynamicQuery(DynamicQuery dynamicQuery, int start, int end,
104 OrderByComparator orderByComparator) throws SystemException {
105 return bookmarksEntryPersistence.findWithDynamicQuery(dynamicQuery,
106 start, end, orderByComparator);
107 }
108
109 public int dynamicQueryCount(DynamicQuery dynamicQuery)
110 throws SystemException {
111 return bookmarksEntryPersistence.countWithDynamicQuery(dynamicQuery);
112 }
113
114 public BookmarksEntry getBookmarksEntry(long entryId)
115 throws PortalException, SystemException {
116 return bookmarksEntryPersistence.findByPrimaryKey(entryId);
117 }
118
119 public BookmarksEntry getBookmarksEntryByUuidAndGroupId(String uuid,
120 long groupId) throws PortalException, SystemException {
121 return bookmarksEntryPersistence.findByUUID_G(uuid, groupId);
122 }
123
124 public List<BookmarksEntry> getBookmarksEntries(int start, int end)
125 throws SystemException {
126 return bookmarksEntryPersistence.findAll(start, end);
127 }
128
129 public int getBookmarksEntriesCount() throws SystemException {
130 return bookmarksEntryPersistence.countAll();
131 }
132
133 public BookmarksEntry updateBookmarksEntry(BookmarksEntry bookmarksEntry)
134 throws SystemException {
135 bookmarksEntry.setNew(false);
136
137 return bookmarksEntryPersistence.update(bookmarksEntry, true);
138 }
139
140 public BookmarksEntry updateBookmarksEntry(BookmarksEntry bookmarksEntry,
141 boolean merge) throws SystemException {
142 bookmarksEntry.setNew(false);
143
144 return bookmarksEntryPersistence.update(bookmarksEntry, merge);
145 }
146
147 public BookmarksEntryLocalService getBookmarksEntryLocalService() {
148 return bookmarksEntryLocalService;
149 }
150
151 public void setBookmarksEntryLocalService(
152 BookmarksEntryLocalService bookmarksEntryLocalService) {
153 this.bookmarksEntryLocalService = bookmarksEntryLocalService;
154 }
155
156 public BookmarksEntryService getBookmarksEntryService() {
157 return bookmarksEntryService;
158 }
159
160 public void setBookmarksEntryService(
161 BookmarksEntryService bookmarksEntryService) {
162 this.bookmarksEntryService = bookmarksEntryService;
163 }
164
165 public BookmarksEntryPersistence getBookmarksEntryPersistence() {
166 return bookmarksEntryPersistence;
167 }
168
169 public void setBookmarksEntryPersistence(
170 BookmarksEntryPersistence bookmarksEntryPersistence) {
171 this.bookmarksEntryPersistence = bookmarksEntryPersistence;
172 }
173
174 public BookmarksEntryFinder getBookmarksEntryFinder() {
175 return bookmarksEntryFinder;
176 }
177
178 public void setBookmarksEntryFinder(
179 BookmarksEntryFinder bookmarksEntryFinder) {
180 this.bookmarksEntryFinder = bookmarksEntryFinder;
181 }
182
183 public BookmarksFolderLocalService getBookmarksFolderLocalService() {
184 return bookmarksFolderLocalService;
185 }
186
187 public void setBookmarksFolderLocalService(
188 BookmarksFolderLocalService bookmarksFolderLocalService) {
189 this.bookmarksFolderLocalService = bookmarksFolderLocalService;
190 }
191
192 public BookmarksFolderService getBookmarksFolderService() {
193 return bookmarksFolderService;
194 }
195
196 public void setBookmarksFolderService(
197 BookmarksFolderService bookmarksFolderService) {
198 this.bookmarksFolderService = bookmarksFolderService;
199 }
200
201 public BookmarksFolderPersistence getBookmarksFolderPersistence() {
202 return bookmarksFolderPersistence;
203 }
204
205 public void setBookmarksFolderPersistence(
206 BookmarksFolderPersistence bookmarksFolderPersistence) {
207 this.bookmarksFolderPersistence = bookmarksFolderPersistence;
208 }
209
210 public CounterLocalService getCounterLocalService() {
211 return counterLocalService;
212 }
213
214 public void setCounterLocalService(CounterLocalService counterLocalService) {
215 this.counterLocalService = counterLocalService;
216 }
217
218 public CounterService getCounterService() {
219 return counterService;
220 }
221
222 public void setCounterService(CounterService counterService) {
223 this.counterService = counterService;
224 }
225
226 public ResourceLocalService getResourceLocalService() {
227 return resourceLocalService;
228 }
229
230 public void setResourceLocalService(
231 ResourceLocalService resourceLocalService) {
232 this.resourceLocalService = resourceLocalService;
233 }
234
235 public ResourceService getResourceService() {
236 return resourceService;
237 }
238
239 public void setResourceService(ResourceService resourceService) {
240 this.resourceService = resourceService;
241 }
242
243 public ResourcePersistence getResourcePersistence() {
244 return resourcePersistence;
245 }
246
247 public void setResourcePersistence(ResourcePersistence resourcePersistence) {
248 this.resourcePersistence = resourcePersistence;
249 }
250
251 public ResourceFinder getResourceFinder() {
252 return resourceFinder;
253 }
254
255 public void setResourceFinder(ResourceFinder resourceFinder) {
256 this.resourceFinder = resourceFinder;
257 }
258
259 public UserLocalService getUserLocalService() {
260 return userLocalService;
261 }
262
263 public void setUserLocalService(UserLocalService userLocalService) {
264 this.userLocalService = userLocalService;
265 }
266
267 public UserService getUserService() {
268 return userService;
269 }
270
271 public void setUserService(UserService userService) {
272 this.userService = userService;
273 }
274
275 public UserPersistence getUserPersistence() {
276 return userPersistence;
277 }
278
279 public void setUserPersistence(UserPersistence userPersistence) {
280 this.userPersistence = userPersistence;
281 }
282
283 public UserFinder getUserFinder() {
284 return userFinder;
285 }
286
287 public void setUserFinder(UserFinder userFinder) {
288 this.userFinder = userFinder;
289 }
290
291 public ExpandoValueLocalService getExpandoValueLocalService() {
292 return expandoValueLocalService;
293 }
294
295 public void setExpandoValueLocalService(
296 ExpandoValueLocalService expandoValueLocalService) {
297 this.expandoValueLocalService = expandoValueLocalService;
298 }
299
300 public ExpandoValueService getExpandoValueService() {
301 return expandoValueService;
302 }
303
304 public void setExpandoValueService(ExpandoValueService expandoValueService) {
305 this.expandoValueService = expandoValueService;
306 }
307
308 public ExpandoValuePersistence getExpandoValuePersistence() {
309 return expandoValuePersistence;
310 }
311
312 public void setExpandoValuePersistence(
313 ExpandoValuePersistence expandoValuePersistence) {
314 this.expandoValuePersistence = expandoValuePersistence;
315 }
316
317 public TagsAssetLocalService getTagsAssetLocalService() {
318 return tagsAssetLocalService;
319 }
320
321 public void setTagsAssetLocalService(
322 TagsAssetLocalService tagsAssetLocalService) {
323 this.tagsAssetLocalService = tagsAssetLocalService;
324 }
325
326 public TagsAssetService getTagsAssetService() {
327 return tagsAssetService;
328 }
329
330 public void setTagsAssetService(TagsAssetService tagsAssetService) {
331 this.tagsAssetService = tagsAssetService;
332 }
333
334 public TagsAssetPersistence getTagsAssetPersistence() {
335 return tagsAssetPersistence;
336 }
337
338 public void setTagsAssetPersistence(
339 TagsAssetPersistence tagsAssetPersistence) {
340 this.tagsAssetPersistence = tagsAssetPersistence;
341 }
342
343 public TagsAssetFinder getTagsAssetFinder() {
344 return tagsAssetFinder;
345 }
346
347 public void setTagsAssetFinder(TagsAssetFinder tagsAssetFinder) {
348 this.tagsAssetFinder = tagsAssetFinder;
349 }
350
351 public TagsEntryLocalService getTagsEntryLocalService() {
352 return tagsEntryLocalService;
353 }
354
355 public void setTagsEntryLocalService(
356 TagsEntryLocalService tagsEntryLocalService) {
357 this.tagsEntryLocalService = tagsEntryLocalService;
358 }
359
360 public TagsEntryService getTagsEntryService() {
361 return tagsEntryService;
362 }
363
364 public void setTagsEntryService(TagsEntryService tagsEntryService) {
365 this.tagsEntryService = tagsEntryService;
366 }
367
368 public TagsEntryPersistence getTagsEntryPersistence() {
369 return tagsEntryPersistence;
370 }
371
372 public void setTagsEntryPersistence(
373 TagsEntryPersistence tagsEntryPersistence) {
374 this.tagsEntryPersistence = tagsEntryPersistence;
375 }
376
377 public TagsEntryFinder getTagsEntryFinder() {
378 return tagsEntryFinder;
379 }
380
381 public void setTagsEntryFinder(TagsEntryFinder tagsEntryFinder) {
382 this.tagsEntryFinder = tagsEntryFinder;
383 }
384
385 protected void runSQL(String sql) throws SystemException {
386 try {
387 DataSource dataSource = bookmarksEntryPersistence.getDataSource();
388
389 SqlUpdate sqlUpdate = SqlUpdateFactoryUtil.getSqlUpdate(dataSource,
390 sql, new int[0]);
391
392 sqlUpdate.update(new Object[0]);
393 }
394 catch (Exception e) {
395 throw new SystemException(e);
396 }
397 }
398
399 @BeanReference(type = BookmarksEntryLocalService.class)
400 protected BookmarksEntryLocalService bookmarksEntryLocalService;
401 @BeanReference(type = BookmarksEntryService.class)
402 protected BookmarksEntryService bookmarksEntryService;
403 @BeanReference(type = BookmarksEntryPersistence.class)
404 protected BookmarksEntryPersistence bookmarksEntryPersistence;
405 @BeanReference(type = BookmarksEntryFinder.class)
406 protected BookmarksEntryFinder bookmarksEntryFinder;
407 @BeanReference(type = BookmarksFolderLocalService.class)
408 protected BookmarksFolderLocalService bookmarksFolderLocalService;
409 @BeanReference(type = BookmarksFolderService.class)
410 protected BookmarksFolderService bookmarksFolderService;
411 @BeanReference(type = BookmarksFolderPersistence.class)
412 protected BookmarksFolderPersistence bookmarksFolderPersistence;
413 @BeanReference(type = CounterLocalService.class)
414 protected CounterLocalService counterLocalService;
415 @BeanReference(type = CounterService.class)
416 protected CounterService counterService;
417 @BeanReference(type = ResourceLocalService.class)
418 protected ResourceLocalService resourceLocalService;
419 @BeanReference(type = ResourceService.class)
420 protected ResourceService resourceService;
421 @BeanReference(type = ResourcePersistence.class)
422 protected ResourcePersistence resourcePersistence;
423 @BeanReference(type = ResourceFinder.class)
424 protected ResourceFinder resourceFinder;
425 @BeanReference(type = UserLocalService.class)
426 protected UserLocalService userLocalService;
427 @BeanReference(type = UserService.class)
428 protected UserService userService;
429 @BeanReference(type = UserPersistence.class)
430 protected UserPersistence userPersistence;
431 @BeanReference(type = UserFinder.class)
432 protected UserFinder userFinder;
433 @BeanReference(type = ExpandoValueLocalService.class)
434 protected ExpandoValueLocalService expandoValueLocalService;
435 @BeanReference(type = ExpandoValueService.class)
436 protected ExpandoValueService expandoValueService;
437 @BeanReference(type = ExpandoValuePersistence.class)
438 protected ExpandoValuePersistence expandoValuePersistence;
439 @BeanReference(type = TagsAssetLocalService.class)
440 protected TagsAssetLocalService tagsAssetLocalService;
441 @BeanReference(type = TagsAssetService.class)
442 protected TagsAssetService tagsAssetService;
443 @BeanReference(type = TagsAssetPersistence.class)
444 protected TagsAssetPersistence tagsAssetPersistence;
445 @BeanReference(type = TagsAssetFinder.class)
446 protected TagsAssetFinder tagsAssetFinder;
447 @BeanReference(type = TagsEntryLocalService.class)
448 protected TagsEntryLocalService tagsEntryLocalService;
449 @BeanReference(type = TagsEntryService.class)
450 protected TagsEntryService tagsEntryService;
451 @BeanReference(type = TagsEntryPersistence.class)
452 protected TagsEntryPersistence tagsEntryPersistence;
453 @BeanReference(type = TagsEntryFinder.class)
454 protected TagsEntryFinder tagsEntryFinder;
455 }