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.GroupFinder;
041    import com.liferay.portal.service.persistence.GroupPersistence;
042    import com.liferay.portal.service.persistence.UserFinder;
043    import com.liferay.portal.service.persistence.UserPersistence;
044    import com.liferay.portal.util.PortalUtil;
045    
046    import com.liferay.portlet.asset.model.AssetVocabulary;
047    import com.liferay.portlet.asset.service.AssetVocabularyLocalService;
048    import com.liferay.portlet.asset.service.persistence.AssetCategoryFinder;
049    import com.liferay.portlet.asset.service.persistence.AssetCategoryPersistence;
050    import com.liferay.portlet.asset.service.persistence.AssetVocabularyFinder;
051    import com.liferay.portlet.asset.service.persistence.AssetVocabularyPersistence;
052    import com.liferay.portlet.exportimport.lar.ExportImportHelperUtil;
053    import com.liferay.portlet.exportimport.lar.ManifestSummary;
054    import com.liferay.portlet.exportimport.lar.PortletDataContext;
055    import com.liferay.portlet.exportimport.lar.StagedModelDataHandlerUtil;
056    import com.liferay.portlet.exportimport.lar.StagedModelType;
057    
058    import java.io.Serializable;
059    
060    import java.util.List;
061    
062    import javax.sql.DataSource;
063    
064    /**
065     * Provides the base implementation for the asset vocabulary local service.
066     *
067     * <p>
068     * 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.AssetVocabularyLocalServiceImpl}.
069     * </p>
070     *
071     * @author Brian Wing Shun Chan
072     * @see com.liferay.portlet.asset.service.impl.AssetVocabularyLocalServiceImpl
073     * @see com.liferay.portlet.asset.service.AssetVocabularyLocalServiceUtil
074     * @generated
075     */
076    @ProviderType
077    public abstract class AssetVocabularyLocalServiceBaseImpl
078            extends BaseLocalServiceImpl implements AssetVocabularyLocalService,
079                    IdentifiableBean {
080            /*
081             * NOTE FOR DEVELOPERS:
082             *
083             * Never modify or reference this class directly. Always use {@link com.liferay.portlet.asset.service.AssetVocabularyLocalServiceUtil} to access the asset vocabulary local service.
084             */
085    
086            /**
087             * Adds the asset vocabulary to the database. Also notifies the appropriate model listeners.
088             *
089             * @param assetVocabulary the asset vocabulary
090             * @return the asset vocabulary that was added
091             */
092            @Indexable(type = IndexableType.REINDEX)
093            @Override
094            public AssetVocabulary addAssetVocabulary(AssetVocabulary assetVocabulary) {
095                    assetVocabulary.setNew(true);
096    
097                    return assetVocabularyPersistence.update(assetVocabulary);
098            }
099    
100            /**
101             * Creates a new asset vocabulary with the primary key. Does not add the asset vocabulary to the database.
102             *
103             * @param vocabularyId the primary key for the new asset vocabulary
104             * @return the new asset vocabulary
105             */
106            @Override
107            public AssetVocabulary createAssetVocabulary(long vocabularyId) {
108                    return assetVocabularyPersistence.create(vocabularyId);
109            }
110    
111            /**
112             * Deletes the asset vocabulary with the primary key from the database. Also notifies the appropriate model listeners.
113             *
114             * @param vocabularyId the primary key of the asset vocabulary
115             * @return the asset vocabulary that was removed
116             * @throws PortalException if a asset vocabulary with the primary key could not be found
117             */
118            @Indexable(type = IndexableType.DELETE)
119            @Override
120            public AssetVocabulary deleteAssetVocabulary(long vocabularyId)
121                    throws PortalException {
122                    return assetVocabularyPersistence.remove(vocabularyId);
123            }
124    
125            /**
126             * Deletes the asset vocabulary from the database. Also notifies the appropriate model listeners.
127             *
128             * @param assetVocabulary the asset vocabulary
129             * @return the asset vocabulary that was removed
130             */
131            @Indexable(type = IndexableType.DELETE)
132            @Override
133            public AssetVocabulary deleteAssetVocabulary(
134                    AssetVocabulary assetVocabulary) {
135                    return assetVocabularyPersistence.remove(assetVocabulary);
136            }
137    
138            @Override
139            public DynamicQuery dynamicQuery() {
140                    Class<?> clazz = getClass();
141    
142                    return DynamicQueryFactoryUtil.forClass(AssetVocabulary.class,
143                            clazz.getClassLoader());
144            }
145    
146            /**
147             * Performs a dynamic query on the database and returns the matching rows.
148             *
149             * @param dynamicQuery the dynamic query
150             * @return the matching rows
151             */
152            @Override
153            public <T> List<T> dynamicQuery(DynamicQuery dynamicQuery) {
154                    return assetVocabularyPersistence.findWithDynamicQuery(dynamicQuery);
155            }
156    
157            /**
158             * Performs a dynamic query on the database and returns a range of the matching rows.
159             *
160             * <p>
161             * 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.AssetVocabularyModelImpl}. 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.
162             * </p>
163             *
164             * @param dynamicQuery the dynamic query
165             * @param start the lower bound of the range of model instances
166             * @param end the upper bound of the range of model instances (not inclusive)
167             * @return the range of matching rows
168             */
169            @Override
170            public <T> List<T> dynamicQuery(DynamicQuery dynamicQuery, int start,
171                    int end) {
172                    return assetVocabularyPersistence.findWithDynamicQuery(dynamicQuery,
173                            start, end);
174            }
175    
176            /**
177             * Performs a dynamic query on the database and returns an ordered range of the matching rows.
178             *
179             * <p>
180             * 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.AssetVocabularyModelImpl}. 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.
181             * </p>
182             *
183             * @param dynamicQuery the dynamic query
184             * @param start the lower bound of the range of model instances
185             * @param end the upper bound of the range of model instances (not inclusive)
186             * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
187             * @return the ordered range of matching rows
188             */
189            @Override
190            public <T> List<T> dynamicQuery(DynamicQuery dynamicQuery, int start,
191                    int end, OrderByComparator<T> orderByComparator) {
192                    return assetVocabularyPersistence.findWithDynamicQuery(dynamicQuery,
193                            start, end, orderByComparator);
194            }
195    
196            /**
197             * Returns the number of rows matching the dynamic query.
198             *
199             * @param dynamicQuery the dynamic query
200             * @return the number of rows matching the dynamic query
201             */
202            @Override
203            public long dynamicQueryCount(DynamicQuery dynamicQuery) {
204                    return assetVocabularyPersistence.countWithDynamicQuery(dynamicQuery);
205            }
206    
207            /**
208             * Returns the number of rows matching the dynamic query.
209             *
210             * @param dynamicQuery the dynamic query
211             * @param projection the projection to apply to the query
212             * @return the number of rows matching the dynamic query
213             */
214            @Override
215            public long dynamicQueryCount(DynamicQuery dynamicQuery,
216                    Projection projection) {
217                    return assetVocabularyPersistence.countWithDynamicQuery(dynamicQuery,
218                            projection);
219            }
220    
221            @Override
222            public AssetVocabulary fetchAssetVocabulary(long vocabularyId) {
223                    return assetVocabularyPersistence.fetchByPrimaryKey(vocabularyId);
224            }
225    
226            /**
227             * Returns the asset vocabulary matching the UUID and group.
228             *
229             * @param uuid the asset vocabulary's UUID
230             * @param groupId the primary key of the group
231             * @return the matching asset vocabulary, or <code>null</code> if a matching asset vocabulary could not be found
232             */
233            @Override
234            public AssetVocabulary fetchAssetVocabularyByUuidAndGroupId(String uuid,
235                    long groupId) {
236                    return assetVocabularyPersistence.fetchByUUID_G(uuid, groupId);
237            }
238    
239            /**
240             * Returns the asset vocabulary with the primary key.
241             *
242             * @param vocabularyId the primary key of the asset vocabulary
243             * @return the asset vocabulary
244             * @throws PortalException if a asset vocabulary with the primary key could not be found
245             */
246            @Override
247            public AssetVocabulary getAssetVocabulary(long vocabularyId)
248                    throws PortalException {
249                    return assetVocabularyPersistence.findByPrimaryKey(vocabularyId);
250            }
251    
252            @Override
253            public ActionableDynamicQuery getActionableDynamicQuery() {
254                    ActionableDynamicQuery actionableDynamicQuery = new DefaultActionableDynamicQuery();
255    
256                    actionableDynamicQuery.setBaseLocalService(com.liferay.portlet.asset.service.AssetVocabularyLocalServiceUtil.getService());
257                    actionableDynamicQuery.setClass(AssetVocabulary.class);
258                    actionableDynamicQuery.setClassLoader(getClassLoader());
259    
260                    actionableDynamicQuery.setPrimaryKeyPropertyName("vocabularyId");
261    
262                    return actionableDynamicQuery;
263            }
264    
265            protected void initActionableDynamicQuery(
266                    ActionableDynamicQuery actionableDynamicQuery) {
267                    actionableDynamicQuery.setBaseLocalService(com.liferay.portlet.asset.service.AssetVocabularyLocalServiceUtil.getService());
268                    actionableDynamicQuery.setClass(AssetVocabulary.class);
269                    actionableDynamicQuery.setClassLoader(getClassLoader());
270    
271                    actionableDynamicQuery.setPrimaryKeyPropertyName("vocabularyId");
272            }
273    
274            @Override
275            public ExportActionableDynamicQuery getExportActionableDynamicQuery(
276                    final PortletDataContext portletDataContext) {
277                    final ExportActionableDynamicQuery exportActionableDynamicQuery = new ExportActionableDynamicQuery() {
278                                    @Override
279                                    public long performCount() throws PortalException {
280                                            ManifestSummary manifestSummary = portletDataContext.getManifestSummary();
281    
282                                            StagedModelType stagedModelType = getStagedModelType();
283    
284                                            long modelAdditionCount = super.performCount();
285    
286                                            manifestSummary.addModelAdditionCount(stagedModelType,
287                                                    modelAdditionCount);
288    
289                                            long modelDeletionCount = ExportImportHelperUtil.getModelDeletionCount(portletDataContext,
290                                                            stagedModelType);
291    
292                                            manifestSummary.addModelDeletionCount(stagedModelType,
293                                                    modelDeletionCount);
294    
295                                            return modelAdditionCount;
296                                    }
297                            };
298    
299                    initActionableDynamicQuery(exportActionableDynamicQuery);
300    
301                    exportActionableDynamicQuery.setAddCriteriaMethod(new ActionableDynamicQuery.AddCriteriaMethod() {
302                                    @Override
303                                    public void addCriteria(DynamicQuery dynamicQuery) {
304                                            portletDataContext.addDateRangeCriteria(dynamicQuery,
305                                                    "modifiedDate");
306                                    }
307                            });
308    
309                    exportActionableDynamicQuery.setCompanyId(portletDataContext.getCompanyId());
310    
311                    exportActionableDynamicQuery.setGroupId(portletDataContext.getScopeGroupId());
312    
313                    exportActionableDynamicQuery.setPerformActionMethod(new ActionableDynamicQuery.PerformActionMethod<AssetVocabulary>() {
314                                    @Override
315                                    public void performAction(AssetVocabulary assetVocabulary)
316                                            throws PortalException {
317                                            StagedModelDataHandlerUtil.exportStagedModel(portletDataContext,
318                                                    assetVocabulary);
319                                    }
320                            });
321                    exportActionableDynamicQuery.setStagedModelType(new StagedModelType(
322                                    PortalUtil.getClassNameId(AssetVocabulary.class.getName())));
323    
324                    return exportActionableDynamicQuery;
325            }
326    
327            /**
328             * @throws PortalException
329             */
330            @Override
331            public PersistedModel deletePersistedModel(PersistedModel persistedModel)
332                    throws PortalException {
333                    return assetVocabularyLocalService.deleteAssetVocabulary((AssetVocabulary)persistedModel);
334            }
335    
336            @Override
337            public PersistedModel getPersistedModel(Serializable primaryKeyObj)
338                    throws PortalException {
339                    return assetVocabularyPersistence.findByPrimaryKey(primaryKeyObj);
340            }
341    
342            /**
343             * Returns all the asset vocabularies matching the UUID and company.
344             *
345             * @param uuid the UUID of the asset vocabularies
346             * @param companyId the primary key of the company
347             * @return the matching asset vocabularies, or an empty list if no matches were found
348             */
349            @Override
350            public List<AssetVocabulary> getAssetVocabulariesByUuidAndCompanyId(
351                    String uuid, long companyId) {
352                    return assetVocabularyPersistence.findByUuid_C(uuid, companyId);
353            }
354    
355            /**
356             * Returns a range of asset vocabularies matching the UUID and company.
357             *
358             * @param uuid the UUID of the asset vocabularies
359             * @param companyId the primary key of the company
360             * @param start the lower bound of the range of asset vocabularies
361             * @param end the upper bound of the range of asset vocabularies (not inclusive)
362             * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
363             * @return the range of matching asset vocabularies, or an empty list if no matches were found
364             */
365            @Override
366            public List<AssetVocabulary> getAssetVocabulariesByUuidAndCompanyId(
367                    String uuid, long companyId, int start, int end,
368                    OrderByComparator<AssetVocabulary> orderByComparator) {
369                    return assetVocabularyPersistence.findByUuid_C(uuid, companyId, start,
370                            end, orderByComparator);
371            }
372    
373            /**
374             * Returns the asset vocabulary matching the UUID and group.
375             *
376             * @param uuid the asset vocabulary's UUID
377             * @param groupId the primary key of the group
378             * @return the matching asset vocabulary
379             * @throws PortalException if a matching asset vocabulary could not be found
380             */
381            @Override
382            public AssetVocabulary getAssetVocabularyByUuidAndGroupId(String uuid,
383                    long groupId) throws PortalException {
384                    return assetVocabularyPersistence.findByUUID_G(uuid, groupId);
385            }
386    
387            /**
388             * Returns a range of all the asset vocabularies.
389             *
390             * <p>
391             * 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.AssetVocabularyModelImpl}. 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.
392             * </p>
393             *
394             * @param start the lower bound of the range of asset vocabularies
395             * @param end the upper bound of the range of asset vocabularies (not inclusive)
396             * @return the range of asset vocabularies
397             */
398            @Override
399            public List<AssetVocabulary> getAssetVocabularies(int start, int end) {
400                    return assetVocabularyPersistence.findAll(start, end);
401            }
402    
403            /**
404             * Returns the number of asset vocabularies.
405             *
406             * @return the number of asset vocabularies
407             */
408            @Override
409            public int getAssetVocabulariesCount() {
410                    return assetVocabularyPersistence.countAll();
411            }
412    
413            /**
414             * Updates the asset vocabulary in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.
415             *
416             * @param assetVocabulary the asset vocabulary
417             * @return the asset vocabulary that was updated
418             */
419            @Indexable(type = IndexableType.REINDEX)
420            @Override
421            public AssetVocabulary updateAssetVocabulary(
422                    AssetVocabulary assetVocabulary) {
423                    return assetVocabularyPersistence.update(assetVocabulary);
424            }
425    
426            /**
427             * Returns the asset vocabulary local service.
428             *
429             * @return the asset vocabulary local service
430             */
431            public AssetVocabularyLocalService getAssetVocabularyLocalService() {
432                    return assetVocabularyLocalService;
433            }
434    
435            /**
436             * Sets the asset vocabulary local service.
437             *
438             * @param assetVocabularyLocalService the asset vocabulary local service
439             */
440            public void setAssetVocabularyLocalService(
441                    AssetVocabularyLocalService assetVocabularyLocalService) {
442                    this.assetVocabularyLocalService = assetVocabularyLocalService;
443            }
444    
445            /**
446             * Returns the asset vocabulary remote service.
447             *
448             * @return the asset vocabulary remote service
449             */
450            public com.liferay.portlet.asset.service.AssetVocabularyService getAssetVocabularyService() {
451                    return assetVocabularyService;
452            }
453    
454            /**
455             * Sets the asset vocabulary remote service.
456             *
457             * @param assetVocabularyService the asset vocabulary remote service
458             */
459            public void setAssetVocabularyService(
460                    com.liferay.portlet.asset.service.AssetVocabularyService assetVocabularyService) {
461                    this.assetVocabularyService = assetVocabularyService;
462            }
463    
464            /**
465             * Returns the asset vocabulary persistence.
466             *
467             * @return the asset vocabulary persistence
468             */
469            public AssetVocabularyPersistence getAssetVocabularyPersistence() {
470                    return assetVocabularyPersistence;
471            }
472    
473            /**
474             * Sets the asset vocabulary persistence.
475             *
476             * @param assetVocabularyPersistence the asset vocabulary persistence
477             */
478            public void setAssetVocabularyPersistence(
479                    AssetVocabularyPersistence assetVocabularyPersistence) {
480                    this.assetVocabularyPersistence = assetVocabularyPersistence;
481            }
482    
483            /**
484             * Returns the asset vocabulary finder.
485             *
486             * @return the asset vocabulary finder
487             */
488            public AssetVocabularyFinder getAssetVocabularyFinder() {
489                    return assetVocabularyFinder;
490            }
491    
492            /**
493             * Sets the asset vocabulary finder.
494             *
495             * @param assetVocabularyFinder the asset vocabulary finder
496             */
497            public void setAssetVocabularyFinder(
498                    AssetVocabularyFinder assetVocabularyFinder) {
499                    this.assetVocabularyFinder = assetVocabularyFinder;
500            }
501    
502            /**
503             * Returns the counter local service.
504             *
505             * @return the counter local service
506             */
507            public com.liferay.counter.service.CounterLocalService getCounterLocalService() {
508                    return counterLocalService;
509            }
510    
511            /**
512             * Sets the counter local service.
513             *
514             * @param counterLocalService the counter local service
515             */
516            public void setCounterLocalService(
517                    com.liferay.counter.service.CounterLocalService counterLocalService) {
518                    this.counterLocalService = counterLocalService;
519            }
520    
521            /**
522             * Returns the class name local service.
523             *
524             * @return the class name local service
525             */
526            public com.liferay.portal.service.ClassNameLocalService getClassNameLocalService() {
527                    return classNameLocalService;
528            }
529    
530            /**
531             * Sets the class name local service.
532             *
533             * @param classNameLocalService the class name local service
534             */
535            public void setClassNameLocalService(
536                    com.liferay.portal.service.ClassNameLocalService classNameLocalService) {
537                    this.classNameLocalService = classNameLocalService;
538            }
539    
540            /**
541             * Returns the class name remote service.
542             *
543             * @return the class name remote service
544             */
545            public com.liferay.portal.service.ClassNameService getClassNameService() {
546                    return classNameService;
547            }
548    
549            /**
550             * Sets the class name remote service.
551             *
552             * @param classNameService the class name remote service
553             */
554            public void setClassNameService(
555                    com.liferay.portal.service.ClassNameService classNameService) {
556                    this.classNameService = classNameService;
557            }
558    
559            /**
560             * Returns the class name persistence.
561             *
562             * @return the class name persistence
563             */
564            public ClassNamePersistence getClassNamePersistence() {
565                    return classNamePersistence;
566            }
567    
568            /**
569             * Sets the class name persistence.
570             *
571             * @param classNamePersistence the class name persistence
572             */
573            public void setClassNamePersistence(
574                    ClassNamePersistence classNamePersistence) {
575                    this.classNamePersistence = classNamePersistence;
576            }
577    
578            /**
579             * Returns the group local service.
580             *
581             * @return the group local service
582             */
583            public com.liferay.portal.service.GroupLocalService getGroupLocalService() {
584                    return groupLocalService;
585            }
586    
587            /**
588             * Sets the group local service.
589             *
590             * @param groupLocalService the group local service
591             */
592            public void setGroupLocalService(
593                    com.liferay.portal.service.GroupLocalService groupLocalService) {
594                    this.groupLocalService = groupLocalService;
595            }
596    
597            /**
598             * Returns the group remote service.
599             *
600             * @return the group remote service
601             */
602            public com.liferay.portal.service.GroupService getGroupService() {
603                    return groupService;
604            }
605    
606            /**
607             * Sets the group remote service.
608             *
609             * @param groupService the group remote service
610             */
611            public void setGroupService(
612                    com.liferay.portal.service.GroupService groupService) {
613                    this.groupService = groupService;
614            }
615    
616            /**
617             * Returns the group persistence.
618             *
619             * @return the group persistence
620             */
621            public GroupPersistence getGroupPersistence() {
622                    return groupPersistence;
623            }
624    
625            /**
626             * Sets the group persistence.
627             *
628             * @param groupPersistence the group persistence
629             */
630            public void setGroupPersistence(GroupPersistence groupPersistence) {
631                    this.groupPersistence = groupPersistence;
632            }
633    
634            /**
635             * Returns the group finder.
636             *
637             * @return the group finder
638             */
639            public GroupFinder getGroupFinder() {
640                    return groupFinder;
641            }
642    
643            /**
644             * Sets the group finder.
645             *
646             * @param groupFinder the group finder
647             */
648            public void setGroupFinder(GroupFinder groupFinder) {
649                    this.groupFinder = groupFinder;
650            }
651    
652            /**
653             * Returns the resource local service.
654             *
655             * @return the resource local service
656             */
657            public com.liferay.portal.service.ResourceLocalService getResourceLocalService() {
658                    return resourceLocalService;
659            }
660    
661            /**
662             * Sets the resource local service.
663             *
664             * @param resourceLocalService the resource local service
665             */
666            public void setResourceLocalService(
667                    com.liferay.portal.service.ResourceLocalService resourceLocalService) {
668                    this.resourceLocalService = resourceLocalService;
669            }
670    
671            /**
672             * Returns the user local service.
673             *
674             * @return the user local service
675             */
676            public com.liferay.portal.service.UserLocalService getUserLocalService() {
677                    return userLocalService;
678            }
679    
680            /**
681             * Sets the user local service.
682             *
683             * @param userLocalService the user local service
684             */
685            public void setUserLocalService(
686                    com.liferay.portal.service.UserLocalService userLocalService) {
687                    this.userLocalService = userLocalService;
688            }
689    
690            /**
691             * Returns the user remote service.
692             *
693             * @return the user remote service
694             */
695            public com.liferay.portal.service.UserService getUserService() {
696                    return userService;
697            }
698    
699            /**
700             * Sets the user remote service.
701             *
702             * @param userService the user remote service
703             */
704            public void setUserService(
705                    com.liferay.portal.service.UserService userService) {
706                    this.userService = userService;
707            }
708    
709            /**
710             * Returns the user persistence.
711             *
712             * @return the user persistence
713             */
714            public UserPersistence getUserPersistence() {
715                    return userPersistence;
716            }
717    
718            /**
719             * Sets the user persistence.
720             *
721             * @param userPersistence the user persistence
722             */
723            public void setUserPersistence(UserPersistence userPersistence) {
724                    this.userPersistence = userPersistence;
725            }
726    
727            /**
728             * Returns the user finder.
729             *
730             * @return the user finder
731             */
732            public UserFinder getUserFinder() {
733                    return userFinder;
734            }
735    
736            /**
737             * Sets the user finder.
738             *
739             * @param userFinder the user finder
740             */
741            public void setUserFinder(UserFinder userFinder) {
742                    this.userFinder = userFinder;
743            }
744    
745            /**
746             * Returns the asset category local service.
747             *
748             * @return the asset category local service
749             */
750            public com.liferay.portlet.asset.service.AssetCategoryLocalService getAssetCategoryLocalService() {
751                    return assetCategoryLocalService;
752            }
753    
754            /**
755             * Sets the asset category local service.
756             *
757             * @param assetCategoryLocalService the asset category local service
758             */
759            public void setAssetCategoryLocalService(
760                    com.liferay.portlet.asset.service.AssetCategoryLocalService assetCategoryLocalService) {
761                    this.assetCategoryLocalService = assetCategoryLocalService;
762            }
763    
764            /**
765             * Returns the asset category remote service.
766             *
767             * @return the asset category remote service
768             */
769            public com.liferay.portlet.asset.service.AssetCategoryService getAssetCategoryService() {
770                    return assetCategoryService;
771            }
772    
773            /**
774             * Sets the asset category remote service.
775             *
776             * @param assetCategoryService the asset category remote service
777             */
778            public void setAssetCategoryService(
779                    com.liferay.portlet.asset.service.AssetCategoryService assetCategoryService) {
780                    this.assetCategoryService = assetCategoryService;
781            }
782    
783            /**
784             * Returns the asset category persistence.
785             *
786             * @return the asset category persistence
787             */
788            public AssetCategoryPersistence getAssetCategoryPersistence() {
789                    return assetCategoryPersistence;
790            }
791    
792            /**
793             * Sets the asset category persistence.
794             *
795             * @param assetCategoryPersistence the asset category persistence
796             */
797            public void setAssetCategoryPersistence(
798                    AssetCategoryPersistence assetCategoryPersistence) {
799                    this.assetCategoryPersistence = assetCategoryPersistence;
800            }
801    
802            /**
803             * Returns the asset category finder.
804             *
805             * @return the asset category finder
806             */
807            public AssetCategoryFinder getAssetCategoryFinder() {
808                    return assetCategoryFinder;
809            }
810    
811            /**
812             * Sets the asset category finder.
813             *
814             * @param assetCategoryFinder the asset category finder
815             */
816            public void setAssetCategoryFinder(AssetCategoryFinder assetCategoryFinder) {
817                    this.assetCategoryFinder = assetCategoryFinder;
818            }
819    
820            public void afterPropertiesSet() {
821                    persistedModelLocalServiceRegistry.register("com.liferay.portlet.asset.model.AssetVocabulary",
822                            assetVocabularyLocalService);
823            }
824    
825            public void destroy() {
826                    persistedModelLocalServiceRegistry.unregister(
827                            "com.liferay.portlet.asset.model.AssetVocabulary");
828            }
829    
830            /**
831             * Returns the Spring bean ID for this bean.
832             *
833             * @return the Spring bean ID for this bean
834             */
835            @Override
836            public String getBeanIdentifier() {
837                    return _beanIdentifier;
838            }
839    
840            /**
841             * Sets the Spring bean ID for this bean.
842             *
843             * @param beanIdentifier the Spring bean ID for this bean
844             */
845            @Override
846            public void setBeanIdentifier(String beanIdentifier) {
847                    _beanIdentifier = beanIdentifier;
848            }
849    
850            protected Class<?> getModelClass() {
851                    return AssetVocabulary.class;
852            }
853    
854            protected String getModelClassName() {
855                    return AssetVocabulary.class.getName();
856            }
857    
858            /**
859             * Performs a SQL query.
860             *
861             * @param sql the sql query
862             */
863            protected void runSQL(String sql) {
864                    try {
865                            DataSource dataSource = assetVocabularyPersistence.getDataSource();
866    
867                            DB db = DBFactoryUtil.getDB();
868    
869                            sql = db.buildSQL(sql);
870                            sql = PortalUtil.transformSQL(sql);
871    
872                            SqlUpdate sqlUpdate = SqlUpdateFactoryUtil.getSqlUpdate(dataSource,
873                                            sql, new int[0]);
874    
875                            sqlUpdate.update();
876                    }
877                    catch (Exception e) {
878                            throw new SystemException(e);
879                    }
880            }
881    
882            @BeanReference(type = com.liferay.portlet.asset.service.AssetVocabularyLocalService.class)
883            protected AssetVocabularyLocalService assetVocabularyLocalService;
884            @BeanReference(type = com.liferay.portlet.asset.service.AssetVocabularyService.class)
885            protected com.liferay.portlet.asset.service.AssetVocabularyService assetVocabularyService;
886            @BeanReference(type = AssetVocabularyPersistence.class)
887            protected AssetVocabularyPersistence assetVocabularyPersistence;
888            @BeanReference(type = AssetVocabularyFinder.class)
889            protected AssetVocabularyFinder assetVocabularyFinder;
890            @BeanReference(type = com.liferay.counter.service.CounterLocalService.class)
891            protected com.liferay.counter.service.CounterLocalService counterLocalService;
892            @BeanReference(type = com.liferay.portal.service.ClassNameLocalService.class)
893            protected com.liferay.portal.service.ClassNameLocalService classNameLocalService;
894            @BeanReference(type = com.liferay.portal.service.ClassNameService.class)
895            protected com.liferay.portal.service.ClassNameService classNameService;
896            @BeanReference(type = ClassNamePersistence.class)
897            protected ClassNamePersistence classNamePersistence;
898            @BeanReference(type = com.liferay.portal.service.GroupLocalService.class)
899            protected com.liferay.portal.service.GroupLocalService groupLocalService;
900            @BeanReference(type = com.liferay.portal.service.GroupService.class)
901            protected com.liferay.portal.service.GroupService groupService;
902            @BeanReference(type = GroupPersistence.class)
903            protected GroupPersistence groupPersistence;
904            @BeanReference(type = GroupFinder.class)
905            protected GroupFinder groupFinder;
906            @BeanReference(type = com.liferay.portal.service.ResourceLocalService.class)
907            protected com.liferay.portal.service.ResourceLocalService resourceLocalService;
908            @BeanReference(type = com.liferay.portal.service.UserLocalService.class)
909            protected com.liferay.portal.service.UserLocalService userLocalService;
910            @BeanReference(type = com.liferay.portal.service.UserService.class)
911            protected com.liferay.portal.service.UserService userService;
912            @BeanReference(type = UserPersistence.class)
913            protected UserPersistence userPersistence;
914            @BeanReference(type = UserFinder.class)
915            protected UserFinder userFinder;
916            @BeanReference(type = com.liferay.portlet.asset.service.AssetCategoryLocalService.class)
917            protected com.liferay.portlet.asset.service.AssetCategoryLocalService assetCategoryLocalService;
918            @BeanReference(type = com.liferay.portlet.asset.service.AssetCategoryService.class)
919            protected com.liferay.portlet.asset.service.AssetCategoryService assetCategoryService;
920            @BeanReference(type = AssetCategoryPersistence.class)
921            protected AssetCategoryPersistence assetCategoryPersistence;
922            @BeanReference(type = AssetCategoryFinder.class)
923            protected AssetCategoryFinder assetCategoryFinder;
924            @BeanReference(type = PersistedModelLocalServiceRegistry.class)
925            protected PersistedModelLocalServiceRegistry persistedModelLocalServiceRegistry;
926            private String _beanIdentifier;
927    }