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