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