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