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.bean.IdentifiableBean;
021    import com.liferay.portal.kernel.dao.db.DB;
022    import com.liferay.portal.kernel.dao.db.DBFactoryUtil;
023    import com.liferay.portal.kernel.dao.jdbc.SqlUpdate;
024    import com.liferay.portal.kernel.dao.jdbc.SqlUpdateFactoryUtil;
025    import com.liferay.portal.kernel.dao.orm.ActionableDynamicQuery;
026    import com.liferay.portal.kernel.dao.orm.DefaultActionableDynamicQuery;
027    import com.liferay.portal.kernel.dao.orm.DynamicQuery;
028    import com.liferay.portal.kernel.dao.orm.DynamicQueryFactoryUtil;
029    import com.liferay.portal.kernel.dao.orm.ExportActionableDynamicQuery;
030    import com.liferay.portal.kernel.dao.orm.Projection;
031    import com.liferay.portal.kernel.exception.PortalException;
032    import com.liferay.portal.kernel.exception.SystemException;
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.UserFinder;
041    import com.liferay.portal.service.persistence.UserPersistence;
042    import com.liferay.portal.util.PortalUtil;
043    
044    import com.liferay.portlet.asset.model.AssetCategory;
045    import com.liferay.portlet.asset.service.AssetCategoryLocalService;
046    import com.liferay.portlet.asset.service.persistence.AssetCategoryFinder;
047    import com.liferay.portlet.asset.service.persistence.AssetCategoryPersistence;
048    import com.liferay.portlet.asset.service.persistence.AssetCategoryPropertyFinder;
049    import com.liferay.portlet.asset.service.persistence.AssetCategoryPropertyPersistence;
050    import com.liferay.portlet.asset.service.persistence.AssetEntryFinder;
051    import com.liferay.portlet.asset.service.persistence.AssetEntryPersistence;
052    import com.liferay.portlet.asset.service.persistence.AssetTagFinder;
053    import com.liferay.portlet.asset.service.persistence.AssetTagPersistence;
054    import com.liferay.portlet.asset.service.persistence.AssetVocabularyFinder;
055    import com.liferay.portlet.asset.service.persistence.AssetVocabularyPersistence;
056    import com.liferay.portlet.exportimport.lar.ExportImportHelperUtil;
057    import com.liferay.portlet.exportimport.lar.ManifestSummary;
058    import com.liferay.portlet.exportimport.lar.PortletDataContext;
059    import com.liferay.portlet.exportimport.lar.StagedModelDataHandlerUtil;
060    import com.liferay.portlet.exportimport.lar.StagedModelType;
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 category 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.AssetCategoryLocalServiceImpl}.
073     * </p>
074     *
075     * @author Brian Wing Shun Chan
076     * @see com.liferay.portlet.asset.service.impl.AssetCategoryLocalServiceImpl
077     * @see com.liferay.portlet.asset.service.AssetCategoryLocalServiceUtil
078     * @generated
079     */
080    @ProviderType
081    public abstract class AssetCategoryLocalServiceBaseImpl
082            extends BaseLocalServiceImpl implements AssetCategoryLocalService,
083                    IdentifiableBean {
084            /*
085             * NOTE FOR DEVELOPERS:
086             *
087             * Never modify or reference this class directly. Always use {@link com.liferay.portlet.asset.service.AssetCategoryLocalServiceUtil} to access the asset category local service.
088             */
089    
090            /**
091             * Adds the asset category to the database. Also notifies the appropriate model listeners.
092             *
093             * @param assetCategory the asset category
094             * @return the asset category that was added
095             */
096            @Indexable(type = IndexableType.REINDEX)
097            @Override
098            public AssetCategory addAssetCategory(AssetCategory assetCategory) {
099                    assetCategory.setNew(true);
100    
101                    return assetCategoryPersistence.update(assetCategory);
102            }
103    
104            /**
105             * Creates a new asset category with the primary key. Does not add the asset category to the database.
106             *
107             * @param categoryId the primary key for the new asset category
108             * @return the new asset category
109             */
110            @Override
111            public AssetCategory createAssetCategory(long categoryId) {
112                    return assetCategoryPersistence.create(categoryId);
113            }
114    
115            /**
116             * Deletes the asset category with the primary key from the database. Also notifies the appropriate model listeners.
117             *
118             * @param categoryId the primary key of the asset category
119             * @return the asset category that was removed
120             * @throws PortalException if a asset category with the primary key could not be found
121             */
122            @Indexable(type = IndexableType.DELETE)
123            @Override
124            public AssetCategory deleteAssetCategory(long categoryId)
125                    throws PortalException {
126                    return assetCategoryPersistence.remove(categoryId);
127            }
128    
129            /**
130             * Deletes the asset category from the database. Also notifies the appropriate model listeners.
131             *
132             * @param assetCategory the asset category
133             * @return the asset category that was removed
134             */
135            @Indexable(type = IndexableType.DELETE)
136            @Override
137            public AssetCategory deleteAssetCategory(AssetCategory assetCategory) {
138                    return assetCategoryPersistence.remove(assetCategory);
139            }
140    
141            @Override
142            public DynamicQuery dynamicQuery() {
143                    Class<?> clazz = getClass();
144    
145                    return DynamicQueryFactoryUtil.forClass(AssetCategory.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 assetCategoryPersistence.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.AssetCategoryModelImpl}. 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 assetCategoryPersistence.findWithDynamicQuery(dynamicQuery,
176                            start, 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.AssetCategoryModelImpl}. 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 assetCategoryPersistence.findWithDynamicQuery(dynamicQuery,
196                            start, 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 assetCategoryPersistence.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 assetCategoryPersistence.countWithDynamicQuery(dynamicQuery,
221                            projection);
222            }
223    
224            @Override
225            public AssetCategory fetchAssetCategory(long categoryId) {
226                    return assetCategoryPersistence.fetchByPrimaryKey(categoryId);
227            }
228    
229            /**
230             * Returns the asset category matching the UUID and group.
231             *
232             * @param uuid the asset category's UUID
233             * @param groupId the primary key of the group
234             * @return the matching asset category, or <code>null</code> if a matching asset category could not be found
235             */
236            @Override
237            public AssetCategory fetchAssetCategoryByUuidAndGroupId(String uuid,
238                    long groupId) {
239                    return assetCategoryPersistence.fetchByUUID_G(uuid, groupId);
240            }
241    
242            /**
243             * Returns the asset category with the primary key.
244             *
245             * @param categoryId the primary key of the asset category
246             * @return the asset category
247             * @throws PortalException if a asset category with the primary key could not be found
248             */
249            @Override
250            public AssetCategory getAssetCategory(long categoryId)
251                    throws PortalException {
252                    return assetCategoryPersistence.findByPrimaryKey(categoryId);
253            }
254    
255            @Override
256            public ActionableDynamicQuery getActionableDynamicQuery() {
257                    ActionableDynamicQuery actionableDynamicQuery = new DefaultActionableDynamicQuery();
258    
259                    actionableDynamicQuery.setBaseLocalService(com.liferay.portlet.asset.service.AssetCategoryLocalServiceUtil.getService());
260                    actionableDynamicQuery.setClass(AssetCategory.class);
261                    actionableDynamicQuery.setClassLoader(getClassLoader());
262    
263                    actionableDynamicQuery.setPrimaryKeyPropertyName("categoryId");
264    
265                    return actionableDynamicQuery;
266            }
267    
268            protected void initActionableDynamicQuery(
269                    ActionableDynamicQuery actionableDynamicQuery) {
270                    actionableDynamicQuery.setBaseLocalService(com.liferay.portlet.asset.service.AssetCategoryLocalServiceUtil.getService());
271                    actionableDynamicQuery.setClass(AssetCategory.class);
272                    actionableDynamicQuery.setClassLoader(getClassLoader());
273    
274                    actionableDynamicQuery.setPrimaryKeyPropertyName("categoryId");
275            }
276    
277            @Override
278            public ExportActionableDynamicQuery getExportActionableDynamicQuery(
279                    final PortletDataContext portletDataContext) {
280                    final ExportActionableDynamicQuery exportActionableDynamicQuery = new ExportActionableDynamicQuery() {
281                                    @Override
282                                    public long performCount() throws PortalException {
283                                            ManifestSummary manifestSummary = portletDataContext.getManifestSummary();
284    
285                                            StagedModelType stagedModelType = getStagedModelType();
286    
287                                            long modelAdditionCount = super.performCount();
288    
289                                            manifestSummary.addModelAdditionCount(stagedModelType.toString(),
290                                                    modelAdditionCount);
291    
292                                            long modelDeletionCount = ExportImportHelperUtil.getModelDeletionCount(portletDataContext,
293                                                            stagedModelType);
294    
295                                            manifestSummary.addModelDeletionCount(stagedModelType.toString(),
296                                                    modelDeletionCount);
297    
298                                            return modelAdditionCount;
299                                    }
300                            };
301    
302                    initActionableDynamicQuery(exportActionableDynamicQuery);
303    
304                    exportActionableDynamicQuery.setAddCriteriaMethod(new ActionableDynamicQuery.AddCriteriaMethod() {
305                                    @Override
306                                    public void addCriteria(DynamicQuery dynamicQuery) {
307                                            portletDataContext.addDateRangeCriteria(dynamicQuery,
308                                                    "modifiedDate");
309                                    }
310                            });
311    
312                    exportActionableDynamicQuery.setCompanyId(portletDataContext.getCompanyId());
313    
314                    exportActionableDynamicQuery.setGroupId(portletDataContext.getScopeGroupId());
315    
316                    exportActionableDynamicQuery.setPerformActionMethod(new ActionableDynamicQuery.PerformActionMethod() {
317                                    @Override
318                                    public void performAction(Object object)
319                                            throws PortalException {
320                                            AssetCategory stagedModel = (AssetCategory)object;
321    
322                                            StagedModelDataHandlerUtil.exportStagedModel(portletDataContext,
323                                                    stagedModel);
324                                    }
325                            });
326                    exportActionableDynamicQuery.setStagedModelType(new StagedModelType(
327                                    PortalUtil.getClassNameId(AssetCategory.class.getName())));
328    
329                    return exportActionableDynamicQuery;
330            }
331    
332            /**
333             * @throws PortalException
334             */
335            @Override
336            public PersistedModel deletePersistedModel(PersistedModel persistedModel)
337                    throws PortalException {
338                    return assetCategoryLocalService.deleteAssetCategory((AssetCategory)persistedModel);
339            }
340    
341            @Override
342            public PersistedModel getPersistedModel(Serializable primaryKeyObj)
343                    throws PortalException {
344                    return assetCategoryPersistence.findByPrimaryKey(primaryKeyObj);
345            }
346    
347            /**
348             * Returns all the asset categories matching the UUID and company.
349             *
350             * @param uuid the UUID of the asset categories
351             * @param companyId the primary key of the company
352             * @return the matching asset categories, or an empty list if no matches were found
353             */
354            @Override
355            public List<AssetCategory> getAssetCategoriesByUuidAndCompanyId(
356                    String uuid, long companyId) {
357                    return assetCategoryPersistence.findByUuid_C(uuid, companyId);
358            }
359    
360            /**
361             * Returns a range of asset categories matching the UUID and company.
362             *
363             * @param uuid the UUID of the asset categories
364             * @param companyId the primary key of the company
365             * @param start the lower bound of the range of asset categories
366             * @param end the upper bound of the range of asset categories (not inclusive)
367             * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
368             * @return the range of matching asset categories, or an empty list if no matches were found
369             */
370            @Override
371            public List<AssetCategory> getAssetCategoriesByUuidAndCompanyId(
372                    String uuid, long companyId, int start, int end,
373                    OrderByComparator<AssetCategory> orderByComparator) {
374                    return assetCategoryPersistence.findByUuid_C(uuid, companyId, start,
375                            end, orderByComparator);
376            }
377    
378            /**
379             * Returns the asset category matching the UUID and group.
380             *
381             * @param uuid the asset category's UUID
382             * @param groupId the primary key of the group
383             * @return the matching asset category
384             * @throws PortalException if a matching asset category could not be found
385             */
386            @Override
387            public AssetCategory getAssetCategoryByUuidAndGroupId(String uuid,
388                    long groupId) throws PortalException {
389                    return assetCategoryPersistence.findByUUID_G(uuid, groupId);
390            }
391    
392            /**
393             * Returns a range of all the asset categories.
394             *
395             * <p>
396             * 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.AssetCategoryModelImpl}. 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.
397             * </p>
398             *
399             * @param start the lower bound of the range of asset categories
400             * @param end the upper bound of the range of asset categories (not inclusive)
401             * @return the range of asset categories
402             */
403            @Override
404            public List<AssetCategory> getAssetCategories(int start, int end) {
405                    return assetCategoryPersistence.findAll(start, end);
406            }
407    
408            /**
409             * Returns the number of asset categories.
410             *
411             * @return the number of asset categories
412             */
413            @Override
414            public int getAssetCategoriesCount() {
415                    return assetCategoryPersistence.countAll();
416            }
417    
418            /**
419             * Updates the asset category in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.
420             *
421             * @param assetCategory the asset category
422             * @return the asset category that was updated
423             */
424            @Indexable(type = IndexableType.REINDEX)
425            @Override
426            public AssetCategory updateAssetCategory(AssetCategory assetCategory) {
427                    return assetCategoryPersistence.update(assetCategory);
428            }
429    
430            /**
431             */
432            @Override
433            public void addAssetEntryAssetCategory(long entryId, long categoryId) {
434                    assetEntryPersistence.addAssetCategory(entryId, categoryId);
435            }
436    
437            /**
438             */
439            @Override
440            public void addAssetEntryAssetCategory(long entryId,
441                    AssetCategory assetCategory) {
442                    assetEntryPersistence.addAssetCategory(entryId, assetCategory);
443            }
444    
445            /**
446             */
447            @Override
448            public void addAssetEntryAssetCategories(long entryId, long[] categoryIds) {
449                    assetEntryPersistence.addAssetCategories(entryId, categoryIds);
450            }
451    
452            /**
453             */
454            @Override
455            public void addAssetEntryAssetCategories(long entryId,
456                    List<AssetCategory> AssetCategories) {
457                    assetEntryPersistence.addAssetCategories(entryId, AssetCategories);
458            }
459    
460            /**
461             */
462            @Override
463            public void clearAssetEntryAssetCategories(long entryId) {
464                    assetEntryPersistence.clearAssetCategories(entryId);
465            }
466    
467            /**
468             */
469            @Override
470            public void deleteAssetEntryAssetCategory(long entryId, long categoryId) {
471                    assetEntryPersistence.removeAssetCategory(entryId, categoryId);
472            }
473    
474            /**
475             */
476            @Override
477            public void deleteAssetEntryAssetCategory(long entryId,
478                    AssetCategory assetCategory) {
479                    assetEntryPersistence.removeAssetCategory(entryId, assetCategory);
480            }
481    
482            /**
483             */
484            @Override
485            public void deleteAssetEntryAssetCategories(long entryId, long[] categoryIds) {
486                    assetEntryPersistence.removeAssetCategories(entryId, categoryIds);
487            }
488    
489            /**
490             */
491            @Override
492            public void deleteAssetEntryAssetCategories(long entryId,
493                    List<AssetCategory> AssetCategories) {
494                    assetEntryPersistence.removeAssetCategories(entryId, AssetCategories);
495            }
496    
497            /**
498             * Returns the entryIds of the asset entries associated with the asset category.
499             *
500             * @param categoryId the categoryId of the asset category
501             * @return long[] the entryIds of asset entries associated with the asset category
502             */
503            @Override
504            public long[] getAssetEntryPrimaryKeys(long categoryId) {
505                    return assetCategoryPersistence.getAssetEntryPrimaryKeys(categoryId);
506            }
507    
508            /**
509             */
510            @Override
511            public List<AssetCategory> getAssetEntryAssetCategories(long entryId) {
512                    return assetEntryPersistence.getAssetCategories(entryId);
513            }
514    
515            /**
516             */
517            @Override
518            public List<AssetCategory> getAssetEntryAssetCategories(long entryId,
519                    int start, int end) {
520                    return assetEntryPersistence.getAssetCategories(entryId, start, end);
521            }
522    
523            /**
524             */
525            @Override
526            public List<AssetCategory> getAssetEntryAssetCategories(long entryId,
527                    int start, int end, OrderByComparator<AssetCategory> orderByComparator) {
528                    return assetEntryPersistence.getAssetCategories(entryId, start, end,
529                            orderByComparator);
530            }
531    
532            /**
533             */
534            @Override
535            public int getAssetEntryAssetCategoriesCount(long entryId) {
536                    return assetEntryPersistence.getAssetCategoriesSize(entryId);
537            }
538    
539            /**
540             */
541            @Override
542            public boolean hasAssetEntryAssetCategory(long entryId, long categoryId) {
543                    return assetEntryPersistence.containsAssetCategory(entryId, categoryId);
544            }
545    
546            /**
547             */
548            @Override
549            public boolean hasAssetEntryAssetCategories(long entryId) {
550                    return assetEntryPersistence.containsAssetCategories(entryId);
551            }
552    
553            /**
554             */
555            @Override
556            public void setAssetEntryAssetCategories(long entryId, long[] categoryIds) {
557                    assetEntryPersistence.setAssetCategories(entryId, categoryIds);
558            }
559    
560            /**
561             * Returns the asset category local service.
562             *
563             * @return the asset category local service
564             */
565            public AssetCategoryLocalService getAssetCategoryLocalService() {
566                    return assetCategoryLocalService;
567            }
568    
569            /**
570             * Sets the asset category local service.
571             *
572             * @param assetCategoryLocalService the asset category local service
573             */
574            public void setAssetCategoryLocalService(
575                    AssetCategoryLocalService assetCategoryLocalService) {
576                    this.assetCategoryLocalService = assetCategoryLocalService;
577            }
578    
579            /**
580             * Returns the asset category remote service.
581             *
582             * @return the asset category remote service
583             */
584            public com.liferay.portlet.asset.service.AssetCategoryService getAssetCategoryService() {
585                    return assetCategoryService;
586            }
587    
588            /**
589             * Sets the asset category remote service.
590             *
591             * @param assetCategoryService the asset category remote service
592             */
593            public void setAssetCategoryService(
594                    com.liferay.portlet.asset.service.AssetCategoryService assetCategoryService) {
595                    this.assetCategoryService = assetCategoryService;
596            }
597    
598            /**
599             * Returns the asset category persistence.
600             *
601             * @return the asset category persistence
602             */
603            public AssetCategoryPersistence getAssetCategoryPersistence() {
604                    return assetCategoryPersistence;
605            }
606    
607            /**
608             * Sets the asset category persistence.
609             *
610             * @param assetCategoryPersistence the asset category persistence
611             */
612            public void setAssetCategoryPersistence(
613                    AssetCategoryPersistence assetCategoryPersistence) {
614                    this.assetCategoryPersistence = assetCategoryPersistence;
615            }
616    
617            /**
618             * Returns the asset category finder.
619             *
620             * @return the asset category finder
621             */
622            public AssetCategoryFinder getAssetCategoryFinder() {
623                    return assetCategoryFinder;
624            }
625    
626            /**
627             * Sets the asset category finder.
628             *
629             * @param assetCategoryFinder the asset category finder
630             */
631            public void setAssetCategoryFinder(AssetCategoryFinder assetCategoryFinder) {
632                    this.assetCategoryFinder = assetCategoryFinder;
633            }
634    
635            /**
636             * Returns the counter local service.
637             *
638             * @return the counter local service
639             */
640            public com.liferay.counter.service.CounterLocalService getCounterLocalService() {
641                    return counterLocalService;
642            }
643    
644            /**
645             * Sets the counter local service.
646             *
647             * @param counterLocalService the counter local service
648             */
649            public void setCounterLocalService(
650                    com.liferay.counter.service.CounterLocalService counterLocalService) {
651                    this.counterLocalService = counterLocalService;
652            }
653    
654            /**
655             * Returns the class name local service.
656             *
657             * @return the class name local service
658             */
659            public com.liferay.portal.service.ClassNameLocalService getClassNameLocalService() {
660                    return classNameLocalService;
661            }
662    
663            /**
664             * Sets the class name local service.
665             *
666             * @param classNameLocalService the class name local service
667             */
668            public void setClassNameLocalService(
669                    com.liferay.portal.service.ClassNameLocalService classNameLocalService) {
670                    this.classNameLocalService = classNameLocalService;
671            }
672    
673            /**
674             * Returns the class name remote service.
675             *
676             * @return the class name remote service
677             */
678            public com.liferay.portal.service.ClassNameService getClassNameService() {
679                    return classNameService;
680            }
681    
682            /**
683             * Sets the class name remote service.
684             *
685             * @param classNameService the class name remote service
686             */
687            public void setClassNameService(
688                    com.liferay.portal.service.ClassNameService classNameService) {
689                    this.classNameService = classNameService;
690            }
691    
692            /**
693             * Returns the class name persistence.
694             *
695             * @return the class name persistence
696             */
697            public ClassNamePersistence getClassNamePersistence() {
698                    return classNamePersistence;
699            }
700    
701            /**
702             * Sets the class name persistence.
703             *
704             * @param classNamePersistence the class name persistence
705             */
706            public void setClassNamePersistence(
707                    ClassNamePersistence classNamePersistence) {
708                    this.classNamePersistence = classNamePersistence;
709            }
710    
711            /**
712             * Returns the resource local service.
713             *
714             * @return the resource local service
715             */
716            public com.liferay.portal.service.ResourceLocalService getResourceLocalService() {
717                    return resourceLocalService;
718            }
719    
720            /**
721             * Sets the resource local service.
722             *
723             * @param resourceLocalService the resource local service
724             */
725            public void setResourceLocalService(
726                    com.liferay.portal.service.ResourceLocalService resourceLocalService) {
727                    this.resourceLocalService = resourceLocalService;
728            }
729    
730            /**
731             * Returns the user local service.
732             *
733             * @return the user local service
734             */
735            public com.liferay.portal.service.UserLocalService getUserLocalService() {
736                    return userLocalService;
737            }
738    
739            /**
740             * Sets the user local service.
741             *
742             * @param userLocalService the user local service
743             */
744            public void setUserLocalService(
745                    com.liferay.portal.service.UserLocalService userLocalService) {
746                    this.userLocalService = userLocalService;
747            }
748    
749            /**
750             * Returns the user remote service.
751             *
752             * @return the user remote service
753             */
754            public com.liferay.portal.service.UserService getUserService() {
755                    return userService;
756            }
757    
758            /**
759             * Sets the user remote service.
760             *
761             * @param userService the user remote service
762             */
763            public void setUserService(
764                    com.liferay.portal.service.UserService userService) {
765                    this.userService = userService;
766            }
767    
768            /**
769             * Returns the user persistence.
770             *
771             * @return the user persistence
772             */
773            public UserPersistence getUserPersistence() {
774                    return userPersistence;
775            }
776    
777            /**
778             * Sets the user persistence.
779             *
780             * @param userPersistence the user persistence
781             */
782            public void setUserPersistence(UserPersistence userPersistence) {
783                    this.userPersistence = userPersistence;
784            }
785    
786            /**
787             * Returns the user finder.
788             *
789             * @return the user finder
790             */
791            public UserFinder getUserFinder() {
792                    return userFinder;
793            }
794    
795            /**
796             * Sets the user finder.
797             *
798             * @param userFinder the user finder
799             */
800            public void setUserFinder(UserFinder userFinder) {
801                    this.userFinder = userFinder;
802            }
803    
804            /**
805             * Returns the asset category property local service.
806             *
807             * @return the asset category property local service
808             */
809            public com.liferay.portlet.asset.service.AssetCategoryPropertyLocalService getAssetCategoryPropertyLocalService() {
810                    return assetCategoryPropertyLocalService;
811            }
812    
813            /**
814             * Sets the asset category property local service.
815             *
816             * @param assetCategoryPropertyLocalService the asset category property local service
817             */
818            public void setAssetCategoryPropertyLocalService(
819                    com.liferay.portlet.asset.service.AssetCategoryPropertyLocalService assetCategoryPropertyLocalService) {
820                    this.assetCategoryPropertyLocalService = assetCategoryPropertyLocalService;
821            }
822    
823            /**
824             * Returns the asset category property remote service.
825             *
826             * @return the asset category property remote service
827             */
828            public com.liferay.portlet.asset.service.AssetCategoryPropertyService getAssetCategoryPropertyService() {
829                    return assetCategoryPropertyService;
830            }
831    
832            /**
833             * Sets the asset category property remote service.
834             *
835             * @param assetCategoryPropertyService the asset category property remote service
836             */
837            public void setAssetCategoryPropertyService(
838                    com.liferay.portlet.asset.service.AssetCategoryPropertyService assetCategoryPropertyService) {
839                    this.assetCategoryPropertyService = assetCategoryPropertyService;
840            }
841    
842            /**
843             * Returns the asset category property persistence.
844             *
845             * @return the asset category property persistence
846             */
847            public AssetCategoryPropertyPersistence getAssetCategoryPropertyPersistence() {
848                    return assetCategoryPropertyPersistence;
849            }
850    
851            /**
852             * Sets the asset category property persistence.
853             *
854             * @param assetCategoryPropertyPersistence the asset category property persistence
855             */
856            public void setAssetCategoryPropertyPersistence(
857                    AssetCategoryPropertyPersistence assetCategoryPropertyPersistence) {
858                    this.assetCategoryPropertyPersistence = assetCategoryPropertyPersistence;
859            }
860    
861            /**
862             * Returns the asset category property finder.
863             *
864             * @return the asset category property finder
865             */
866            public AssetCategoryPropertyFinder getAssetCategoryPropertyFinder() {
867                    return assetCategoryPropertyFinder;
868            }
869    
870            /**
871             * Sets the asset category property finder.
872             *
873             * @param assetCategoryPropertyFinder the asset category property finder
874             */
875            public void setAssetCategoryPropertyFinder(
876                    AssetCategoryPropertyFinder assetCategoryPropertyFinder) {
877                    this.assetCategoryPropertyFinder = assetCategoryPropertyFinder;
878            }
879    
880            /**
881             * Returns the asset entry local service.
882             *
883             * @return the asset entry local service
884             */
885            public com.liferay.portlet.asset.service.AssetEntryLocalService getAssetEntryLocalService() {
886                    return assetEntryLocalService;
887            }
888    
889            /**
890             * Sets the asset entry local service.
891             *
892             * @param assetEntryLocalService the asset entry local service
893             */
894            public void setAssetEntryLocalService(
895                    com.liferay.portlet.asset.service.AssetEntryLocalService assetEntryLocalService) {
896                    this.assetEntryLocalService = assetEntryLocalService;
897            }
898    
899            /**
900             * Returns the asset entry remote service.
901             *
902             * @return the asset entry remote service
903             */
904            public com.liferay.portlet.asset.service.AssetEntryService getAssetEntryService() {
905                    return assetEntryService;
906            }
907    
908            /**
909             * Sets the asset entry remote service.
910             *
911             * @param assetEntryService the asset entry remote service
912             */
913            public void setAssetEntryService(
914                    com.liferay.portlet.asset.service.AssetEntryService assetEntryService) {
915                    this.assetEntryService = assetEntryService;
916            }
917    
918            /**
919             * Returns the asset entry persistence.
920             *
921             * @return the asset entry persistence
922             */
923            public AssetEntryPersistence getAssetEntryPersistence() {
924                    return assetEntryPersistence;
925            }
926    
927            /**
928             * Sets the asset entry persistence.
929             *
930             * @param assetEntryPersistence the asset entry persistence
931             */
932            public void setAssetEntryPersistence(
933                    AssetEntryPersistence assetEntryPersistence) {
934                    this.assetEntryPersistence = assetEntryPersistence;
935            }
936    
937            /**
938             * Returns the asset entry finder.
939             *
940             * @return the asset entry finder
941             */
942            public AssetEntryFinder getAssetEntryFinder() {
943                    return assetEntryFinder;
944            }
945    
946            /**
947             * Sets the asset entry finder.
948             *
949             * @param assetEntryFinder the asset entry finder
950             */
951            public void setAssetEntryFinder(AssetEntryFinder assetEntryFinder) {
952                    this.assetEntryFinder = assetEntryFinder;
953            }
954    
955            /**
956             * Returns the asset tag local service.
957             *
958             * @return the asset tag local service
959             */
960            public com.liferay.portlet.asset.service.AssetTagLocalService getAssetTagLocalService() {
961                    return assetTagLocalService;
962            }
963    
964            /**
965             * Sets the asset tag local service.
966             *
967             * @param assetTagLocalService the asset tag local service
968             */
969            public void setAssetTagLocalService(
970                    com.liferay.portlet.asset.service.AssetTagLocalService assetTagLocalService) {
971                    this.assetTagLocalService = assetTagLocalService;
972            }
973    
974            /**
975             * Returns the asset tag remote service.
976             *
977             * @return the asset tag remote service
978             */
979            public com.liferay.portlet.asset.service.AssetTagService getAssetTagService() {
980                    return assetTagService;
981            }
982    
983            /**
984             * Sets the asset tag remote service.
985             *
986             * @param assetTagService the asset tag remote service
987             */
988            public void setAssetTagService(
989                    com.liferay.portlet.asset.service.AssetTagService assetTagService) {
990                    this.assetTagService = assetTagService;
991            }
992    
993            /**
994             * Returns the asset tag persistence.
995             *
996             * @return the asset tag persistence
997             */
998            public AssetTagPersistence getAssetTagPersistence() {
999                    return assetTagPersistence;
1000            }
1001    
1002            /**
1003             * Sets the asset tag persistence.
1004             *
1005             * @param assetTagPersistence the asset tag persistence
1006             */
1007            public void setAssetTagPersistence(AssetTagPersistence assetTagPersistence) {
1008                    this.assetTagPersistence = assetTagPersistence;
1009            }
1010    
1011            /**
1012             * Returns the asset tag finder.
1013             *
1014             * @return the asset tag finder
1015             */
1016            public AssetTagFinder getAssetTagFinder() {
1017                    return assetTagFinder;
1018            }
1019    
1020            /**
1021             * Sets the asset tag finder.
1022             *
1023             * @param assetTagFinder the asset tag finder
1024             */
1025            public void setAssetTagFinder(AssetTagFinder assetTagFinder) {
1026                    this.assetTagFinder = assetTagFinder;
1027            }
1028    
1029            /**
1030             * Returns the asset vocabulary local service.
1031             *
1032             * @return the asset vocabulary local service
1033             */
1034            public com.liferay.portlet.asset.service.AssetVocabularyLocalService getAssetVocabularyLocalService() {
1035                    return assetVocabularyLocalService;
1036            }
1037    
1038            /**
1039             * Sets the asset vocabulary local service.
1040             *
1041             * @param assetVocabularyLocalService the asset vocabulary local service
1042             */
1043            public void setAssetVocabularyLocalService(
1044                    com.liferay.portlet.asset.service.AssetVocabularyLocalService assetVocabularyLocalService) {
1045                    this.assetVocabularyLocalService = assetVocabularyLocalService;
1046            }
1047    
1048            /**
1049             * Returns the asset vocabulary remote service.
1050             *
1051             * @return the asset vocabulary remote service
1052             */
1053            public com.liferay.portlet.asset.service.AssetVocabularyService getAssetVocabularyService() {
1054                    return assetVocabularyService;
1055            }
1056    
1057            /**
1058             * Sets the asset vocabulary remote service.
1059             *
1060             * @param assetVocabularyService the asset vocabulary remote service
1061             */
1062            public void setAssetVocabularyService(
1063                    com.liferay.portlet.asset.service.AssetVocabularyService assetVocabularyService) {
1064                    this.assetVocabularyService = assetVocabularyService;
1065            }
1066    
1067            /**
1068             * Returns the asset vocabulary persistence.
1069             *
1070             * @return the asset vocabulary persistence
1071             */
1072            public AssetVocabularyPersistence getAssetVocabularyPersistence() {
1073                    return assetVocabularyPersistence;
1074            }
1075    
1076            /**
1077             * Sets the asset vocabulary persistence.
1078             *
1079             * @param assetVocabularyPersistence the asset vocabulary persistence
1080             */
1081            public void setAssetVocabularyPersistence(
1082                    AssetVocabularyPersistence assetVocabularyPersistence) {
1083                    this.assetVocabularyPersistence = assetVocabularyPersistence;
1084            }
1085    
1086            /**
1087             * Returns the asset vocabulary finder.
1088             *
1089             * @return the asset vocabulary finder
1090             */
1091            public AssetVocabularyFinder getAssetVocabularyFinder() {
1092                    return assetVocabularyFinder;
1093            }
1094    
1095            /**
1096             * Sets the asset vocabulary finder.
1097             *
1098             * @param assetVocabularyFinder the asset vocabulary finder
1099             */
1100            public void setAssetVocabularyFinder(
1101                    AssetVocabularyFinder assetVocabularyFinder) {
1102                    this.assetVocabularyFinder = assetVocabularyFinder;
1103            }
1104    
1105            public void afterPropertiesSet() {
1106                    persistedModelLocalServiceRegistry.register("com.liferay.portlet.asset.model.AssetCategory",
1107                            assetCategoryLocalService);
1108            }
1109    
1110            public void destroy() {
1111                    persistedModelLocalServiceRegistry.unregister(
1112                            "com.liferay.portlet.asset.model.AssetCategory");
1113            }
1114    
1115            /**
1116             * Returns the Spring bean ID for this bean.
1117             *
1118             * @return the Spring bean ID for this bean
1119             */
1120            @Override
1121            public String getBeanIdentifier() {
1122                    return _beanIdentifier;
1123            }
1124    
1125            /**
1126             * Sets the Spring bean ID for this bean.
1127             *
1128             * @param beanIdentifier the Spring bean ID for this bean
1129             */
1130            @Override
1131            public void setBeanIdentifier(String beanIdentifier) {
1132                    _beanIdentifier = beanIdentifier;
1133            }
1134    
1135            protected Class<?> getModelClass() {
1136                    return AssetCategory.class;
1137            }
1138    
1139            protected String getModelClassName() {
1140                    return AssetCategory.class.getName();
1141            }
1142    
1143            /**
1144             * Performs a SQL query.
1145             *
1146             * @param sql the sql query
1147             */
1148            protected void runSQL(String sql) {
1149                    try {
1150                            DataSource dataSource = assetCategoryPersistence.getDataSource();
1151    
1152                            DB db = DBFactoryUtil.getDB();
1153    
1154                            sql = db.buildSQL(sql);
1155                            sql = PortalUtil.transformSQL(sql);
1156    
1157                            SqlUpdate sqlUpdate = SqlUpdateFactoryUtil.getSqlUpdate(dataSource,
1158                                            sql, new int[0]);
1159    
1160                            sqlUpdate.update();
1161                    }
1162                    catch (Exception e) {
1163                            throw new SystemException(e);
1164                    }
1165            }
1166    
1167            @BeanReference(type = AssetCategoryLocalService.class)
1168            protected AssetCategoryLocalService assetCategoryLocalService;
1169            @BeanReference(type = com.liferay.portlet.asset.service.AssetCategoryService.class)
1170            protected com.liferay.portlet.asset.service.AssetCategoryService assetCategoryService;
1171            @BeanReference(type = AssetCategoryPersistence.class)
1172            protected AssetCategoryPersistence assetCategoryPersistence;
1173            @BeanReference(type = AssetCategoryFinder.class)
1174            protected AssetCategoryFinder assetCategoryFinder;
1175            @BeanReference(type = com.liferay.counter.service.CounterLocalService.class)
1176            protected com.liferay.counter.service.CounterLocalService counterLocalService;
1177            @BeanReference(type = com.liferay.portal.service.ClassNameLocalService.class)
1178            protected com.liferay.portal.service.ClassNameLocalService classNameLocalService;
1179            @BeanReference(type = com.liferay.portal.service.ClassNameService.class)
1180            protected com.liferay.portal.service.ClassNameService classNameService;
1181            @BeanReference(type = ClassNamePersistence.class)
1182            protected ClassNamePersistence classNamePersistence;
1183            @BeanReference(type = com.liferay.portal.service.ResourceLocalService.class)
1184            protected com.liferay.portal.service.ResourceLocalService resourceLocalService;
1185            @BeanReference(type = com.liferay.portal.service.UserLocalService.class)
1186            protected com.liferay.portal.service.UserLocalService userLocalService;
1187            @BeanReference(type = com.liferay.portal.service.UserService.class)
1188            protected com.liferay.portal.service.UserService userService;
1189            @BeanReference(type = UserPersistence.class)
1190            protected UserPersistence userPersistence;
1191            @BeanReference(type = UserFinder.class)
1192            protected UserFinder userFinder;
1193            @BeanReference(type = com.liferay.portlet.asset.service.AssetCategoryPropertyLocalService.class)
1194            protected com.liferay.portlet.asset.service.AssetCategoryPropertyLocalService assetCategoryPropertyLocalService;
1195            @BeanReference(type = com.liferay.portlet.asset.service.AssetCategoryPropertyService.class)
1196            protected com.liferay.portlet.asset.service.AssetCategoryPropertyService assetCategoryPropertyService;
1197            @BeanReference(type = AssetCategoryPropertyPersistence.class)
1198            protected AssetCategoryPropertyPersistence assetCategoryPropertyPersistence;
1199            @BeanReference(type = AssetCategoryPropertyFinder.class)
1200            protected AssetCategoryPropertyFinder assetCategoryPropertyFinder;
1201            @BeanReference(type = com.liferay.portlet.asset.service.AssetEntryLocalService.class)
1202            protected com.liferay.portlet.asset.service.AssetEntryLocalService assetEntryLocalService;
1203            @BeanReference(type = com.liferay.portlet.asset.service.AssetEntryService.class)
1204            protected com.liferay.portlet.asset.service.AssetEntryService assetEntryService;
1205            @BeanReference(type = AssetEntryPersistence.class)
1206            protected AssetEntryPersistence assetEntryPersistence;
1207            @BeanReference(type = AssetEntryFinder.class)
1208            protected AssetEntryFinder assetEntryFinder;
1209            @BeanReference(type = com.liferay.portlet.asset.service.AssetTagLocalService.class)
1210            protected com.liferay.portlet.asset.service.AssetTagLocalService assetTagLocalService;
1211            @BeanReference(type = com.liferay.portlet.asset.service.AssetTagService.class)
1212            protected com.liferay.portlet.asset.service.AssetTagService assetTagService;
1213            @BeanReference(type = AssetTagPersistence.class)
1214            protected AssetTagPersistence assetTagPersistence;
1215            @BeanReference(type = AssetTagFinder.class)
1216            protected AssetTagFinder assetTagFinder;
1217            @BeanReference(type = com.liferay.portlet.asset.service.AssetVocabularyLocalService.class)
1218            protected com.liferay.portlet.asset.service.AssetVocabularyLocalService assetVocabularyLocalService;
1219            @BeanReference(type = com.liferay.portlet.asset.service.AssetVocabularyService.class)
1220            protected com.liferay.portlet.asset.service.AssetVocabularyService assetVocabularyService;
1221            @BeanReference(type = AssetVocabularyPersistence.class)
1222            protected AssetVocabularyPersistence assetVocabularyPersistence;
1223            @BeanReference(type = AssetVocabularyFinder.class)
1224            protected AssetVocabularyFinder assetVocabularyFinder;
1225            @BeanReference(type = PersistedModelLocalServiceRegistry.class)
1226            protected PersistedModelLocalServiceRegistry persistedModelLocalServiceRegistry;
1227            private String _beanIdentifier;
1228    }