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.ResourceService;
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.ResourceFinder;
042    import com.liferay.portal.service.persistence.ResourcePersistence;
043    import com.liferay.portal.service.persistence.UserFinder;
044    import com.liferay.portal.service.persistence.UserPersistence;
045    
046    import com.liferay.portlet.bookmarks.model.BookmarksFolder;
047    import com.liferay.portlet.bookmarks.service.BookmarksEntryLocalService;
048    import com.liferay.portlet.bookmarks.service.BookmarksEntryService;
049    import com.liferay.portlet.bookmarks.service.BookmarksFolderLocalService;
050    import com.liferay.portlet.bookmarks.service.BookmarksFolderService;
051    import com.liferay.portlet.bookmarks.service.persistence.BookmarksEntryFinder;
052    import com.liferay.portlet.bookmarks.service.persistence.BookmarksEntryPersistence;
053    import com.liferay.portlet.bookmarks.service.persistence.BookmarksFolderFinder;
054    import com.liferay.portlet.bookmarks.service.persistence.BookmarksFolderPersistence;
055    import com.liferay.portlet.expando.service.ExpandoValueLocalService;
056    import com.liferay.portlet.expando.service.ExpandoValueService;
057    import com.liferay.portlet.expando.service.persistence.ExpandoValuePersistence;
058    
059    import java.io.Serializable;
060    
061    import java.util.List;
062    
063    import javax.sql.DataSource;
064    
065    /**
066     * The base implementation of the bookmarks folder local service.
067     *
068     * <p>
069     * 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}.
070     * </p>
071     *
072     * @author Brian Wing Shun Chan
073     * @see com.liferay.portlet.bookmarks.service.impl.BookmarksFolderLocalServiceImpl
074     * @see com.liferay.portlet.bookmarks.service.BookmarksFolderLocalServiceUtil
075     * @generated
076     */
077    public abstract class BookmarksFolderLocalServiceBaseImpl
078            extends BaseLocalServiceImpl implements BookmarksFolderLocalService,
079                    IdentifiableBean {
080            /*
081             * NOTE FOR DEVELOPERS:
082             *
083             * Never modify or reference this class directly. Always use {@link com.liferay.portlet.bookmarks.service.BookmarksFolderLocalServiceUtil} to access the bookmarks folder local service.
084             */
085    
086            /**
087             * Adds the bookmarks folder to the database. Also notifies the appropriate model listeners.
088             *
089             * @param bookmarksFolder the bookmarks folder
090             * @return the bookmarks folder that was added
091             * @throws SystemException if a system exception occurred
092             */
093            @Indexable(type = IndexableType.REINDEX)
094            public BookmarksFolder addBookmarksFolder(BookmarksFolder bookmarksFolder)
095                    throws SystemException {
096                    bookmarksFolder.setNew(true);
097    
098                    return bookmarksFolderPersistence.update(bookmarksFolder, false);
099            }
100    
101            /**
102             * Creates a new bookmarks folder with the primary key. Does not add the bookmarks folder to the database.
103             *
104             * @param folderId the primary key for the new bookmarks folder
105             * @return the new bookmarks folder
106             */
107            public BookmarksFolder createBookmarksFolder(long folderId) {
108                    return bookmarksFolderPersistence.create(folderId);
109            }
110    
111            /**
112             * Deletes the bookmarks folder with the primary key from the database. Also notifies the appropriate model listeners.
113             *
114             * @param folderId the primary key of the bookmarks folder
115             * @return the bookmarks folder that was removed
116             * @throws PortalException if a bookmarks folder with the primary key could not be found
117             * @throws SystemException if a system exception occurred
118             */
119            @Indexable(type = IndexableType.DELETE)
120            public BookmarksFolder deleteBookmarksFolder(long folderId)
121                    throws PortalException, SystemException {
122                    return bookmarksFolderPersistence.remove(folderId);
123            }
124    
125            /**
126             * Deletes the bookmarks folder from the database. Also notifies the appropriate model listeners.
127             *
128             * @param bookmarksFolder the bookmarks folder
129             * @return the bookmarks folder that was removed
130             * @throws SystemException if a system exception occurred
131             */
132            @Indexable(type = IndexableType.DELETE)
133            public BookmarksFolder deleteBookmarksFolder(
134                    BookmarksFolder bookmarksFolder) throws SystemException {
135                    return bookmarksFolderPersistence.remove(bookmarksFolder);
136            }
137    
138            public DynamicQuery dynamicQuery() {
139                    Class<?> clazz = getClass();
140    
141                    return DynamicQueryFactoryUtil.forClass(BookmarksFolder.class,
142                            clazz.getClassLoader());
143            }
144    
145            /**
146             * Performs a dynamic query on the database and returns the matching rows.
147             *
148             * @param dynamicQuery the dynamic query
149             * @return the matching rows
150             * @throws SystemException if a system exception occurred
151             */
152            @SuppressWarnings("rawtypes")
153            public List dynamicQuery(DynamicQuery dynamicQuery)
154                    throws SystemException {
155                    return bookmarksFolderPersistence.findWithDynamicQuery(dynamicQuery);
156            }
157    
158            /**
159             * Performs a dynamic query on the database and returns a range of the matching rows.
160             *
161             * <p>
162             * 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.
163             * </p>
164             *
165             * @param dynamicQuery the dynamic query
166             * @param start the lower bound of the range of model instances
167             * @param end the upper bound of the range of model instances (not inclusive)
168             * @return the range of matching rows
169             * @throws SystemException if a system exception occurred
170             */
171            @SuppressWarnings("rawtypes")
172            public List dynamicQuery(DynamicQuery dynamicQuery, int start, int end)
173                    throws SystemException {
174                    return bookmarksFolderPersistence.findWithDynamicQuery(dynamicQuery,
175                            start, end);
176            }
177    
178            /**
179             * Performs a dynamic query on the database and returns an ordered range of the matching rows.
180             *
181             * <p>
182             * 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.
183             * </p>
184             *
185             * @param dynamicQuery the dynamic query
186             * @param start the lower bound of the range of model instances
187             * @param end the upper bound of the range of model instances (not inclusive)
188             * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
189             * @return the ordered range of matching rows
190             * @throws SystemException if a system exception occurred
191             */
192            @SuppressWarnings("rawtypes")
193            public List dynamicQuery(DynamicQuery dynamicQuery, int start, int end,
194                    OrderByComparator orderByComparator) throws SystemException {
195                    return bookmarksFolderPersistence.findWithDynamicQuery(dynamicQuery,
196                            start, end, orderByComparator);
197            }
198    
199            /**
200             * Returns the number of rows that match the dynamic query.
201             *
202             * @param dynamicQuery the dynamic query
203             * @return the number of rows that match the dynamic query
204             * @throws SystemException if a system exception occurred
205             */
206            public long dynamicQueryCount(DynamicQuery dynamicQuery)
207                    throws SystemException {
208                    return bookmarksFolderPersistence.countWithDynamicQuery(dynamicQuery);
209            }
210    
211            public BookmarksFolder fetchBookmarksFolder(long folderId)
212                    throws SystemException {
213                    return bookmarksFolderPersistence.fetchByPrimaryKey(folderId);
214            }
215    
216            /**
217             * Returns the bookmarks folder with the primary key.
218             *
219             * @param folderId the primary key of the bookmarks folder
220             * @return the bookmarks folder
221             * @throws PortalException if a bookmarks folder with the primary key could not be found
222             * @throws SystemException if a system exception occurred
223             */
224            public BookmarksFolder getBookmarksFolder(long folderId)
225                    throws PortalException, SystemException {
226                    return bookmarksFolderPersistence.findByPrimaryKey(folderId);
227            }
228    
229            public PersistedModel getPersistedModel(Serializable primaryKeyObj)
230                    throws PortalException, SystemException {
231                    return bookmarksFolderPersistence.findByPrimaryKey(primaryKeyObj);
232            }
233    
234            /**
235             * Returns the bookmarks folder with the UUID in the group.
236             *
237             * @param uuid the UUID of bookmarks folder
238             * @param groupId the group id of the bookmarks folder
239             * @return the bookmarks folder
240             * @throws PortalException if a bookmarks folder with the UUID in the group could not be found
241             * @throws SystemException if a system exception occurred
242             */
243            public BookmarksFolder getBookmarksFolderByUuidAndGroupId(String uuid,
244                    long groupId) throws PortalException, SystemException {
245                    return bookmarksFolderPersistence.findByUUID_G(uuid, groupId);
246            }
247    
248            /**
249             * Returns a range of all the bookmarks folders.
250             *
251             * <p>
252             * 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.
253             * </p>
254             *
255             * @param start the lower bound of the range of bookmarks folders
256             * @param end the upper bound of the range of bookmarks folders (not inclusive)
257             * @return the range of bookmarks folders
258             * @throws SystemException if a system exception occurred
259             */
260            public List<BookmarksFolder> getBookmarksFolders(int start, int end)
261                    throws SystemException {
262                    return bookmarksFolderPersistence.findAll(start, end);
263            }
264    
265            /**
266             * Returns the number of bookmarks folders.
267             *
268             * @return the number of bookmarks folders
269             * @throws SystemException if a system exception occurred
270             */
271            public int getBookmarksFoldersCount() throws SystemException {
272                    return bookmarksFolderPersistence.countAll();
273            }
274    
275            /**
276             * Updates the bookmarks folder in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.
277             *
278             * @param bookmarksFolder the bookmarks folder
279             * @return the bookmarks folder that was updated
280             * @throws SystemException if a system exception occurred
281             */
282            @Indexable(type = IndexableType.REINDEX)
283            public BookmarksFolder updateBookmarksFolder(
284                    BookmarksFolder bookmarksFolder) throws SystemException {
285                    return updateBookmarksFolder(bookmarksFolder, true);
286            }
287    
288            /**
289             * Updates the bookmarks folder in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.
290             *
291             * @param bookmarksFolder the bookmarks folder
292             * @param merge whether to merge the bookmarks folder with the current session. See {@link com.liferay.portal.service.persistence.BatchSession#update(com.liferay.portal.kernel.dao.orm.Session, com.liferay.portal.model.BaseModel, boolean)} for an explanation.
293             * @return the bookmarks folder that was updated
294             * @throws SystemException if a system exception occurred
295             */
296            @Indexable(type = IndexableType.REINDEX)
297            public BookmarksFolder updateBookmarksFolder(
298                    BookmarksFolder bookmarksFolder, boolean merge)
299                    throws SystemException {
300                    bookmarksFolder.setNew(false);
301    
302                    return bookmarksFolderPersistence.update(bookmarksFolder, merge);
303            }
304    
305            /**
306             * Returns the bookmarks entry local service.
307             *
308             * @return the bookmarks entry local service
309             */
310            public BookmarksEntryLocalService getBookmarksEntryLocalService() {
311                    return bookmarksEntryLocalService;
312            }
313    
314            /**
315             * Sets the bookmarks entry local service.
316             *
317             * @param bookmarksEntryLocalService the bookmarks entry local service
318             */
319            public void setBookmarksEntryLocalService(
320                    BookmarksEntryLocalService bookmarksEntryLocalService) {
321                    this.bookmarksEntryLocalService = bookmarksEntryLocalService;
322            }
323    
324            /**
325             * Returns the bookmarks entry remote service.
326             *
327             * @return the bookmarks entry remote service
328             */
329            public BookmarksEntryService getBookmarksEntryService() {
330                    return bookmarksEntryService;
331            }
332    
333            /**
334             * Sets the bookmarks entry remote service.
335             *
336             * @param bookmarksEntryService the bookmarks entry remote service
337             */
338            public void setBookmarksEntryService(
339                    BookmarksEntryService bookmarksEntryService) {
340                    this.bookmarksEntryService = bookmarksEntryService;
341            }
342    
343            /**
344             * Returns the bookmarks entry persistence.
345             *
346             * @return the bookmarks entry persistence
347             */
348            public BookmarksEntryPersistence getBookmarksEntryPersistence() {
349                    return bookmarksEntryPersistence;
350            }
351    
352            /**
353             * Sets the bookmarks entry persistence.
354             *
355             * @param bookmarksEntryPersistence the bookmarks entry persistence
356             */
357            public void setBookmarksEntryPersistence(
358                    BookmarksEntryPersistence bookmarksEntryPersistence) {
359                    this.bookmarksEntryPersistence = bookmarksEntryPersistence;
360            }
361    
362            /**
363             * Returns the bookmarks entry finder.
364             *
365             * @return the bookmarks entry finder
366             */
367            public BookmarksEntryFinder getBookmarksEntryFinder() {
368                    return bookmarksEntryFinder;
369            }
370    
371            /**
372             * Sets the bookmarks entry finder.
373             *
374             * @param bookmarksEntryFinder the bookmarks entry finder
375             */
376            public void setBookmarksEntryFinder(
377                    BookmarksEntryFinder bookmarksEntryFinder) {
378                    this.bookmarksEntryFinder = bookmarksEntryFinder;
379            }
380    
381            /**
382             * Returns the bookmarks folder local service.
383             *
384             * @return the bookmarks folder local service
385             */
386            public BookmarksFolderLocalService getBookmarksFolderLocalService() {
387                    return bookmarksFolderLocalService;
388            }
389    
390            /**
391             * Sets the bookmarks folder local service.
392             *
393             * @param bookmarksFolderLocalService the bookmarks folder local service
394             */
395            public void setBookmarksFolderLocalService(
396                    BookmarksFolderLocalService bookmarksFolderLocalService) {
397                    this.bookmarksFolderLocalService = bookmarksFolderLocalService;
398            }
399    
400            /**
401             * Returns the bookmarks folder remote service.
402             *
403             * @return the bookmarks folder remote service
404             */
405            public BookmarksFolderService getBookmarksFolderService() {
406                    return bookmarksFolderService;
407            }
408    
409            /**
410             * Sets the bookmarks folder remote service.
411             *
412             * @param bookmarksFolderService the bookmarks folder remote service
413             */
414            public void setBookmarksFolderService(
415                    BookmarksFolderService bookmarksFolderService) {
416                    this.bookmarksFolderService = bookmarksFolderService;
417            }
418    
419            /**
420             * Returns the bookmarks folder persistence.
421             *
422             * @return the bookmarks folder persistence
423             */
424            public BookmarksFolderPersistence getBookmarksFolderPersistence() {
425                    return bookmarksFolderPersistence;
426            }
427    
428            /**
429             * Sets the bookmarks folder persistence.
430             *
431             * @param bookmarksFolderPersistence the bookmarks folder persistence
432             */
433            public void setBookmarksFolderPersistence(
434                    BookmarksFolderPersistence bookmarksFolderPersistence) {
435                    this.bookmarksFolderPersistence = bookmarksFolderPersistence;
436            }
437    
438            /**
439             * Returns the bookmarks folder finder.
440             *
441             * @return the bookmarks folder finder
442             */
443            public BookmarksFolderFinder getBookmarksFolderFinder() {
444                    return bookmarksFolderFinder;
445            }
446    
447            /**
448             * Sets the bookmarks folder finder.
449             *
450             * @param bookmarksFolderFinder the bookmarks folder finder
451             */
452            public void setBookmarksFolderFinder(
453                    BookmarksFolderFinder bookmarksFolderFinder) {
454                    this.bookmarksFolderFinder = bookmarksFolderFinder;
455            }
456    
457            /**
458             * Returns the counter local service.
459             *
460             * @return the counter local service
461             */
462            public CounterLocalService getCounterLocalService() {
463                    return counterLocalService;
464            }
465    
466            /**
467             * Sets the counter local service.
468             *
469             * @param counterLocalService the counter local service
470             */
471            public void setCounterLocalService(CounterLocalService counterLocalService) {
472                    this.counterLocalService = counterLocalService;
473            }
474    
475            /**
476             * Returns the group local service.
477             *
478             * @return the group local service
479             */
480            public GroupLocalService getGroupLocalService() {
481                    return groupLocalService;
482            }
483    
484            /**
485             * Sets the group local service.
486             *
487             * @param groupLocalService the group local service
488             */
489            public void setGroupLocalService(GroupLocalService groupLocalService) {
490                    this.groupLocalService = groupLocalService;
491            }
492    
493            /**
494             * Returns the group remote service.
495             *
496             * @return the group remote service
497             */
498            public GroupService getGroupService() {
499                    return groupService;
500            }
501    
502            /**
503             * Sets the group remote service.
504             *
505             * @param groupService the group remote service
506             */
507            public void setGroupService(GroupService groupService) {
508                    this.groupService = groupService;
509            }
510    
511            /**
512             * Returns the group persistence.
513             *
514             * @return the group persistence
515             */
516            public GroupPersistence getGroupPersistence() {
517                    return groupPersistence;
518            }
519    
520            /**
521             * Sets the group persistence.
522             *
523             * @param groupPersistence the group persistence
524             */
525            public void setGroupPersistence(GroupPersistence groupPersistence) {
526                    this.groupPersistence = groupPersistence;
527            }
528    
529            /**
530             * Returns the group finder.
531             *
532             * @return the group finder
533             */
534            public GroupFinder getGroupFinder() {
535                    return groupFinder;
536            }
537    
538            /**
539             * Sets the group finder.
540             *
541             * @param groupFinder the group finder
542             */
543            public void setGroupFinder(GroupFinder groupFinder) {
544                    this.groupFinder = groupFinder;
545            }
546    
547            /**
548             * Returns the resource local service.
549             *
550             * @return the resource local service
551             */
552            public ResourceLocalService getResourceLocalService() {
553                    return resourceLocalService;
554            }
555    
556            /**
557             * Sets the resource local service.
558             *
559             * @param resourceLocalService the resource local service
560             */
561            public void setResourceLocalService(
562                    ResourceLocalService resourceLocalService) {
563                    this.resourceLocalService = resourceLocalService;
564            }
565    
566            /**
567             * Returns the resource remote service.
568             *
569             * @return the resource remote service
570             */
571            public ResourceService getResourceService() {
572                    return resourceService;
573            }
574    
575            /**
576             * Sets the resource remote service.
577             *
578             * @param resourceService the resource remote service
579             */
580            public void setResourceService(ResourceService resourceService) {
581                    this.resourceService = resourceService;
582            }
583    
584            /**
585             * Returns the resource persistence.
586             *
587             * @return the resource persistence
588             */
589            public ResourcePersistence getResourcePersistence() {
590                    return resourcePersistence;
591            }
592    
593            /**
594             * Sets the resource persistence.
595             *
596             * @param resourcePersistence the resource persistence
597             */
598            public void setResourcePersistence(ResourcePersistence resourcePersistence) {
599                    this.resourcePersistence = resourcePersistence;
600            }
601    
602            /**
603             * Returns the resource finder.
604             *
605             * @return the resource finder
606             */
607            public ResourceFinder getResourceFinder() {
608                    return resourceFinder;
609            }
610    
611            /**
612             * Sets the resource finder.
613             *
614             * @param resourceFinder the resource finder
615             */
616            public void setResourceFinder(ResourceFinder resourceFinder) {
617                    this.resourceFinder = resourceFinder;
618            }
619    
620            /**
621             * Returns the user local service.
622             *
623             * @return the user local service
624             */
625            public UserLocalService getUserLocalService() {
626                    return userLocalService;
627            }
628    
629            /**
630             * Sets the user local service.
631             *
632             * @param userLocalService the user local service
633             */
634            public void setUserLocalService(UserLocalService userLocalService) {
635                    this.userLocalService = userLocalService;
636            }
637    
638            /**
639             * Returns the user remote service.
640             *
641             * @return the user remote service
642             */
643            public UserService getUserService() {
644                    return userService;
645            }
646    
647            /**
648             * Sets the user remote service.
649             *
650             * @param userService the user remote service
651             */
652            public void setUserService(UserService userService) {
653                    this.userService = userService;
654            }
655    
656            /**
657             * Returns the user persistence.
658             *
659             * @return the user persistence
660             */
661            public UserPersistence getUserPersistence() {
662                    return userPersistence;
663            }
664    
665            /**
666             * Sets the user persistence.
667             *
668             * @param userPersistence the user persistence
669             */
670            public void setUserPersistence(UserPersistence userPersistence) {
671                    this.userPersistence = userPersistence;
672            }
673    
674            /**
675             * Returns the user finder.
676             *
677             * @return the user finder
678             */
679            public UserFinder getUserFinder() {
680                    return userFinder;
681            }
682    
683            /**
684             * Sets the user finder.
685             *
686             * @param userFinder the user finder
687             */
688            public void setUserFinder(UserFinder userFinder) {
689                    this.userFinder = userFinder;
690            }
691    
692            /**
693             * Returns the expando value local service.
694             *
695             * @return the expando value local service
696             */
697            public ExpandoValueLocalService getExpandoValueLocalService() {
698                    return expandoValueLocalService;
699            }
700    
701            /**
702             * Sets the expando value local service.
703             *
704             * @param expandoValueLocalService the expando value local service
705             */
706            public void setExpandoValueLocalService(
707                    ExpandoValueLocalService expandoValueLocalService) {
708                    this.expandoValueLocalService = expandoValueLocalService;
709            }
710    
711            /**
712             * Returns the expando value remote service.
713             *
714             * @return the expando value remote service
715             */
716            public ExpandoValueService getExpandoValueService() {
717                    return expandoValueService;
718            }
719    
720            /**
721             * Sets the expando value remote service.
722             *
723             * @param expandoValueService the expando value remote service
724             */
725            public void setExpandoValueService(ExpandoValueService expandoValueService) {
726                    this.expandoValueService = expandoValueService;
727            }
728    
729            /**
730             * Returns the expando value persistence.
731             *
732             * @return the expando value persistence
733             */
734            public ExpandoValuePersistence getExpandoValuePersistence() {
735                    return expandoValuePersistence;
736            }
737    
738            /**
739             * Sets the expando value persistence.
740             *
741             * @param expandoValuePersistence the expando value persistence
742             */
743            public void setExpandoValuePersistence(
744                    ExpandoValuePersistence expandoValuePersistence) {
745                    this.expandoValuePersistence = expandoValuePersistence;
746            }
747    
748            public void afterPropertiesSet() {
749                    persistedModelLocalServiceRegistry.register("com.liferay.portlet.bookmarks.model.BookmarksFolder",
750                            bookmarksFolderLocalService);
751            }
752    
753            public void destroy() {
754                    persistedModelLocalServiceRegistry.unregister(
755                            "com.liferay.portlet.bookmarks.model.BookmarksFolder");
756            }
757    
758            /**
759             * Returns the Spring bean ID for this bean.
760             *
761             * @return the Spring bean ID for this bean
762             */
763            public String getBeanIdentifier() {
764                    return _beanIdentifier;
765            }
766    
767            /**
768             * Sets the Spring bean ID for this bean.
769             *
770             * @param beanIdentifier the Spring bean ID for this bean
771             */
772            public void setBeanIdentifier(String beanIdentifier) {
773                    _beanIdentifier = beanIdentifier;
774            }
775    
776            protected Class<?> getModelClass() {
777                    return BookmarksFolder.class;
778            }
779    
780            protected String getModelClassName() {
781                    return BookmarksFolder.class.getName();
782            }
783    
784            /**
785             * Performs an SQL query.
786             *
787             * @param sql the sql query
788             */
789            protected void runSQL(String sql) throws SystemException {
790                    try {
791                            DataSource dataSource = bookmarksFolderPersistence.getDataSource();
792    
793                            SqlUpdate sqlUpdate = SqlUpdateFactoryUtil.getSqlUpdate(dataSource,
794                                            sql, new int[0]);
795    
796                            sqlUpdate.update();
797                    }
798                    catch (Exception e) {
799                            throw new SystemException(e);
800                    }
801            }
802    
803            @BeanReference(type = BookmarksEntryLocalService.class)
804            protected BookmarksEntryLocalService bookmarksEntryLocalService;
805            @BeanReference(type = BookmarksEntryService.class)
806            protected BookmarksEntryService bookmarksEntryService;
807            @BeanReference(type = BookmarksEntryPersistence.class)
808            protected BookmarksEntryPersistence bookmarksEntryPersistence;
809            @BeanReference(type = BookmarksEntryFinder.class)
810            protected BookmarksEntryFinder bookmarksEntryFinder;
811            @BeanReference(type = BookmarksFolderLocalService.class)
812            protected BookmarksFolderLocalService bookmarksFolderLocalService;
813            @BeanReference(type = BookmarksFolderService.class)
814            protected BookmarksFolderService bookmarksFolderService;
815            @BeanReference(type = BookmarksFolderPersistence.class)
816            protected BookmarksFolderPersistence bookmarksFolderPersistence;
817            @BeanReference(type = BookmarksFolderFinder.class)
818            protected BookmarksFolderFinder bookmarksFolderFinder;
819            @BeanReference(type = CounterLocalService.class)
820            protected CounterLocalService counterLocalService;
821            @BeanReference(type = GroupLocalService.class)
822            protected GroupLocalService groupLocalService;
823            @BeanReference(type = GroupService.class)
824            protected GroupService groupService;
825            @BeanReference(type = GroupPersistence.class)
826            protected GroupPersistence groupPersistence;
827            @BeanReference(type = GroupFinder.class)
828            protected GroupFinder groupFinder;
829            @BeanReference(type = ResourceLocalService.class)
830            protected ResourceLocalService resourceLocalService;
831            @BeanReference(type = ResourceService.class)
832            protected ResourceService resourceService;
833            @BeanReference(type = ResourcePersistence.class)
834            protected ResourcePersistence resourcePersistence;
835            @BeanReference(type = ResourceFinder.class)
836            protected ResourceFinder resourceFinder;
837            @BeanReference(type = UserLocalService.class)
838            protected UserLocalService userLocalService;
839            @BeanReference(type = UserService.class)
840            protected UserService userService;
841            @BeanReference(type = UserPersistence.class)
842            protected UserPersistence userPersistence;
843            @BeanReference(type = UserFinder.class)
844            protected UserFinder userFinder;
845            @BeanReference(type = ExpandoValueLocalService.class)
846            protected ExpandoValueLocalService expandoValueLocalService;
847            @BeanReference(type = ExpandoValueService.class)
848            protected ExpandoValueService expandoValueService;
849            @BeanReference(type = ExpandoValuePersistence.class)
850            protected ExpandoValuePersistence expandoValuePersistence;
851            @BeanReference(type = PersistedModelLocalServiceRegistry.class)
852            protected PersistedModelLocalServiceRegistry persistedModelLocalServiceRegistry;
853            private String _beanIdentifier;
854    }