001    /**
002     * Copyright (c) 2000-2013 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.bean.BeanReference;
020    import com.liferay.portal.kernel.bean.IdentifiableBean;
021    import com.liferay.portal.kernel.dao.jdbc.SqlUpdate;
022    import com.liferay.portal.kernel.dao.jdbc.SqlUpdateFactoryUtil;
023    import com.liferay.portal.kernel.dao.orm.DynamicQuery;
024    import com.liferay.portal.kernel.dao.orm.DynamicQueryFactoryUtil;
025    import com.liferay.portal.kernel.exception.PortalException;
026    import com.liferay.portal.kernel.exception.SystemException;
027    import com.liferay.portal.kernel.search.Indexable;
028    import com.liferay.portal.kernel.search.IndexableType;
029    import com.liferay.portal.kernel.util.OrderByComparator;
030    import com.liferay.portal.model.PersistedModel;
031    import com.liferay.portal.service.BaseLocalServiceImpl;
032    import com.liferay.portal.service.GroupLocalService;
033    import com.liferay.portal.service.GroupService;
034    import com.liferay.portal.service.PersistedModelLocalServiceRegistry;
035    import com.liferay.portal.service.ResourceLocalService;
036    import com.liferay.portal.service.SubscriptionLocalService;
037    import com.liferay.portal.service.UserLocalService;
038    import com.liferay.portal.service.UserService;
039    import com.liferay.portal.service.persistence.GroupFinder;
040    import com.liferay.portal.service.persistence.GroupPersistence;
041    import com.liferay.portal.service.persistence.SubscriptionPersistence;
042    import com.liferay.portal.service.persistence.UserFinder;
043    import com.liferay.portal.service.persistence.UserPersistence;
044    
045    import com.liferay.portlet.asset.service.AssetEntryLocalService;
046    import com.liferay.portlet.asset.service.AssetEntryService;
047    import com.liferay.portlet.asset.service.AssetLinkLocalService;
048    import com.liferay.portlet.asset.service.persistence.AssetEntryFinder;
049    import com.liferay.portlet.asset.service.persistence.AssetEntryPersistence;
050    import com.liferay.portlet.asset.service.persistence.AssetLinkFinder;
051    import com.liferay.portlet.asset.service.persistence.AssetLinkPersistence;
052    import com.liferay.portlet.bookmarks.model.BookmarksFolder;
053    import com.liferay.portlet.bookmarks.service.BookmarksEntryLocalService;
054    import com.liferay.portlet.bookmarks.service.BookmarksEntryService;
055    import com.liferay.portlet.bookmarks.service.BookmarksFolderLocalService;
056    import com.liferay.portlet.bookmarks.service.BookmarksFolderService;
057    import com.liferay.portlet.bookmarks.service.persistence.BookmarksEntryFinder;
058    import com.liferay.portlet.bookmarks.service.persistence.BookmarksEntryPersistence;
059    import com.liferay.portlet.bookmarks.service.persistence.BookmarksFolderFinder;
060    import com.liferay.portlet.bookmarks.service.persistence.BookmarksFolderPersistence;
061    import com.liferay.portlet.expando.service.ExpandoValueLocalService;
062    import com.liferay.portlet.expando.service.ExpandoValueService;
063    import com.liferay.portlet.expando.service.persistence.ExpandoValuePersistence;
064    import com.liferay.portlet.social.service.SocialActivityCounterLocalService;
065    import com.liferay.portlet.social.service.SocialActivityLocalService;
066    import com.liferay.portlet.social.service.persistence.SocialActivityCounterFinder;
067    import com.liferay.portlet.social.service.persistence.SocialActivityCounterPersistence;
068    import com.liferay.portlet.social.service.persistence.SocialActivityFinder;
069    import com.liferay.portlet.social.service.persistence.SocialActivityPersistence;
070    import com.liferay.portlet.trash.service.TrashEntryLocalService;
071    import com.liferay.portlet.trash.service.TrashEntryService;
072    import com.liferay.portlet.trash.service.persistence.TrashEntryPersistence;
073    
074    import java.io.Serializable;
075    
076    import java.util.List;
077    
078    import javax.sql.DataSource;
079    
080    /**
081     * The base implementation of the bookmarks folder local service.
082     *
083     * <p>
084     * 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.bookmarks.service.impl.BookmarksFolderLocalServiceImpl}.
085     * </p>
086     *
087     * @author Brian Wing Shun Chan
088     * @see com.liferay.portlet.bookmarks.service.impl.BookmarksFolderLocalServiceImpl
089     * @see com.liferay.portlet.bookmarks.service.BookmarksFolderLocalServiceUtil
090     * @generated
091     */
092    public abstract class BookmarksFolderLocalServiceBaseImpl
093            extends BaseLocalServiceImpl implements BookmarksFolderLocalService,
094                    IdentifiableBean {
095            /*
096             * NOTE FOR DEVELOPERS:
097             *
098             * Never modify or reference this class directly. Always use {@link com.liferay.portlet.bookmarks.service.BookmarksFolderLocalServiceUtil} to access the bookmarks folder local service.
099             */
100    
101            /**
102             * Adds the bookmarks folder to the database. Also notifies the appropriate model listeners.
103             *
104             * @param bookmarksFolder the bookmarks folder
105             * @return the bookmarks folder that was added
106             * @throws SystemException if a system exception occurred
107             */
108            @Indexable(type = IndexableType.REINDEX)
109            public BookmarksFolder addBookmarksFolder(BookmarksFolder bookmarksFolder)
110                    throws SystemException {
111                    bookmarksFolder.setNew(true);
112    
113                    return bookmarksFolderPersistence.update(bookmarksFolder);
114            }
115    
116            /**
117             * Creates a new bookmarks folder with the primary key. Does not add the bookmarks folder to the database.
118             *
119             * @param folderId the primary key for the new bookmarks folder
120             * @return the new bookmarks folder
121             */
122            public BookmarksFolder createBookmarksFolder(long folderId) {
123                    return bookmarksFolderPersistence.create(folderId);
124            }
125    
126            /**
127             * Deletes the bookmarks folder with the primary key from the database. Also notifies the appropriate model listeners.
128             *
129             * @param folderId the primary key of the bookmarks folder
130             * @return the bookmarks folder that was removed
131             * @throws PortalException if a bookmarks folder with the primary key could not be found
132             * @throws SystemException if a system exception occurred
133             */
134            @Indexable(type = IndexableType.DELETE)
135            public BookmarksFolder deleteBookmarksFolder(long folderId)
136                    throws PortalException, SystemException {
137                    return bookmarksFolderPersistence.remove(folderId);
138            }
139    
140            /**
141             * Deletes the bookmarks folder from the database. Also notifies the appropriate model listeners.
142             *
143             * @param bookmarksFolder the bookmarks folder
144             * @return the bookmarks folder that was removed
145             * @throws SystemException if a system exception occurred
146             */
147            @Indexable(type = IndexableType.DELETE)
148            public BookmarksFolder deleteBookmarksFolder(
149                    BookmarksFolder bookmarksFolder) throws SystemException {
150                    return bookmarksFolderPersistence.remove(bookmarksFolder);
151            }
152    
153            public DynamicQuery dynamicQuery() {
154                    Class<?> clazz = getClass();
155    
156                    return DynamicQueryFactoryUtil.forClass(BookmarksFolder.class,
157                            clazz.getClassLoader());
158            }
159    
160            /**
161             * Performs a dynamic query on the database and returns the matching rows.
162             *
163             * @param dynamicQuery the dynamic query
164             * @return the matching rows
165             * @throws SystemException if a system exception occurred
166             */
167            @SuppressWarnings("rawtypes")
168            public List dynamicQuery(DynamicQuery dynamicQuery)
169                    throws SystemException {
170                    return bookmarksFolderPersistence.findWithDynamicQuery(dynamicQuery);
171            }
172    
173            /**
174             * Performs a dynamic query on the database and returns a range of the matching rows.
175             *
176             * <p>
177             * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portlet.bookmarks.model.impl.BookmarksFolderModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
178             * </p>
179             *
180             * @param dynamicQuery the dynamic query
181             * @param start the lower bound of the range of model instances
182             * @param end the upper bound of the range of model instances (not inclusive)
183             * @return the range of matching rows
184             * @throws SystemException if a system exception occurred
185             */
186            @SuppressWarnings("rawtypes")
187            public List dynamicQuery(DynamicQuery dynamicQuery, int start, int end)
188                    throws SystemException {
189                    return bookmarksFolderPersistence.findWithDynamicQuery(dynamicQuery,
190                            start, end);
191            }
192    
193            /**
194             * Performs a dynamic query on the database and returns an ordered range of the matching rows.
195             *
196             * <p>
197             * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portlet.bookmarks.model.impl.BookmarksFolderModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
198             * </p>
199             *
200             * @param dynamicQuery the dynamic query
201             * @param start the lower bound of the range of model instances
202             * @param end the upper bound of the range of model instances (not inclusive)
203             * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
204             * @return the ordered range of matching rows
205             * @throws SystemException if a system exception occurred
206             */
207            @SuppressWarnings("rawtypes")
208            public List dynamicQuery(DynamicQuery dynamicQuery, int start, int end,
209                    OrderByComparator orderByComparator) throws SystemException {
210                    return bookmarksFolderPersistence.findWithDynamicQuery(dynamicQuery,
211                            start, end, orderByComparator);
212            }
213    
214            /**
215             * Returns the number of rows that match the dynamic query.
216             *
217             * @param dynamicQuery the dynamic query
218             * @return the number of rows that match the dynamic query
219             * @throws SystemException if a system exception occurred
220             */
221            public long dynamicQueryCount(DynamicQuery dynamicQuery)
222                    throws SystemException {
223                    return bookmarksFolderPersistence.countWithDynamicQuery(dynamicQuery);
224            }
225    
226            public BookmarksFolder fetchBookmarksFolder(long folderId)
227                    throws SystemException {
228                    return bookmarksFolderPersistence.fetchByPrimaryKey(folderId);
229            }
230    
231            /**
232             * Returns the bookmarks folder with the primary key.
233             *
234             * @param folderId the primary key of the bookmarks folder
235             * @return the bookmarks folder
236             * @throws PortalException if a bookmarks folder with the primary key could not be found
237             * @throws SystemException if a system exception occurred
238             */
239            public BookmarksFolder getBookmarksFolder(long folderId)
240                    throws PortalException, SystemException {
241                    return bookmarksFolderPersistence.findByPrimaryKey(folderId);
242            }
243    
244            public PersistedModel getPersistedModel(Serializable primaryKeyObj)
245                    throws PortalException, SystemException {
246                    return bookmarksFolderPersistence.findByPrimaryKey(primaryKeyObj);
247            }
248    
249            /**
250             * Returns the bookmarks folder matching the UUID and group.
251             *
252             * @param uuid the bookmarks folder's UUID
253             * @param groupId the primary key of the group
254             * @return the matching bookmarks folder
255             * @throws PortalException if a matching bookmarks folder could not be found
256             * @throws SystemException if a system exception occurred
257             */
258            public BookmarksFolder getBookmarksFolderByUuidAndGroupId(String uuid,
259                    long groupId) throws PortalException, SystemException {
260                    return bookmarksFolderPersistence.findByUUID_G(uuid, groupId);
261            }
262    
263            /**
264             * Returns a range of all the bookmarks folders.
265             *
266             * <p>
267             * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portlet.bookmarks.model.impl.BookmarksFolderModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
268             * </p>
269             *
270             * @param start the lower bound of the range of bookmarks folders
271             * @param end the upper bound of the range of bookmarks folders (not inclusive)
272             * @return the range of bookmarks folders
273             * @throws SystemException if a system exception occurred
274             */
275            public List<BookmarksFolder> getBookmarksFolders(int start, int end)
276                    throws SystemException {
277                    return bookmarksFolderPersistence.findAll(start, end);
278            }
279    
280            /**
281             * Returns the number of bookmarks folders.
282             *
283             * @return the number of bookmarks folders
284             * @throws SystemException if a system exception occurred
285             */
286            public int getBookmarksFoldersCount() throws SystemException {
287                    return bookmarksFolderPersistence.countAll();
288            }
289    
290            /**
291             * Updates the bookmarks folder in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.
292             *
293             * @param bookmarksFolder the bookmarks folder
294             * @return the bookmarks folder that was updated
295             * @throws SystemException if a system exception occurred
296             */
297            @Indexable(type = IndexableType.REINDEX)
298            public BookmarksFolder updateBookmarksFolder(
299                    BookmarksFolder bookmarksFolder) throws SystemException {
300                    return bookmarksFolderPersistence.update(bookmarksFolder);
301            }
302    
303            /**
304             * Returns the bookmarks entry local service.
305             *
306             * @return the bookmarks entry local service
307             */
308            public BookmarksEntryLocalService getBookmarksEntryLocalService() {
309                    return bookmarksEntryLocalService;
310            }
311    
312            /**
313             * Sets the bookmarks entry local service.
314             *
315             * @param bookmarksEntryLocalService the bookmarks entry local service
316             */
317            public void setBookmarksEntryLocalService(
318                    BookmarksEntryLocalService bookmarksEntryLocalService) {
319                    this.bookmarksEntryLocalService = bookmarksEntryLocalService;
320            }
321    
322            /**
323             * Returns the bookmarks entry remote service.
324             *
325             * @return the bookmarks entry remote service
326             */
327            public BookmarksEntryService getBookmarksEntryService() {
328                    return bookmarksEntryService;
329            }
330    
331            /**
332             * Sets the bookmarks entry remote service.
333             *
334             * @param bookmarksEntryService the bookmarks entry remote service
335             */
336            public void setBookmarksEntryService(
337                    BookmarksEntryService bookmarksEntryService) {
338                    this.bookmarksEntryService = bookmarksEntryService;
339            }
340    
341            /**
342             * Returns the bookmarks entry persistence.
343             *
344             * @return the bookmarks entry persistence
345             */
346            public BookmarksEntryPersistence getBookmarksEntryPersistence() {
347                    return bookmarksEntryPersistence;
348            }
349    
350            /**
351             * Sets the bookmarks entry persistence.
352             *
353             * @param bookmarksEntryPersistence the bookmarks entry persistence
354             */
355            public void setBookmarksEntryPersistence(
356                    BookmarksEntryPersistence bookmarksEntryPersistence) {
357                    this.bookmarksEntryPersistence = bookmarksEntryPersistence;
358            }
359    
360            /**
361             * Returns the bookmarks entry finder.
362             *
363             * @return the bookmarks entry finder
364             */
365            public BookmarksEntryFinder getBookmarksEntryFinder() {
366                    return bookmarksEntryFinder;
367            }
368    
369            /**
370             * Sets the bookmarks entry finder.
371             *
372             * @param bookmarksEntryFinder the bookmarks entry finder
373             */
374            public void setBookmarksEntryFinder(
375                    BookmarksEntryFinder bookmarksEntryFinder) {
376                    this.bookmarksEntryFinder = bookmarksEntryFinder;
377            }
378    
379            /**
380             * Returns the bookmarks folder local service.
381             *
382             * @return the bookmarks folder local service
383             */
384            public BookmarksFolderLocalService getBookmarksFolderLocalService() {
385                    return bookmarksFolderLocalService;
386            }
387    
388            /**
389             * Sets the bookmarks folder local service.
390             *
391             * @param bookmarksFolderLocalService the bookmarks folder local service
392             */
393            public void setBookmarksFolderLocalService(
394                    BookmarksFolderLocalService bookmarksFolderLocalService) {
395                    this.bookmarksFolderLocalService = bookmarksFolderLocalService;
396            }
397    
398            /**
399             * Returns the bookmarks folder remote service.
400             *
401             * @return the bookmarks folder remote service
402             */
403            public BookmarksFolderService getBookmarksFolderService() {
404                    return bookmarksFolderService;
405            }
406    
407            /**
408             * Sets the bookmarks folder remote service.
409             *
410             * @param bookmarksFolderService the bookmarks folder remote service
411             */
412            public void setBookmarksFolderService(
413                    BookmarksFolderService bookmarksFolderService) {
414                    this.bookmarksFolderService = bookmarksFolderService;
415            }
416    
417            /**
418             * Returns the bookmarks folder persistence.
419             *
420             * @return the bookmarks folder persistence
421             */
422            public BookmarksFolderPersistence getBookmarksFolderPersistence() {
423                    return bookmarksFolderPersistence;
424            }
425    
426            /**
427             * Sets the bookmarks folder persistence.
428             *
429             * @param bookmarksFolderPersistence the bookmarks folder persistence
430             */
431            public void setBookmarksFolderPersistence(
432                    BookmarksFolderPersistence bookmarksFolderPersistence) {
433                    this.bookmarksFolderPersistence = bookmarksFolderPersistence;
434            }
435    
436            /**
437             * Returns the bookmarks folder finder.
438             *
439             * @return the bookmarks folder finder
440             */
441            public BookmarksFolderFinder getBookmarksFolderFinder() {
442                    return bookmarksFolderFinder;
443            }
444    
445            /**
446             * Sets the bookmarks folder finder.
447             *
448             * @param bookmarksFolderFinder the bookmarks folder finder
449             */
450            public void setBookmarksFolderFinder(
451                    BookmarksFolderFinder bookmarksFolderFinder) {
452                    this.bookmarksFolderFinder = bookmarksFolderFinder;
453            }
454    
455            /**
456             * Returns the counter local service.
457             *
458             * @return the counter local service
459             */
460            public CounterLocalService getCounterLocalService() {
461                    return counterLocalService;
462            }
463    
464            /**
465             * Sets the counter local service.
466             *
467             * @param counterLocalService the counter local service
468             */
469            public void setCounterLocalService(CounterLocalService counterLocalService) {
470                    this.counterLocalService = counterLocalService;
471            }
472    
473            /**
474             * Returns the group local service.
475             *
476             * @return the group local service
477             */
478            public GroupLocalService getGroupLocalService() {
479                    return groupLocalService;
480            }
481    
482            /**
483             * Sets the group local service.
484             *
485             * @param groupLocalService the group local service
486             */
487            public void setGroupLocalService(GroupLocalService groupLocalService) {
488                    this.groupLocalService = groupLocalService;
489            }
490    
491            /**
492             * Returns the group remote service.
493             *
494             * @return the group remote service
495             */
496            public GroupService getGroupService() {
497                    return groupService;
498            }
499    
500            /**
501             * Sets the group remote service.
502             *
503             * @param groupService the group remote service
504             */
505            public void setGroupService(GroupService groupService) {
506                    this.groupService = groupService;
507            }
508    
509            /**
510             * Returns the group persistence.
511             *
512             * @return the group persistence
513             */
514            public GroupPersistence getGroupPersistence() {
515                    return groupPersistence;
516            }
517    
518            /**
519             * Sets the group persistence.
520             *
521             * @param groupPersistence the group persistence
522             */
523            public void setGroupPersistence(GroupPersistence groupPersistence) {
524                    this.groupPersistence = groupPersistence;
525            }
526    
527            /**
528             * Returns the group finder.
529             *
530             * @return the group finder
531             */
532            public GroupFinder getGroupFinder() {
533                    return groupFinder;
534            }
535    
536            /**
537             * Sets the group finder.
538             *
539             * @param groupFinder the group finder
540             */
541            public void setGroupFinder(GroupFinder groupFinder) {
542                    this.groupFinder = groupFinder;
543            }
544    
545            /**
546             * Returns the resource local service.
547             *
548             * @return the resource local service
549             */
550            public ResourceLocalService getResourceLocalService() {
551                    return resourceLocalService;
552            }
553    
554            /**
555             * Sets the resource local service.
556             *
557             * @param resourceLocalService the resource local service
558             */
559            public void setResourceLocalService(
560                    ResourceLocalService resourceLocalService) {
561                    this.resourceLocalService = resourceLocalService;
562            }
563    
564            /**
565             * Returns the subscription local service.
566             *
567             * @return the subscription local service
568             */
569            public SubscriptionLocalService getSubscriptionLocalService() {
570                    return subscriptionLocalService;
571            }
572    
573            /**
574             * Sets the subscription local service.
575             *
576             * @param subscriptionLocalService the subscription local service
577             */
578            public void setSubscriptionLocalService(
579                    SubscriptionLocalService subscriptionLocalService) {
580                    this.subscriptionLocalService = subscriptionLocalService;
581            }
582    
583            /**
584             * Returns the subscription persistence.
585             *
586             * @return the subscription persistence
587             */
588            public SubscriptionPersistence getSubscriptionPersistence() {
589                    return subscriptionPersistence;
590            }
591    
592            /**
593             * Sets the subscription persistence.
594             *
595             * @param subscriptionPersistence the subscription persistence
596             */
597            public void setSubscriptionPersistence(
598                    SubscriptionPersistence subscriptionPersistence) {
599                    this.subscriptionPersistence = subscriptionPersistence;
600            }
601    
602            /**
603             * Returns the user local service.
604             *
605             * @return the user local service
606             */
607            public UserLocalService getUserLocalService() {
608                    return userLocalService;
609            }
610    
611            /**
612             * Sets the user local service.
613             *
614             * @param userLocalService the user local service
615             */
616            public void setUserLocalService(UserLocalService userLocalService) {
617                    this.userLocalService = userLocalService;
618            }
619    
620            /**
621             * Returns the user remote service.
622             *
623             * @return the user remote service
624             */
625            public UserService getUserService() {
626                    return userService;
627            }
628    
629            /**
630             * Sets the user remote service.
631             *
632             * @param userService the user remote service
633             */
634            public void setUserService(UserService userService) {
635                    this.userService = userService;
636            }
637    
638            /**
639             * Returns the user persistence.
640             *
641             * @return the user persistence
642             */
643            public UserPersistence getUserPersistence() {
644                    return userPersistence;
645            }
646    
647            /**
648             * Sets the user persistence.
649             *
650             * @param userPersistence the user persistence
651             */
652            public void setUserPersistence(UserPersistence userPersistence) {
653                    this.userPersistence = userPersistence;
654            }
655    
656            /**
657             * Returns the user finder.
658             *
659             * @return the user finder
660             */
661            public UserFinder getUserFinder() {
662                    return userFinder;
663            }
664    
665            /**
666             * Sets the user finder.
667             *
668             * @param userFinder the user finder
669             */
670            public void setUserFinder(UserFinder userFinder) {
671                    this.userFinder = userFinder;
672            }
673    
674            /**
675             * Returns the asset entry local service.
676             *
677             * @return the asset entry local service
678             */
679            public AssetEntryLocalService getAssetEntryLocalService() {
680                    return assetEntryLocalService;
681            }
682    
683            /**
684             * Sets the asset entry local service.
685             *
686             * @param assetEntryLocalService the asset entry local service
687             */
688            public void setAssetEntryLocalService(
689                    AssetEntryLocalService assetEntryLocalService) {
690                    this.assetEntryLocalService = assetEntryLocalService;
691            }
692    
693            /**
694             * Returns the asset entry remote service.
695             *
696             * @return the asset entry remote service
697             */
698            public AssetEntryService getAssetEntryService() {
699                    return assetEntryService;
700            }
701    
702            /**
703             * Sets the asset entry remote service.
704             *
705             * @param assetEntryService the asset entry remote service
706             */
707            public void setAssetEntryService(AssetEntryService assetEntryService) {
708                    this.assetEntryService = assetEntryService;
709            }
710    
711            /**
712             * Returns the asset entry persistence.
713             *
714             * @return the asset entry persistence
715             */
716            public AssetEntryPersistence getAssetEntryPersistence() {
717                    return assetEntryPersistence;
718            }
719    
720            /**
721             * Sets the asset entry persistence.
722             *
723             * @param assetEntryPersistence the asset entry persistence
724             */
725            public void setAssetEntryPersistence(
726                    AssetEntryPersistence assetEntryPersistence) {
727                    this.assetEntryPersistence = assetEntryPersistence;
728            }
729    
730            /**
731             * Returns the asset entry finder.
732             *
733             * @return the asset entry finder
734             */
735            public AssetEntryFinder getAssetEntryFinder() {
736                    return assetEntryFinder;
737            }
738    
739            /**
740             * Sets the asset entry finder.
741             *
742             * @param assetEntryFinder the asset entry finder
743             */
744            public void setAssetEntryFinder(AssetEntryFinder assetEntryFinder) {
745                    this.assetEntryFinder = assetEntryFinder;
746            }
747    
748            /**
749             * Returns the asset link local service.
750             *
751             * @return the asset link local service
752             */
753            public AssetLinkLocalService getAssetLinkLocalService() {
754                    return assetLinkLocalService;
755            }
756    
757            /**
758             * Sets the asset link local service.
759             *
760             * @param assetLinkLocalService the asset link local service
761             */
762            public void setAssetLinkLocalService(
763                    AssetLinkLocalService assetLinkLocalService) {
764                    this.assetLinkLocalService = assetLinkLocalService;
765            }
766    
767            /**
768             * Returns the asset link persistence.
769             *
770             * @return the asset link persistence
771             */
772            public AssetLinkPersistence getAssetLinkPersistence() {
773                    return assetLinkPersistence;
774            }
775    
776            /**
777             * Sets the asset link persistence.
778             *
779             * @param assetLinkPersistence the asset link persistence
780             */
781            public void setAssetLinkPersistence(
782                    AssetLinkPersistence assetLinkPersistence) {
783                    this.assetLinkPersistence = assetLinkPersistence;
784            }
785    
786            /**
787             * Returns the asset link finder.
788             *
789             * @return the asset link finder
790             */
791            public AssetLinkFinder getAssetLinkFinder() {
792                    return assetLinkFinder;
793            }
794    
795            /**
796             * Sets the asset link finder.
797             *
798             * @param assetLinkFinder the asset link finder
799             */
800            public void setAssetLinkFinder(AssetLinkFinder assetLinkFinder) {
801                    this.assetLinkFinder = assetLinkFinder;
802            }
803    
804            /**
805             * Returns the expando value local service.
806             *
807             * @return the expando value local service
808             */
809            public ExpandoValueLocalService getExpandoValueLocalService() {
810                    return expandoValueLocalService;
811            }
812    
813            /**
814             * Sets the expando value local service.
815             *
816             * @param expandoValueLocalService the expando value local service
817             */
818            public void setExpandoValueLocalService(
819                    ExpandoValueLocalService expandoValueLocalService) {
820                    this.expandoValueLocalService = expandoValueLocalService;
821            }
822    
823            /**
824             * Returns the expando value remote service.
825             *
826             * @return the expando value remote service
827             */
828            public ExpandoValueService getExpandoValueService() {
829                    return expandoValueService;
830            }
831    
832            /**
833             * Sets the expando value remote service.
834             *
835             * @param expandoValueService the expando value remote service
836             */
837            public void setExpandoValueService(ExpandoValueService expandoValueService) {
838                    this.expandoValueService = expandoValueService;
839            }
840    
841            /**
842             * Returns the expando value persistence.
843             *
844             * @return the expando value persistence
845             */
846            public ExpandoValuePersistence getExpandoValuePersistence() {
847                    return expandoValuePersistence;
848            }
849    
850            /**
851             * Sets the expando value persistence.
852             *
853             * @param expandoValuePersistence the expando value persistence
854             */
855            public void setExpandoValuePersistence(
856                    ExpandoValuePersistence expandoValuePersistence) {
857                    this.expandoValuePersistence = expandoValuePersistence;
858            }
859    
860            /**
861             * Returns the social activity local service.
862             *
863             * @return the social activity local service
864             */
865            public SocialActivityLocalService getSocialActivityLocalService() {
866                    return socialActivityLocalService;
867            }
868    
869            /**
870             * Sets the social activity local service.
871             *
872             * @param socialActivityLocalService the social activity local service
873             */
874            public void setSocialActivityLocalService(
875                    SocialActivityLocalService socialActivityLocalService) {
876                    this.socialActivityLocalService = socialActivityLocalService;
877            }
878    
879            /**
880             * Returns the social activity persistence.
881             *
882             * @return the social activity persistence
883             */
884            public SocialActivityPersistence getSocialActivityPersistence() {
885                    return socialActivityPersistence;
886            }
887    
888            /**
889             * Sets the social activity persistence.
890             *
891             * @param socialActivityPersistence the social activity persistence
892             */
893            public void setSocialActivityPersistence(
894                    SocialActivityPersistence socialActivityPersistence) {
895                    this.socialActivityPersistence = socialActivityPersistence;
896            }
897    
898            /**
899             * Returns the social activity finder.
900             *
901             * @return the social activity finder
902             */
903            public SocialActivityFinder getSocialActivityFinder() {
904                    return socialActivityFinder;
905            }
906    
907            /**
908             * Sets the social activity finder.
909             *
910             * @param socialActivityFinder the social activity finder
911             */
912            public void setSocialActivityFinder(
913                    SocialActivityFinder socialActivityFinder) {
914                    this.socialActivityFinder = socialActivityFinder;
915            }
916    
917            /**
918             * Returns the social activity counter local service.
919             *
920             * @return the social activity counter local service
921             */
922            public SocialActivityCounterLocalService getSocialActivityCounterLocalService() {
923                    return socialActivityCounterLocalService;
924            }
925    
926            /**
927             * Sets the social activity counter local service.
928             *
929             * @param socialActivityCounterLocalService the social activity counter local service
930             */
931            public void setSocialActivityCounterLocalService(
932                    SocialActivityCounterLocalService socialActivityCounterLocalService) {
933                    this.socialActivityCounterLocalService = socialActivityCounterLocalService;
934            }
935    
936            /**
937             * Returns the social activity counter persistence.
938             *
939             * @return the social activity counter persistence
940             */
941            public SocialActivityCounterPersistence getSocialActivityCounterPersistence() {
942                    return socialActivityCounterPersistence;
943            }
944    
945            /**
946             * Sets the social activity counter persistence.
947             *
948             * @param socialActivityCounterPersistence the social activity counter persistence
949             */
950            public void setSocialActivityCounterPersistence(
951                    SocialActivityCounterPersistence socialActivityCounterPersistence) {
952                    this.socialActivityCounterPersistence = socialActivityCounterPersistence;
953            }
954    
955            /**
956             * Returns the social activity counter finder.
957             *
958             * @return the social activity counter finder
959             */
960            public SocialActivityCounterFinder getSocialActivityCounterFinder() {
961                    return socialActivityCounterFinder;
962            }
963    
964            /**
965             * Sets the social activity counter finder.
966             *
967             * @param socialActivityCounterFinder the social activity counter finder
968             */
969            public void setSocialActivityCounterFinder(
970                    SocialActivityCounterFinder socialActivityCounterFinder) {
971                    this.socialActivityCounterFinder = socialActivityCounterFinder;
972            }
973    
974            /**
975             * Returns the trash entry local service.
976             *
977             * @return the trash entry local service
978             */
979            public TrashEntryLocalService getTrashEntryLocalService() {
980                    return trashEntryLocalService;
981            }
982    
983            /**
984             * Sets the trash entry local service.
985             *
986             * @param trashEntryLocalService the trash entry local service
987             */
988            public void setTrashEntryLocalService(
989                    TrashEntryLocalService trashEntryLocalService) {
990                    this.trashEntryLocalService = trashEntryLocalService;
991            }
992    
993            /**
994             * Returns the trash entry remote service.
995             *
996             * @return the trash entry remote service
997             */
998            public TrashEntryService getTrashEntryService() {
999                    return trashEntryService;
1000            }
1001    
1002            /**
1003             * Sets the trash entry remote service.
1004             *
1005             * @param trashEntryService the trash entry remote service
1006             */
1007            public void setTrashEntryService(TrashEntryService trashEntryService) {
1008                    this.trashEntryService = trashEntryService;
1009            }
1010    
1011            /**
1012             * Returns the trash entry persistence.
1013             *
1014             * @return the trash entry persistence
1015             */
1016            public TrashEntryPersistence getTrashEntryPersistence() {
1017                    return trashEntryPersistence;
1018            }
1019    
1020            /**
1021             * Sets the trash entry persistence.
1022             *
1023             * @param trashEntryPersistence the trash entry persistence
1024             */
1025            public void setTrashEntryPersistence(
1026                    TrashEntryPersistence trashEntryPersistence) {
1027                    this.trashEntryPersistence = trashEntryPersistence;
1028            }
1029    
1030            public void afterPropertiesSet() {
1031                    persistedModelLocalServiceRegistry.register("com.liferay.portlet.bookmarks.model.BookmarksFolder",
1032                            bookmarksFolderLocalService);
1033            }
1034    
1035            public void destroy() {
1036                    persistedModelLocalServiceRegistry.unregister(
1037                            "com.liferay.portlet.bookmarks.model.BookmarksFolder");
1038            }
1039    
1040            /**
1041             * Returns the Spring bean ID for this bean.
1042             *
1043             * @return the Spring bean ID for this bean
1044             */
1045            public String getBeanIdentifier() {
1046                    return _beanIdentifier;
1047            }
1048    
1049            /**
1050             * Sets the Spring bean ID for this bean.
1051             *
1052             * @param beanIdentifier the Spring bean ID for this bean
1053             */
1054            public void setBeanIdentifier(String beanIdentifier) {
1055                    _beanIdentifier = beanIdentifier;
1056            }
1057    
1058            protected Class<?> getModelClass() {
1059                    return BookmarksFolder.class;
1060            }
1061    
1062            protected String getModelClassName() {
1063                    return BookmarksFolder.class.getName();
1064            }
1065    
1066            /**
1067             * Performs an SQL query.
1068             *
1069             * @param sql the sql query
1070             */
1071            protected void runSQL(String sql) throws SystemException {
1072                    try {
1073                            DataSource dataSource = bookmarksFolderPersistence.getDataSource();
1074    
1075                            SqlUpdate sqlUpdate = SqlUpdateFactoryUtil.getSqlUpdate(dataSource,
1076                                            sql, new int[0]);
1077    
1078                            sqlUpdate.update();
1079                    }
1080                    catch (Exception e) {
1081                            throw new SystemException(e);
1082                    }
1083            }
1084    
1085            @BeanReference(type = BookmarksEntryLocalService.class)
1086            protected BookmarksEntryLocalService bookmarksEntryLocalService;
1087            @BeanReference(type = BookmarksEntryService.class)
1088            protected BookmarksEntryService bookmarksEntryService;
1089            @BeanReference(type = BookmarksEntryPersistence.class)
1090            protected BookmarksEntryPersistence bookmarksEntryPersistence;
1091            @BeanReference(type = BookmarksEntryFinder.class)
1092            protected BookmarksEntryFinder bookmarksEntryFinder;
1093            @BeanReference(type = BookmarksFolderLocalService.class)
1094            protected BookmarksFolderLocalService bookmarksFolderLocalService;
1095            @BeanReference(type = BookmarksFolderService.class)
1096            protected BookmarksFolderService bookmarksFolderService;
1097            @BeanReference(type = BookmarksFolderPersistence.class)
1098            protected BookmarksFolderPersistence bookmarksFolderPersistence;
1099            @BeanReference(type = BookmarksFolderFinder.class)
1100            protected BookmarksFolderFinder bookmarksFolderFinder;
1101            @BeanReference(type = CounterLocalService.class)
1102            protected CounterLocalService counterLocalService;
1103            @BeanReference(type = GroupLocalService.class)
1104            protected GroupLocalService groupLocalService;
1105            @BeanReference(type = GroupService.class)
1106            protected GroupService groupService;
1107            @BeanReference(type = GroupPersistence.class)
1108            protected GroupPersistence groupPersistence;
1109            @BeanReference(type = GroupFinder.class)
1110            protected GroupFinder groupFinder;
1111            @BeanReference(type = ResourceLocalService.class)
1112            protected ResourceLocalService resourceLocalService;
1113            @BeanReference(type = SubscriptionLocalService.class)
1114            protected SubscriptionLocalService subscriptionLocalService;
1115            @BeanReference(type = SubscriptionPersistence.class)
1116            protected SubscriptionPersistence subscriptionPersistence;
1117            @BeanReference(type = UserLocalService.class)
1118            protected UserLocalService userLocalService;
1119            @BeanReference(type = UserService.class)
1120            protected UserService userService;
1121            @BeanReference(type = UserPersistence.class)
1122            protected UserPersistence userPersistence;
1123            @BeanReference(type = UserFinder.class)
1124            protected UserFinder userFinder;
1125            @BeanReference(type = AssetEntryLocalService.class)
1126            protected AssetEntryLocalService assetEntryLocalService;
1127            @BeanReference(type = AssetEntryService.class)
1128            protected AssetEntryService assetEntryService;
1129            @BeanReference(type = AssetEntryPersistence.class)
1130            protected AssetEntryPersistence assetEntryPersistence;
1131            @BeanReference(type = AssetEntryFinder.class)
1132            protected AssetEntryFinder assetEntryFinder;
1133            @BeanReference(type = AssetLinkLocalService.class)
1134            protected AssetLinkLocalService assetLinkLocalService;
1135            @BeanReference(type = AssetLinkPersistence.class)
1136            protected AssetLinkPersistence assetLinkPersistence;
1137            @BeanReference(type = AssetLinkFinder.class)
1138            protected AssetLinkFinder assetLinkFinder;
1139            @BeanReference(type = ExpandoValueLocalService.class)
1140            protected ExpandoValueLocalService expandoValueLocalService;
1141            @BeanReference(type = ExpandoValueService.class)
1142            protected ExpandoValueService expandoValueService;
1143            @BeanReference(type = ExpandoValuePersistence.class)
1144            protected ExpandoValuePersistence expandoValuePersistence;
1145            @BeanReference(type = SocialActivityLocalService.class)
1146            protected SocialActivityLocalService socialActivityLocalService;
1147            @BeanReference(type = SocialActivityPersistence.class)
1148            protected SocialActivityPersistence socialActivityPersistence;
1149            @BeanReference(type = SocialActivityFinder.class)
1150            protected SocialActivityFinder socialActivityFinder;
1151            @BeanReference(type = SocialActivityCounterLocalService.class)
1152            protected SocialActivityCounterLocalService socialActivityCounterLocalService;
1153            @BeanReference(type = SocialActivityCounterPersistence.class)
1154            protected SocialActivityCounterPersistence socialActivityCounterPersistence;
1155            @BeanReference(type = SocialActivityCounterFinder.class)
1156            protected SocialActivityCounterFinder socialActivityCounterFinder;
1157            @BeanReference(type = TrashEntryLocalService.class)
1158            protected TrashEntryLocalService trashEntryLocalService;
1159            @BeanReference(type = TrashEntryService.class)
1160            protected TrashEntryService trashEntryService;
1161            @BeanReference(type = TrashEntryPersistence.class)
1162            protected TrashEntryPersistence trashEntryPersistence;
1163            @BeanReference(type = PersistedModelLocalServiceRegistry.class)
1164            protected PersistedModelLocalServiceRegistry persistedModelLocalServiceRegistry;
1165            private String _beanIdentifier;
1166    }