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