001    /**
002     * Copyright (c) 2000-present 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.asset.service.base;
016    
017    import aQute.bnd.annotation.ProviderType;
018    
019    import com.liferay.asset.kernel.model.AssetEntry;
020    import com.liferay.asset.kernel.service.AssetEntryLocalService;
021    import com.liferay.asset.kernel.service.persistence.AssetCategoryFinder;
022    import com.liferay.asset.kernel.service.persistence.AssetCategoryPersistence;
023    import com.liferay.asset.kernel.service.persistence.AssetEntryFinder;
024    import com.liferay.asset.kernel.service.persistence.AssetEntryPersistence;
025    import com.liferay.asset.kernel.service.persistence.AssetLinkPersistence;
026    import com.liferay.asset.kernel.service.persistence.AssetTagFinder;
027    import com.liferay.asset.kernel.service.persistence.AssetTagPersistence;
028    
029    import com.liferay.portal.kernel.bean.BeanReference;
030    import com.liferay.portal.kernel.dao.db.DB;
031    import com.liferay.portal.kernel.dao.db.DBManagerUtil;
032    import com.liferay.portal.kernel.dao.jdbc.SqlUpdate;
033    import com.liferay.portal.kernel.dao.jdbc.SqlUpdateFactoryUtil;
034    import com.liferay.portal.kernel.dao.orm.ActionableDynamicQuery;
035    import com.liferay.portal.kernel.dao.orm.DefaultActionableDynamicQuery;
036    import com.liferay.portal.kernel.dao.orm.DynamicQuery;
037    import com.liferay.portal.kernel.dao.orm.DynamicQueryFactoryUtil;
038    import com.liferay.portal.kernel.dao.orm.IndexableActionableDynamicQuery;
039    import com.liferay.portal.kernel.dao.orm.Projection;
040    import com.liferay.portal.kernel.exception.PortalException;
041    import com.liferay.portal.kernel.exception.SystemException;
042    import com.liferay.portal.kernel.model.PersistedModel;
043    import com.liferay.portal.kernel.module.framework.service.IdentifiableOSGiService;
044    import com.liferay.portal.kernel.search.Indexable;
045    import com.liferay.portal.kernel.search.IndexableType;
046    import com.liferay.portal.kernel.service.BaseLocalServiceImpl;
047    import com.liferay.portal.kernel.service.PersistedModelLocalServiceRegistry;
048    import com.liferay.portal.kernel.service.persistence.ClassNamePersistence;
049    import com.liferay.portal.kernel.service.persistence.CompanyPersistence;
050    import com.liferay.portal.kernel.service.persistence.GroupFinder;
051    import com.liferay.portal.kernel.service.persistence.GroupPersistence;
052    import com.liferay.portal.kernel.service.persistence.SystemEventPersistence;
053    import com.liferay.portal.kernel.service.persistence.UserFinder;
054    import com.liferay.portal.kernel.service.persistence.UserPersistence;
055    import com.liferay.portal.kernel.util.OrderByComparator;
056    import com.liferay.portal.kernel.util.PortalUtil;
057    
058    import com.liferay.social.kernel.service.persistence.SocialActivityCounterFinder;
059    import com.liferay.social.kernel.service.persistence.SocialActivityCounterPersistence;
060    import com.liferay.social.kernel.service.persistence.SocialActivityFinder;
061    import com.liferay.social.kernel.service.persistence.SocialActivityPersistence;
062    
063    import java.io.Serializable;
064    
065    import java.util.List;
066    
067    import javax.sql.DataSource;
068    
069    /**
070     * Provides the base implementation for the asset entry local service.
071     *
072     * <p>
073     * 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.asset.service.impl.AssetEntryLocalServiceImpl}.
074     * </p>
075     *
076     * @author Brian Wing Shun Chan
077     * @see com.liferay.portlet.asset.service.impl.AssetEntryLocalServiceImpl
078     * @see com.liferay.asset.kernel.service.AssetEntryLocalServiceUtil
079     * @generated
080     */
081    @ProviderType
082    public abstract class AssetEntryLocalServiceBaseImpl
083            extends BaseLocalServiceImpl implements AssetEntryLocalService,
084                    IdentifiableOSGiService {
085            /*
086             * NOTE FOR DEVELOPERS:
087             *
088             * Never modify or reference this class directly. Always use {@link com.liferay.asset.kernel.service.AssetEntryLocalServiceUtil} to access the asset entry local service.
089             */
090    
091            /**
092             * Adds the asset entry to the database. Also notifies the appropriate model listeners.
093             *
094             * @param assetEntry the asset entry
095             * @return the asset entry that was added
096             */
097            @Indexable(type = IndexableType.REINDEX)
098            @Override
099            public AssetEntry addAssetEntry(AssetEntry assetEntry) {
100                    assetEntry.setNew(true);
101    
102                    return assetEntryPersistence.update(assetEntry);
103            }
104    
105            /**
106             * Creates a new asset entry with the primary key. Does not add the asset entry to the database.
107             *
108             * @param entryId the primary key for the new asset entry
109             * @return the new asset entry
110             */
111            @Override
112            public AssetEntry createAssetEntry(long entryId) {
113                    return assetEntryPersistence.create(entryId);
114            }
115    
116            /**
117             * Deletes the asset entry with the primary key from the database. Also notifies the appropriate model listeners.
118             *
119             * @param entryId the primary key of the asset entry
120             * @return the asset entry that was removed
121             * @throws PortalException if a asset entry with the primary key could not be found
122             */
123            @Indexable(type = IndexableType.DELETE)
124            @Override
125            public AssetEntry deleteAssetEntry(long entryId) throws PortalException {
126                    return assetEntryPersistence.remove(entryId);
127            }
128    
129            /**
130             * Deletes the asset entry from the database. Also notifies the appropriate model listeners.
131             *
132             * @param assetEntry the asset entry
133             * @return the asset entry that was removed
134             */
135            @Indexable(type = IndexableType.DELETE)
136            @Override
137            public AssetEntry deleteAssetEntry(AssetEntry assetEntry) {
138                    return assetEntryPersistence.remove(assetEntry);
139            }
140    
141            @Override
142            public DynamicQuery dynamicQuery() {
143                    Class<?> clazz = getClass();
144    
145                    return DynamicQueryFactoryUtil.forClass(AssetEntry.class,
146                            clazz.getClassLoader());
147            }
148    
149            /**
150             * Performs a dynamic query on the database and returns the matching rows.
151             *
152             * @param dynamicQuery the dynamic query
153             * @return the matching rows
154             */
155            @Override
156            public <T> List<T> dynamicQuery(DynamicQuery dynamicQuery) {
157                    return assetEntryPersistence.findWithDynamicQuery(dynamicQuery);
158            }
159    
160            /**
161             * Performs a dynamic query on the database and returns a range of the matching rows.
162             *
163             * <p>
164             * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portlet.asset.model.impl.AssetEntryModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
165             * </p>
166             *
167             * @param dynamicQuery the dynamic query
168             * @param start the lower bound of the range of model instances
169             * @param end the upper bound of the range of model instances (not inclusive)
170             * @return the range of matching rows
171             */
172            @Override
173            public <T> List<T> dynamicQuery(DynamicQuery dynamicQuery, int start,
174                    int end) {
175                    return assetEntryPersistence.findWithDynamicQuery(dynamicQuery, start,
176                            end);
177            }
178    
179            /**
180             * Performs a dynamic query on the database and returns an ordered range of the matching rows.
181             *
182             * <p>
183             * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portlet.asset.model.impl.AssetEntryModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
184             * </p>
185             *
186             * @param dynamicQuery the dynamic query
187             * @param start the lower bound of the range of model instances
188             * @param end the upper bound of the range of model instances (not inclusive)
189             * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
190             * @return the ordered range of matching rows
191             */
192            @Override
193            public <T> List<T> dynamicQuery(DynamicQuery dynamicQuery, int start,
194                    int end, OrderByComparator<T> orderByComparator) {
195                    return assetEntryPersistence.findWithDynamicQuery(dynamicQuery, start,
196                            end, orderByComparator);
197            }
198    
199            /**
200             * Returns the number of rows matching the dynamic query.
201             *
202             * @param dynamicQuery the dynamic query
203             * @return the number of rows matching the dynamic query
204             */
205            @Override
206            public long dynamicQueryCount(DynamicQuery dynamicQuery) {
207                    return assetEntryPersistence.countWithDynamicQuery(dynamicQuery);
208            }
209    
210            /**
211             * Returns the number of rows matching the dynamic query.
212             *
213             * @param dynamicQuery the dynamic query
214             * @param projection the projection to apply to the query
215             * @return the number of rows matching the dynamic query
216             */
217            @Override
218            public long dynamicQueryCount(DynamicQuery dynamicQuery,
219                    Projection projection) {
220                    return assetEntryPersistence.countWithDynamicQuery(dynamicQuery,
221                            projection);
222            }
223    
224            @Override
225            public AssetEntry fetchAssetEntry(long entryId) {
226                    return assetEntryPersistence.fetchByPrimaryKey(entryId);
227            }
228    
229            /**
230             * Returns the asset entry with the primary key.
231             *
232             * @param entryId the primary key of the asset entry
233             * @return the asset entry
234             * @throws PortalException if a asset entry with the primary key could not be found
235             */
236            @Override
237            public AssetEntry getAssetEntry(long entryId) throws PortalException {
238                    return assetEntryPersistence.findByPrimaryKey(entryId);
239            }
240    
241            @Override
242            public ActionableDynamicQuery getActionableDynamicQuery() {
243                    ActionableDynamicQuery actionableDynamicQuery = new DefaultActionableDynamicQuery();
244    
245                    actionableDynamicQuery.setBaseLocalService(assetEntryLocalService);
246                    actionableDynamicQuery.setClassLoader(getClassLoader());
247                    actionableDynamicQuery.setModelClass(AssetEntry.class);
248    
249                    actionableDynamicQuery.setPrimaryKeyPropertyName("entryId");
250    
251                    return actionableDynamicQuery;
252            }
253    
254            @Override
255            public IndexableActionableDynamicQuery getIndexableActionableDynamicQuery() {
256                    IndexableActionableDynamicQuery indexableActionableDynamicQuery = new IndexableActionableDynamicQuery();
257    
258                    indexableActionableDynamicQuery.setBaseLocalService(assetEntryLocalService);
259                    indexableActionableDynamicQuery.setClassLoader(getClassLoader());
260                    indexableActionableDynamicQuery.setModelClass(AssetEntry.class);
261    
262                    indexableActionableDynamicQuery.setPrimaryKeyPropertyName("entryId");
263    
264                    return indexableActionableDynamicQuery;
265            }
266    
267            protected void initActionableDynamicQuery(
268                    ActionableDynamicQuery actionableDynamicQuery) {
269                    actionableDynamicQuery.setBaseLocalService(assetEntryLocalService);
270                    actionableDynamicQuery.setClassLoader(getClassLoader());
271                    actionableDynamicQuery.setModelClass(AssetEntry.class);
272    
273                    actionableDynamicQuery.setPrimaryKeyPropertyName("entryId");
274            }
275    
276            /**
277             * @throws PortalException
278             */
279            @Override
280            public PersistedModel deletePersistedModel(PersistedModel persistedModel)
281                    throws PortalException {
282                    return assetEntryLocalService.deleteAssetEntry((AssetEntry)persistedModel);
283            }
284    
285            @Override
286            public PersistedModel getPersistedModel(Serializable primaryKeyObj)
287                    throws PortalException {
288                    return assetEntryPersistence.findByPrimaryKey(primaryKeyObj);
289            }
290    
291            /**
292             * Returns a range of all the asset entries.
293             *
294             * <p>
295             * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portlet.asset.model.impl.AssetEntryModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
296             * </p>
297             *
298             * @param start the lower bound of the range of asset entries
299             * @param end the upper bound of the range of asset entries (not inclusive)
300             * @return the range of asset entries
301             */
302            @Override
303            public List<AssetEntry> getAssetEntries(int start, int end) {
304                    return assetEntryPersistence.findAll(start, end);
305            }
306    
307            /**
308             * Returns the number of asset entries.
309             *
310             * @return the number of asset entries
311             */
312            @Override
313            public int getAssetEntriesCount() {
314                    return assetEntryPersistence.countAll();
315            }
316    
317            /**
318             * Updates the asset entry in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.
319             *
320             * @param assetEntry the asset entry
321             * @return the asset entry that was updated
322             */
323            @Indexable(type = IndexableType.REINDEX)
324            @Override
325            public AssetEntry updateAssetEntry(AssetEntry assetEntry) {
326                    return assetEntryPersistence.update(assetEntry);
327            }
328    
329            /**
330             */
331            @Override
332            public void addAssetCategoryAssetEntry(long categoryId, long entryId) {
333                    assetCategoryPersistence.addAssetEntry(categoryId, entryId);
334            }
335    
336            /**
337             */
338            @Override
339            public void addAssetCategoryAssetEntry(long categoryId,
340                    AssetEntry assetEntry) {
341                    assetCategoryPersistence.addAssetEntry(categoryId, assetEntry);
342            }
343    
344            /**
345             */
346            @Override
347            public void addAssetCategoryAssetEntries(long categoryId, long[] entryIds) {
348                    assetCategoryPersistence.addAssetEntries(categoryId, entryIds);
349            }
350    
351            /**
352             */
353            @Override
354            public void addAssetCategoryAssetEntries(long categoryId,
355                    List<AssetEntry> assetEntries) {
356                    assetCategoryPersistence.addAssetEntries(categoryId, assetEntries);
357            }
358    
359            /**
360             */
361            @Override
362            public void clearAssetCategoryAssetEntries(long categoryId) {
363                    assetCategoryPersistence.clearAssetEntries(categoryId);
364            }
365    
366            /**
367             */
368            @Override
369            public void deleteAssetCategoryAssetEntry(long categoryId, long entryId) {
370                    assetCategoryPersistence.removeAssetEntry(categoryId, entryId);
371            }
372    
373            /**
374             */
375            @Override
376            public void deleteAssetCategoryAssetEntry(long categoryId,
377                    AssetEntry assetEntry) {
378                    assetCategoryPersistence.removeAssetEntry(categoryId, assetEntry);
379            }
380    
381            /**
382             */
383            @Override
384            public void deleteAssetCategoryAssetEntries(long categoryId, long[] entryIds) {
385                    assetCategoryPersistence.removeAssetEntries(categoryId, entryIds);
386            }
387    
388            /**
389             */
390            @Override
391            public void deleteAssetCategoryAssetEntries(long categoryId,
392                    List<AssetEntry> assetEntries) {
393                    assetCategoryPersistence.removeAssetEntries(categoryId, assetEntries);
394            }
395    
396            /**
397             * Returns the categoryIds of the asset categories associated with the asset entry.
398             *
399             * @param entryId the entryId of the asset entry
400             * @return long[] the categoryIds of asset categories associated with the asset entry
401             */
402            @Override
403            public long[] getAssetCategoryPrimaryKeys(long entryId) {
404                    return assetEntryPersistence.getAssetCategoryPrimaryKeys(entryId);
405            }
406    
407            /**
408             */
409            @Override
410            public List<AssetEntry> getAssetCategoryAssetEntries(long categoryId) {
411                    return assetCategoryPersistence.getAssetEntries(categoryId);
412            }
413    
414            /**
415             */
416            @Override
417            public List<AssetEntry> getAssetCategoryAssetEntries(long categoryId,
418                    int start, int end) {
419                    return assetCategoryPersistence.getAssetEntries(categoryId, start, end);
420            }
421    
422            /**
423             */
424            @Override
425            public List<AssetEntry> getAssetCategoryAssetEntries(long categoryId,
426                    int start, int end, OrderByComparator<AssetEntry> orderByComparator) {
427                    return assetCategoryPersistence.getAssetEntries(categoryId, start, end,
428                            orderByComparator);
429            }
430    
431            /**
432             */
433            @Override
434            public int getAssetCategoryAssetEntriesCount(long categoryId) {
435                    return assetCategoryPersistence.getAssetEntriesSize(categoryId);
436            }
437    
438            /**
439             */
440            @Override
441            public boolean hasAssetCategoryAssetEntry(long categoryId, long entryId) {
442                    return assetCategoryPersistence.containsAssetEntry(categoryId, entryId);
443            }
444    
445            /**
446             */
447            @Override
448            public boolean hasAssetCategoryAssetEntries(long categoryId) {
449                    return assetCategoryPersistence.containsAssetEntries(categoryId);
450            }
451    
452            /**
453             */
454            @Override
455            public void setAssetCategoryAssetEntries(long categoryId, long[] entryIds) {
456                    assetCategoryPersistence.setAssetEntries(categoryId, entryIds);
457            }
458    
459            /**
460             */
461            @Override
462            public void addAssetTagAssetEntry(long tagId, long entryId) {
463                    assetTagPersistence.addAssetEntry(tagId, entryId);
464            }
465    
466            /**
467             */
468            @Override
469            public void addAssetTagAssetEntry(long tagId, AssetEntry assetEntry) {
470                    assetTagPersistence.addAssetEntry(tagId, assetEntry);
471            }
472    
473            /**
474             */
475            @Override
476            public void addAssetTagAssetEntries(long tagId, long[] entryIds) {
477                    assetTagPersistence.addAssetEntries(tagId, entryIds);
478            }
479    
480            /**
481             */
482            @Override
483            public void addAssetTagAssetEntries(long tagId,
484                    List<AssetEntry> assetEntries) {
485                    assetTagPersistence.addAssetEntries(tagId, assetEntries);
486            }
487    
488            /**
489             */
490            @Override
491            public void clearAssetTagAssetEntries(long tagId) {
492                    assetTagPersistence.clearAssetEntries(tagId);
493            }
494    
495            /**
496             */
497            @Override
498            public void deleteAssetTagAssetEntry(long tagId, long entryId) {
499                    assetTagPersistence.removeAssetEntry(tagId, entryId);
500            }
501    
502            /**
503             */
504            @Override
505            public void deleteAssetTagAssetEntry(long tagId, AssetEntry assetEntry) {
506                    assetTagPersistence.removeAssetEntry(tagId, assetEntry);
507            }
508    
509            /**
510             */
511            @Override
512            public void deleteAssetTagAssetEntries(long tagId, long[] entryIds) {
513                    assetTagPersistence.removeAssetEntries(tagId, entryIds);
514            }
515    
516            /**
517             */
518            @Override
519            public void deleteAssetTagAssetEntries(long tagId,
520                    List<AssetEntry> assetEntries) {
521                    assetTagPersistence.removeAssetEntries(tagId, assetEntries);
522            }
523    
524            /**
525             * Returns the tagIds of the asset tags associated with the asset entry.
526             *
527             * @param entryId the entryId of the asset entry
528             * @return long[] the tagIds of asset tags associated with the asset entry
529             */
530            @Override
531            public long[] getAssetTagPrimaryKeys(long entryId) {
532                    return assetEntryPersistence.getAssetTagPrimaryKeys(entryId);
533            }
534    
535            /**
536             */
537            @Override
538            public List<AssetEntry> getAssetTagAssetEntries(long tagId) {
539                    return assetTagPersistence.getAssetEntries(tagId);
540            }
541    
542            /**
543             */
544            @Override
545            public List<AssetEntry> getAssetTagAssetEntries(long tagId, int start,
546                    int end) {
547                    return assetTagPersistence.getAssetEntries(tagId, start, end);
548            }
549    
550            /**
551             */
552            @Override
553            public List<AssetEntry> getAssetTagAssetEntries(long tagId, int start,
554                    int end, OrderByComparator<AssetEntry> orderByComparator) {
555                    return assetTagPersistence.getAssetEntries(tagId, start, end,
556                            orderByComparator);
557            }
558    
559            /**
560             */
561            @Override
562            public int getAssetTagAssetEntriesCount(long tagId) {
563                    return assetTagPersistence.getAssetEntriesSize(tagId);
564            }
565    
566            /**
567             */
568            @Override
569            public boolean hasAssetTagAssetEntry(long tagId, long entryId) {
570                    return assetTagPersistence.containsAssetEntry(tagId, entryId);
571            }
572    
573            /**
574             */
575            @Override
576            public boolean hasAssetTagAssetEntries(long tagId) {
577                    return assetTagPersistence.containsAssetEntries(tagId);
578            }
579    
580            /**
581             */
582            @Override
583            public void setAssetTagAssetEntries(long tagId, long[] entryIds) {
584                    assetTagPersistence.setAssetEntries(tagId, entryIds);
585            }
586    
587            /**
588             * Returns the asset entry local service.
589             *
590             * @return the asset entry local service
591             */
592            public AssetEntryLocalService getAssetEntryLocalService() {
593                    return assetEntryLocalService;
594            }
595    
596            /**
597             * Sets the asset entry local service.
598             *
599             * @param assetEntryLocalService the asset entry local service
600             */
601            public void setAssetEntryLocalService(
602                    AssetEntryLocalService assetEntryLocalService) {
603                    this.assetEntryLocalService = assetEntryLocalService;
604            }
605    
606            /**
607             * Returns the asset entry persistence.
608             *
609             * @return the asset entry persistence
610             */
611            public AssetEntryPersistence getAssetEntryPersistence() {
612                    return assetEntryPersistence;
613            }
614    
615            /**
616             * Sets the asset entry persistence.
617             *
618             * @param assetEntryPersistence the asset entry persistence
619             */
620            public void setAssetEntryPersistence(
621                    AssetEntryPersistence assetEntryPersistence) {
622                    this.assetEntryPersistence = assetEntryPersistence;
623            }
624    
625            /**
626             * Returns the asset entry finder.
627             *
628             * @return the asset entry finder
629             */
630            public AssetEntryFinder getAssetEntryFinder() {
631                    return assetEntryFinder;
632            }
633    
634            /**
635             * Sets the asset entry finder.
636             *
637             * @param assetEntryFinder the asset entry finder
638             */
639            public void setAssetEntryFinder(AssetEntryFinder assetEntryFinder) {
640                    this.assetEntryFinder = assetEntryFinder;
641            }
642    
643            /**
644             * Returns the counter local service.
645             *
646             * @return the counter local service
647             */
648            public com.liferay.counter.kernel.service.CounterLocalService getCounterLocalService() {
649                    return counterLocalService;
650            }
651    
652            /**
653             * Sets the counter local service.
654             *
655             * @param counterLocalService the counter local service
656             */
657            public void setCounterLocalService(
658                    com.liferay.counter.kernel.service.CounterLocalService counterLocalService) {
659                    this.counterLocalService = counterLocalService;
660            }
661    
662            /**
663             * Returns the class name local service.
664             *
665             * @return the class name local service
666             */
667            public com.liferay.portal.kernel.service.ClassNameLocalService getClassNameLocalService() {
668                    return classNameLocalService;
669            }
670    
671            /**
672             * Sets the class name local service.
673             *
674             * @param classNameLocalService the class name local service
675             */
676            public void setClassNameLocalService(
677                    com.liferay.portal.kernel.service.ClassNameLocalService classNameLocalService) {
678                    this.classNameLocalService = classNameLocalService;
679            }
680    
681            /**
682             * Returns the class name persistence.
683             *
684             * @return the class name persistence
685             */
686            public ClassNamePersistence getClassNamePersistence() {
687                    return classNamePersistence;
688            }
689    
690            /**
691             * Sets the class name persistence.
692             *
693             * @param classNamePersistence the class name persistence
694             */
695            public void setClassNamePersistence(
696                    ClassNamePersistence classNamePersistence) {
697                    this.classNamePersistence = classNamePersistence;
698            }
699    
700            /**
701             * Returns the company local service.
702             *
703             * @return the company local service
704             */
705            public com.liferay.portal.kernel.service.CompanyLocalService getCompanyLocalService() {
706                    return companyLocalService;
707            }
708    
709            /**
710             * Sets the company local service.
711             *
712             * @param companyLocalService the company local service
713             */
714            public void setCompanyLocalService(
715                    com.liferay.portal.kernel.service.CompanyLocalService companyLocalService) {
716                    this.companyLocalService = companyLocalService;
717            }
718    
719            /**
720             * Returns the company persistence.
721             *
722             * @return the company persistence
723             */
724            public CompanyPersistence getCompanyPersistence() {
725                    return companyPersistence;
726            }
727    
728            /**
729             * Sets the company persistence.
730             *
731             * @param companyPersistence the company persistence
732             */
733            public void setCompanyPersistence(CompanyPersistence companyPersistence) {
734                    this.companyPersistence = companyPersistence;
735            }
736    
737            /**
738             * Returns the group local service.
739             *
740             * @return the group local service
741             */
742            public com.liferay.portal.kernel.service.GroupLocalService getGroupLocalService() {
743                    return groupLocalService;
744            }
745    
746            /**
747             * Sets the group local service.
748             *
749             * @param groupLocalService the group local service
750             */
751            public void setGroupLocalService(
752                    com.liferay.portal.kernel.service.GroupLocalService groupLocalService) {
753                    this.groupLocalService = groupLocalService;
754            }
755    
756            /**
757             * Returns the group persistence.
758             *
759             * @return the group persistence
760             */
761            public GroupPersistence getGroupPersistence() {
762                    return groupPersistence;
763            }
764    
765            /**
766             * Sets the group persistence.
767             *
768             * @param groupPersistence the group persistence
769             */
770            public void setGroupPersistence(GroupPersistence groupPersistence) {
771                    this.groupPersistence = groupPersistence;
772            }
773    
774            /**
775             * Returns the group finder.
776             *
777             * @return the group finder
778             */
779            public GroupFinder getGroupFinder() {
780                    return groupFinder;
781            }
782    
783            /**
784             * Sets the group finder.
785             *
786             * @param groupFinder the group finder
787             */
788            public void setGroupFinder(GroupFinder groupFinder) {
789                    this.groupFinder = groupFinder;
790            }
791    
792            /**
793             * Returns the system event local service.
794             *
795             * @return the system event local service
796             */
797            public com.liferay.portal.kernel.service.SystemEventLocalService getSystemEventLocalService() {
798                    return systemEventLocalService;
799            }
800    
801            /**
802             * Sets the system event local service.
803             *
804             * @param systemEventLocalService the system event local service
805             */
806            public void setSystemEventLocalService(
807                    com.liferay.portal.kernel.service.SystemEventLocalService systemEventLocalService) {
808                    this.systemEventLocalService = systemEventLocalService;
809            }
810    
811            /**
812             * Returns the system event persistence.
813             *
814             * @return the system event persistence
815             */
816            public SystemEventPersistence getSystemEventPersistence() {
817                    return systemEventPersistence;
818            }
819    
820            /**
821             * Sets the system event persistence.
822             *
823             * @param systemEventPersistence the system event persistence
824             */
825            public void setSystemEventPersistence(
826                    SystemEventPersistence systemEventPersistence) {
827                    this.systemEventPersistence = systemEventPersistence;
828            }
829    
830            /**
831             * Returns the user local service.
832             *
833             * @return the user local service
834             */
835            public com.liferay.portal.kernel.service.UserLocalService getUserLocalService() {
836                    return userLocalService;
837            }
838    
839            /**
840             * Sets the user local service.
841             *
842             * @param userLocalService the user local service
843             */
844            public void setUserLocalService(
845                    com.liferay.portal.kernel.service.UserLocalService userLocalService) {
846                    this.userLocalService = userLocalService;
847            }
848    
849            /**
850             * Returns the user persistence.
851             *
852             * @return the user persistence
853             */
854            public UserPersistence getUserPersistence() {
855                    return userPersistence;
856            }
857    
858            /**
859             * Sets the user persistence.
860             *
861             * @param userPersistence the user persistence
862             */
863            public void setUserPersistence(UserPersistence userPersistence) {
864                    this.userPersistence = userPersistence;
865            }
866    
867            /**
868             * Returns the user finder.
869             *
870             * @return the user finder
871             */
872            public UserFinder getUserFinder() {
873                    return userFinder;
874            }
875    
876            /**
877             * Sets the user finder.
878             *
879             * @param userFinder the user finder
880             */
881            public void setUserFinder(UserFinder userFinder) {
882                    this.userFinder = userFinder;
883            }
884    
885            /**
886             * Returns the asset category local service.
887             *
888             * @return the asset category local service
889             */
890            public com.liferay.asset.kernel.service.AssetCategoryLocalService getAssetCategoryLocalService() {
891                    return assetCategoryLocalService;
892            }
893    
894            /**
895             * Sets the asset category local service.
896             *
897             * @param assetCategoryLocalService the asset category local service
898             */
899            public void setAssetCategoryLocalService(
900                    com.liferay.asset.kernel.service.AssetCategoryLocalService assetCategoryLocalService) {
901                    this.assetCategoryLocalService = assetCategoryLocalService;
902            }
903    
904            /**
905             * Returns the asset category persistence.
906             *
907             * @return the asset category persistence
908             */
909            public AssetCategoryPersistence getAssetCategoryPersistence() {
910                    return assetCategoryPersistence;
911            }
912    
913            /**
914             * Sets the asset category persistence.
915             *
916             * @param assetCategoryPersistence the asset category persistence
917             */
918            public void setAssetCategoryPersistence(
919                    AssetCategoryPersistence assetCategoryPersistence) {
920                    this.assetCategoryPersistence = assetCategoryPersistence;
921            }
922    
923            /**
924             * Returns the asset category finder.
925             *
926             * @return the asset category finder
927             */
928            public AssetCategoryFinder getAssetCategoryFinder() {
929                    return assetCategoryFinder;
930            }
931    
932            /**
933             * Sets the asset category finder.
934             *
935             * @param assetCategoryFinder the asset category finder
936             */
937            public void setAssetCategoryFinder(AssetCategoryFinder assetCategoryFinder) {
938                    this.assetCategoryFinder = assetCategoryFinder;
939            }
940    
941            /**
942             * Returns the social activity local service.
943             *
944             * @return the social activity local service
945             */
946            public com.liferay.social.kernel.service.SocialActivityLocalService getSocialActivityLocalService() {
947                    return socialActivityLocalService;
948            }
949    
950            /**
951             * Sets the social activity local service.
952             *
953             * @param socialActivityLocalService the social activity local service
954             */
955            public void setSocialActivityLocalService(
956                    com.liferay.social.kernel.service.SocialActivityLocalService socialActivityLocalService) {
957                    this.socialActivityLocalService = socialActivityLocalService;
958            }
959    
960            /**
961             * Returns the social activity persistence.
962             *
963             * @return the social activity persistence
964             */
965            public SocialActivityPersistence getSocialActivityPersistence() {
966                    return socialActivityPersistence;
967            }
968    
969            /**
970             * Sets the social activity persistence.
971             *
972             * @param socialActivityPersistence the social activity persistence
973             */
974            public void setSocialActivityPersistence(
975                    SocialActivityPersistence socialActivityPersistence) {
976                    this.socialActivityPersistence = socialActivityPersistence;
977            }
978    
979            /**
980             * Returns the social activity finder.
981             *
982             * @return the social activity finder
983             */
984            public SocialActivityFinder getSocialActivityFinder() {
985                    return socialActivityFinder;
986            }
987    
988            /**
989             * Sets the social activity finder.
990             *
991             * @param socialActivityFinder the social activity finder
992             */
993            public void setSocialActivityFinder(
994                    SocialActivityFinder socialActivityFinder) {
995                    this.socialActivityFinder = socialActivityFinder;
996            }
997    
998            /**
999             * Returns the social activity counter local service.
1000             *
1001             * @return the social activity counter local service
1002             */
1003            public com.liferay.social.kernel.service.SocialActivityCounterLocalService getSocialActivityCounterLocalService() {
1004                    return socialActivityCounterLocalService;
1005            }
1006    
1007            /**
1008             * Sets the social activity counter local service.
1009             *
1010             * @param socialActivityCounterLocalService the social activity counter local service
1011             */
1012            public void setSocialActivityCounterLocalService(
1013                    com.liferay.social.kernel.service.SocialActivityCounterLocalService socialActivityCounterLocalService) {
1014                    this.socialActivityCounterLocalService = socialActivityCounterLocalService;
1015            }
1016    
1017            /**
1018             * Returns the social activity counter persistence.
1019             *
1020             * @return the social activity counter persistence
1021             */
1022            public SocialActivityCounterPersistence getSocialActivityCounterPersistence() {
1023                    return socialActivityCounterPersistence;
1024            }
1025    
1026            /**
1027             * Sets the social activity counter persistence.
1028             *
1029             * @param socialActivityCounterPersistence the social activity counter persistence
1030             */
1031            public void setSocialActivityCounterPersistence(
1032                    SocialActivityCounterPersistence socialActivityCounterPersistence) {
1033                    this.socialActivityCounterPersistence = socialActivityCounterPersistence;
1034            }
1035    
1036            /**
1037             * Returns the social activity counter finder.
1038             *
1039             * @return the social activity counter finder
1040             */
1041            public SocialActivityCounterFinder getSocialActivityCounterFinder() {
1042                    return socialActivityCounterFinder;
1043            }
1044    
1045            /**
1046             * Sets the social activity counter finder.
1047             *
1048             * @param socialActivityCounterFinder the social activity counter finder
1049             */
1050            public void setSocialActivityCounterFinder(
1051                    SocialActivityCounterFinder socialActivityCounterFinder) {
1052                    this.socialActivityCounterFinder = socialActivityCounterFinder;
1053            }
1054    
1055            /**
1056             * Returns the asset link local service.
1057             *
1058             * @return the asset link local service
1059             */
1060            public com.liferay.asset.kernel.service.AssetLinkLocalService getAssetLinkLocalService() {
1061                    return assetLinkLocalService;
1062            }
1063    
1064            /**
1065             * Sets the asset link local service.
1066             *
1067             * @param assetLinkLocalService the asset link local service
1068             */
1069            public void setAssetLinkLocalService(
1070                    com.liferay.asset.kernel.service.AssetLinkLocalService assetLinkLocalService) {
1071                    this.assetLinkLocalService = assetLinkLocalService;
1072            }
1073    
1074            /**
1075             * Returns the asset link persistence.
1076             *
1077             * @return the asset link persistence
1078             */
1079            public AssetLinkPersistence getAssetLinkPersistence() {
1080                    return assetLinkPersistence;
1081            }
1082    
1083            /**
1084             * Sets the asset link persistence.
1085             *
1086             * @param assetLinkPersistence the asset link persistence
1087             */
1088            public void setAssetLinkPersistence(
1089                    AssetLinkPersistence assetLinkPersistence) {
1090                    this.assetLinkPersistence = assetLinkPersistence;
1091            }
1092    
1093            /**
1094             * Returns the asset tag local service.
1095             *
1096             * @return the asset tag local service
1097             */
1098            public com.liferay.asset.kernel.service.AssetTagLocalService getAssetTagLocalService() {
1099                    return assetTagLocalService;
1100            }
1101    
1102            /**
1103             * Sets the asset tag local service.
1104             *
1105             * @param assetTagLocalService the asset tag local service
1106             */
1107            public void setAssetTagLocalService(
1108                    com.liferay.asset.kernel.service.AssetTagLocalService assetTagLocalService) {
1109                    this.assetTagLocalService = assetTagLocalService;
1110            }
1111    
1112            /**
1113             * Returns the asset tag persistence.
1114             *
1115             * @return the asset tag persistence
1116             */
1117            public AssetTagPersistence getAssetTagPersistence() {
1118                    return assetTagPersistence;
1119            }
1120    
1121            /**
1122             * Sets the asset tag persistence.
1123             *
1124             * @param assetTagPersistence the asset tag persistence
1125             */
1126            public void setAssetTagPersistence(AssetTagPersistence assetTagPersistence) {
1127                    this.assetTagPersistence = assetTagPersistence;
1128            }
1129    
1130            /**
1131             * Returns the asset tag finder.
1132             *
1133             * @return the asset tag finder
1134             */
1135            public AssetTagFinder getAssetTagFinder() {
1136                    return assetTagFinder;
1137            }
1138    
1139            /**
1140             * Sets the asset tag finder.
1141             *
1142             * @param assetTagFinder the asset tag finder
1143             */
1144            public void setAssetTagFinder(AssetTagFinder assetTagFinder) {
1145                    this.assetTagFinder = assetTagFinder;
1146            }
1147    
1148            public void afterPropertiesSet() {
1149                    persistedModelLocalServiceRegistry.register("com.liferay.asset.kernel.model.AssetEntry",
1150                            assetEntryLocalService);
1151            }
1152    
1153            public void destroy() {
1154                    persistedModelLocalServiceRegistry.unregister(
1155                            "com.liferay.asset.kernel.model.AssetEntry");
1156            }
1157    
1158            /**
1159             * Returns the OSGi service identifier.
1160             *
1161             * @return the OSGi service identifier
1162             */
1163            @Override
1164            public String getOSGiServiceIdentifier() {
1165                    return AssetEntryLocalService.class.getName();
1166            }
1167    
1168            protected Class<?> getModelClass() {
1169                    return AssetEntry.class;
1170            }
1171    
1172            protected String getModelClassName() {
1173                    return AssetEntry.class.getName();
1174            }
1175    
1176            /**
1177             * Performs a SQL query.
1178             *
1179             * @param sql the sql query
1180             */
1181            protected void runSQL(String sql) {
1182                    try {
1183                            DataSource dataSource = assetEntryPersistence.getDataSource();
1184    
1185                            DB db = DBManagerUtil.getDB();
1186    
1187                            sql = db.buildSQL(sql);
1188                            sql = PortalUtil.transformSQL(sql);
1189    
1190                            SqlUpdate sqlUpdate = SqlUpdateFactoryUtil.getSqlUpdate(dataSource,
1191                                            sql);
1192    
1193                            sqlUpdate.update();
1194                    }
1195                    catch (Exception e) {
1196                            throw new SystemException(e);
1197                    }
1198            }
1199    
1200            @BeanReference(type = AssetEntryLocalService.class)
1201            protected AssetEntryLocalService assetEntryLocalService;
1202            @BeanReference(type = AssetEntryPersistence.class)
1203            protected AssetEntryPersistence assetEntryPersistence;
1204            @BeanReference(type = AssetEntryFinder.class)
1205            protected AssetEntryFinder assetEntryFinder;
1206            @BeanReference(type = com.liferay.counter.kernel.service.CounterLocalService.class)
1207            protected com.liferay.counter.kernel.service.CounterLocalService counterLocalService;
1208            @BeanReference(type = com.liferay.portal.kernel.service.ClassNameLocalService.class)
1209            protected com.liferay.portal.kernel.service.ClassNameLocalService classNameLocalService;
1210            @BeanReference(type = ClassNamePersistence.class)
1211            protected ClassNamePersistence classNamePersistence;
1212            @BeanReference(type = com.liferay.portal.kernel.service.CompanyLocalService.class)
1213            protected com.liferay.portal.kernel.service.CompanyLocalService companyLocalService;
1214            @BeanReference(type = CompanyPersistence.class)
1215            protected CompanyPersistence companyPersistence;
1216            @BeanReference(type = com.liferay.portal.kernel.service.GroupLocalService.class)
1217            protected com.liferay.portal.kernel.service.GroupLocalService groupLocalService;
1218            @BeanReference(type = GroupPersistence.class)
1219            protected GroupPersistence groupPersistence;
1220            @BeanReference(type = GroupFinder.class)
1221            protected GroupFinder groupFinder;
1222            @BeanReference(type = com.liferay.portal.kernel.service.SystemEventLocalService.class)
1223            protected com.liferay.portal.kernel.service.SystemEventLocalService systemEventLocalService;
1224            @BeanReference(type = SystemEventPersistence.class)
1225            protected SystemEventPersistence systemEventPersistence;
1226            @BeanReference(type = com.liferay.portal.kernel.service.UserLocalService.class)
1227            protected com.liferay.portal.kernel.service.UserLocalService userLocalService;
1228            @BeanReference(type = UserPersistence.class)
1229            protected UserPersistence userPersistence;
1230            @BeanReference(type = UserFinder.class)
1231            protected UserFinder userFinder;
1232            @BeanReference(type = com.liferay.asset.kernel.service.AssetCategoryLocalService.class)
1233            protected com.liferay.asset.kernel.service.AssetCategoryLocalService assetCategoryLocalService;
1234            @BeanReference(type = AssetCategoryPersistence.class)
1235            protected AssetCategoryPersistence assetCategoryPersistence;
1236            @BeanReference(type = AssetCategoryFinder.class)
1237            protected AssetCategoryFinder assetCategoryFinder;
1238            @BeanReference(type = com.liferay.social.kernel.service.SocialActivityLocalService.class)
1239            protected com.liferay.social.kernel.service.SocialActivityLocalService socialActivityLocalService;
1240            @BeanReference(type = SocialActivityPersistence.class)
1241            protected SocialActivityPersistence socialActivityPersistence;
1242            @BeanReference(type = SocialActivityFinder.class)
1243            protected SocialActivityFinder socialActivityFinder;
1244            @BeanReference(type = com.liferay.social.kernel.service.SocialActivityCounterLocalService.class)
1245            protected com.liferay.social.kernel.service.SocialActivityCounterLocalService socialActivityCounterLocalService;
1246            @BeanReference(type = SocialActivityCounterPersistence.class)
1247            protected SocialActivityCounterPersistence socialActivityCounterPersistence;
1248            @BeanReference(type = SocialActivityCounterFinder.class)
1249            protected SocialActivityCounterFinder socialActivityCounterFinder;
1250            @BeanReference(type = com.liferay.asset.kernel.service.AssetLinkLocalService.class)
1251            protected com.liferay.asset.kernel.service.AssetLinkLocalService assetLinkLocalService;
1252            @BeanReference(type = AssetLinkPersistence.class)
1253            protected AssetLinkPersistence assetLinkPersistence;
1254            @BeanReference(type = com.liferay.asset.kernel.service.AssetTagLocalService.class)
1255            protected com.liferay.asset.kernel.service.AssetTagLocalService assetTagLocalService;
1256            @BeanReference(type = AssetTagPersistence.class)
1257            protected AssetTagPersistence assetTagPersistence;
1258            @BeanReference(type = AssetTagFinder.class)
1259            protected AssetTagFinder assetTagFinder;
1260            @BeanReference(type = PersistedModelLocalServiceRegistry.class)
1261            protected PersistedModelLocalServiceRegistry persistedModelLocalServiceRegistry;
1262    }