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