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.lar.ExportImportHelperUtil;
034    import com.liferay.portal.kernel.lar.ManifestSummary;
035    import com.liferay.portal.kernel.lar.PortletDataContext;
036    import com.liferay.portal.kernel.lar.StagedModelDataHandlerUtil;
037    import com.liferay.portal.kernel.lar.StagedModelType;
038    import com.liferay.portal.kernel.search.Indexable;
039    import com.liferay.portal.kernel.search.IndexableType;
040    import com.liferay.portal.kernel.util.OrderByComparator;
041    import com.liferay.portal.model.PersistedModel;
042    import com.liferay.portal.service.BaseLocalServiceImpl;
043    import com.liferay.portal.service.PersistedModelLocalServiceRegistry;
044    import com.liferay.portal.service.persistence.ClassNamePersistence;
045    import com.liferay.portal.service.persistence.GroupFinder;
046    import com.liferay.portal.service.persistence.GroupPersistence;
047    import com.liferay.portal.service.persistence.UserFinder;
048    import com.liferay.portal.service.persistence.UserPersistence;
049    import com.liferay.portal.util.PortalUtil;
050    
051    import com.liferay.portlet.asset.model.AssetVocabulary;
052    import com.liferay.portlet.asset.service.AssetVocabularyLocalService;
053    import com.liferay.portlet.asset.service.persistence.AssetCategoryFinder;
054    import com.liferay.portlet.asset.service.persistence.AssetCategoryPersistence;
055    import com.liferay.portlet.asset.service.persistence.AssetVocabularyFinder;
056    import com.liferay.portlet.asset.service.persistence.AssetVocabularyPersistence;
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.toString(),
287                                                    modelAdditionCount);
288    
289                                            long modelDeletionCount = ExportImportHelperUtil.getModelDeletionCount(portletDataContext,
290                                                            stagedModelType);
291    
292                                            manifestSummary.addModelDeletionCount(stagedModelType.toString(),
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() {
314                                    @Override
315                                    public void performAction(Object object)
316                                            throws PortalException {
317                                            AssetVocabulary stagedModel = (AssetVocabulary)object;
318    
319                                            StagedModelDataHandlerUtil.exportStagedModel(portletDataContext,
320                                                    stagedModel);
321                                    }
322                            });
323                    exportActionableDynamicQuery.setStagedModelType(new StagedModelType(
324                                    PortalUtil.getClassNameId(AssetVocabulary.class.getName())));
325    
326                    return exportActionableDynamicQuery;
327            }
328    
329            /**
330             * @throws PortalException
331             */
332            @Override
333            public PersistedModel deletePersistedModel(PersistedModel persistedModel)
334                    throws PortalException {
335                    return assetVocabularyLocalService.deleteAssetVocabulary((AssetVocabulary)persistedModel);
336            }
337    
338            @Override
339            public PersistedModel getPersistedModel(Serializable primaryKeyObj)
340                    throws PortalException {
341                    return assetVocabularyPersistence.findByPrimaryKey(primaryKeyObj);
342            }
343    
344            /**
345             * Returns all the asset vocabularies matching the UUID and company.
346             *
347             * @param uuid the UUID of the asset vocabularies
348             * @param companyId the primary key of the company
349             * @return the matching asset vocabularies, or an empty list if no matches were found
350             */
351            @Override
352            public List<AssetVocabulary> getAssetVocabulariesByUuidAndCompanyId(
353                    String uuid, long companyId) {
354                    return assetVocabularyPersistence.findByUuid_C(uuid, companyId);
355            }
356    
357            /**
358             * Returns a range of asset vocabularies matching the UUID and company.
359             *
360             * @param uuid the UUID of the asset vocabularies
361             * @param companyId the primary key of the company
362             * @param start the lower bound of the range of asset vocabularies
363             * @param end the upper bound of the range of asset vocabularies (not inclusive)
364             * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
365             * @return the range of matching asset vocabularies, or an empty list if no matches were found
366             */
367            @Override
368            public List<AssetVocabulary> getAssetVocabulariesByUuidAndCompanyId(
369                    String uuid, long companyId, int start, int end,
370                    OrderByComparator<AssetVocabulary> orderByComparator) {
371                    return assetVocabularyPersistence.findByUuid_C(uuid, companyId, start,
372                            end, orderByComparator);
373            }
374    
375            /**
376             * Returns the asset vocabulary matching the UUID and group.
377             *
378             * @param uuid the asset vocabulary's UUID
379             * @param groupId the primary key of the group
380             * @return the matching asset vocabulary
381             * @throws PortalException if a matching asset vocabulary could not be found
382             */
383            @Override
384            public AssetVocabulary getAssetVocabularyByUuidAndGroupId(String uuid,
385                    long groupId) throws PortalException {
386                    return assetVocabularyPersistence.findByUUID_G(uuid, groupId);
387            }
388    
389            /**
390             * Returns a range of all the asset vocabularies.
391             *
392             * <p>
393             * 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.
394             * </p>
395             *
396             * @param start the lower bound of the range of asset vocabularies
397             * @param end the upper bound of the range of asset vocabularies (not inclusive)
398             * @return the range of asset vocabularies
399             */
400            @Override
401            public List<AssetVocabulary> getAssetVocabularies(int start, int end) {
402                    return assetVocabularyPersistence.findAll(start, end);
403            }
404    
405            /**
406             * Returns the number of asset vocabularies.
407             *
408             * @return the number of asset vocabularies
409             */
410            @Override
411            public int getAssetVocabulariesCount() {
412                    return assetVocabularyPersistence.countAll();
413            }
414    
415            /**
416             * Updates the asset vocabulary in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.
417             *
418             * @param assetVocabulary the asset vocabulary
419             * @return the asset vocabulary that was updated
420             */
421            @Indexable(type = IndexableType.REINDEX)
422            @Override
423            public AssetVocabulary updateAssetVocabulary(
424                    AssetVocabulary assetVocabulary) {
425                    return assetVocabularyPersistence.update(assetVocabulary);
426            }
427    
428            /**
429             * Returns the asset vocabulary local service.
430             *
431             * @return the asset vocabulary local service
432             */
433            public com.liferay.portlet.asset.service.AssetVocabularyLocalService getAssetVocabularyLocalService() {
434                    return assetVocabularyLocalService;
435            }
436    
437            /**
438             * Sets the asset vocabulary local service.
439             *
440             * @param assetVocabularyLocalService the asset vocabulary local service
441             */
442            public void setAssetVocabularyLocalService(
443                    com.liferay.portlet.asset.service.AssetVocabularyLocalService assetVocabularyLocalService) {
444                    this.assetVocabularyLocalService = assetVocabularyLocalService;
445            }
446    
447            /**
448             * Returns the asset vocabulary remote service.
449             *
450             * @return the asset vocabulary remote service
451             */
452            public com.liferay.portlet.asset.service.AssetVocabularyService getAssetVocabularyService() {
453                    return assetVocabularyService;
454            }
455    
456            /**
457             * Sets the asset vocabulary remote service.
458             *
459             * @param assetVocabularyService the asset vocabulary remote service
460             */
461            public void setAssetVocabularyService(
462                    com.liferay.portlet.asset.service.AssetVocabularyService assetVocabularyService) {
463                    this.assetVocabularyService = assetVocabularyService;
464            }
465    
466            /**
467             * Returns the asset vocabulary persistence.
468             *
469             * @return the asset vocabulary persistence
470             */
471            public AssetVocabularyPersistence getAssetVocabularyPersistence() {
472                    return assetVocabularyPersistence;
473            }
474    
475            /**
476             * Sets the asset vocabulary persistence.
477             *
478             * @param assetVocabularyPersistence the asset vocabulary persistence
479             */
480            public void setAssetVocabularyPersistence(
481                    AssetVocabularyPersistence assetVocabularyPersistence) {
482                    this.assetVocabularyPersistence = assetVocabularyPersistence;
483            }
484    
485            /**
486             * Returns the asset vocabulary finder.
487             *
488             * @return the asset vocabulary finder
489             */
490            public AssetVocabularyFinder getAssetVocabularyFinder() {
491                    return assetVocabularyFinder;
492            }
493    
494            /**
495             * Sets the asset vocabulary finder.
496             *
497             * @param assetVocabularyFinder the asset vocabulary finder
498             */
499            public void setAssetVocabularyFinder(
500                    AssetVocabularyFinder assetVocabularyFinder) {
501                    this.assetVocabularyFinder = assetVocabularyFinder;
502            }
503    
504            /**
505             * Returns the counter local service.
506             *
507             * @return the counter local service
508             */
509            public com.liferay.counter.service.CounterLocalService getCounterLocalService() {
510                    return counterLocalService;
511            }
512    
513            /**
514             * Sets the counter local service.
515             *
516             * @param counterLocalService the counter local service
517             */
518            public void setCounterLocalService(
519                    com.liferay.counter.service.CounterLocalService counterLocalService) {
520                    this.counterLocalService = counterLocalService;
521            }
522    
523            /**
524             * Returns the class name local service.
525             *
526             * @return the class name local service
527             */
528            public com.liferay.portal.service.ClassNameLocalService getClassNameLocalService() {
529                    return classNameLocalService;
530            }
531    
532            /**
533             * Sets the class name local service.
534             *
535             * @param classNameLocalService the class name local service
536             */
537            public void setClassNameLocalService(
538                    com.liferay.portal.service.ClassNameLocalService classNameLocalService) {
539                    this.classNameLocalService = classNameLocalService;
540            }
541    
542            /**
543             * Returns the class name remote service.
544             *
545             * @return the class name remote service
546             */
547            public com.liferay.portal.service.ClassNameService getClassNameService() {
548                    return classNameService;
549            }
550    
551            /**
552             * Sets the class name remote service.
553             *
554             * @param classNameService the class name remote service
555             */
556            public void setClassNameService(
557                    com.liferay.portal.service.ClassNameService classNameService) {
558                    this.classNameService = classNameService;
559            }
560    
561            /**
562             * Returns the class name persistence.
563             *
564             * @return the class name persistence
565             */
566            public ClassNamePersistence getClassNamePersistence() {
567                    return classNamePersistence;
568            }
569    
570            /**
571             * Sets the class name persistence.
572             *
573             * @param classNamePersistence the class name persistence
574             */
575            public void setClassNamePersistence(
576                    ClassNamePersistence classNamePersistence) {
577                    this.classNamePersistence = classNamePersistence;
578            }
579    
580            /**
581             * Returns the group local service.
582             *
583             * @return the group local service
584             */
585            public com.liferay.portal.service.GroupLocalService getGroupLocalService() {
586                    return groupLocalService;
587            }
588    
589            /**
590             * Sets the group local service.
591             *
592             * @param groupLocalService the group local service
593             */
594            public void setGroupLocalService(
595                    com.liferay.portal.service.GroupLocalService groupLocalService) {
596                    this.groupLocalService = groupLocalService;
597            }
598    
599            /**
600             * Returns the group remote service.
601             *
602             * @return the group remote service
603             */
604            public com.liferay.portal.service.GroupService getGroupService() {
605                    return groupService;
606            }
607    
608            /**
609             * Sets the group remote service.
610             *
611             * @param groupService the group remote service
612             */
613            public void setGroupService(
614                    com.liferay.portal.service.GroupService groupService) {
615                    this.groupService = groupService;
616            }
617    
618            /**
619             * Returns the group persistence.
620             *
621             * @return the group persistence
622             */
623            public GroupPersistence getGroupPersistence() {
624                    return groupPersistence;
625            }
626    
627            /**
628             * Sets the group persistence.
629             *
630             * @param groupPersistence the group persistence
631             */
632            public void setGroupPersistence(GroupPersistence groupPersistence) {
633                    this.groupPersistence = groupPersistence;
634            }
635    
636            /**
637             * Returns the group finder.
638             *
639             * @return the group finder
640             */
641            public GroupFinder getGroupFinder() {
642                    return groupFinder;
643            }
644    
645            /**
646             * Sets the group finder.
647             *
648             * @param groupFinder the group finder
649             */
650            public void setGroupFinder(GroupFinder groupFinder) {
651                    this.groupFinder = groupFinder;
652            }
653    
654            /**
655             * Returns the resource local service.
656             *
657             * @return the resource local service
658             */
659            public com.liferay.portal.service.ResourceLocalService getResourceLocalService() {
660                    return resourceLocalService;
661            }
662    
663            /**
664             * Sets the resource local service.
665             *
666             * @param resourceLocalService the resource local service
667             */
668            public void setResourceLocalService(
669                    com.liferay.portal.service.ResourceLocalService resourceLocalService) {
670                    this.resourceLocalService = resourceLocalService;
671            }
672    
673            /**
674             * Returns the user local service.
675             *
676             * @return the user local service
677             */
678            public com.liferay.portal.service.UserLocalService getUserLocalService() {
679                    return userLocalService;
680            }
681    
682            /**
683             * Sets the user local service.
684             *
685             * @param userLocalService the user local service
686             */
687            public void setUserLocalService(
688                    com.liferay.portal.service.UserLocalService userLocalService) {
689                    this.userLocalService = userLocalService;
690            }
691    
692            /**
693             * Returns the user remote service.
694             *
695             * @return the user remote service
696             */
697            public com.liferay.portal.service.UserService getUserService() {
698                    return userService;
699            }
700    
701            /**
702             * Sets the user remote service.
703             *
704             * @param userService the user remote service
705             */
706            public void setUserService(
707                    com.liferay.portal.service.UserService userService) {
708                    this.userService = userService;
709            }
710    
711            /**
712             * Returns the user persistence.
713             *
714             * @return the user persistence
715             */
716            public UserPersistence getUserPersistence() {
717                    return userPersistence;
718            }
719    
720            /**
721             * Sets the user persistence.
722             *
723             * @param userPersistence the user persistence
724             */
725            public void setUserPersistence(UserPersistence userPersistence) {
726                    this.userPersistence = userPersistence;
727            }
728    
729            /**
730             * Returns the user finder.
731             *
732             * @return the user finder
733             */
734            public UserFinder getUserFinder() {
735                    return userFinder;
736            }
737    
738            /**
739             * Sets the user finder.
740             *
741             * @param userFinder the user finder
742             */
743            public void setUserFinder(UserFinder userFinder) {
744                    this.userFinder = userFinder;
745            }
746    
747            /**
748             * Returns the asset category local service.
749             *
750             * @return the asset category local service
751             */
752            public com.liferay.portlet.asset.service.AssetCategoryLocalService getAssetCategoryLocalService() {
753                    return assetCategoryLocalService;
754            }
755    
756            /**
757             * Sets the asset category local service.
758             *
759             * @param assetCategoryLocalService the asset category local service
760             */
761            public void setAssetCategoryLocalService(
762                    com.liferay.portlet.asset.service.AssetCategoryLocalService assetCategoryLocalService) {
763                    this.assetCategoryLocalService = assetCategoryLocalService;
764            }
765    
766            /**
767             * Returns the asset category remote service.
768             *
769             * @return the asset category remote service
770             */
771            public com.liferay.portlet.asset.service.AssetCategoryService getAssetCategoryService() {
772                    return assetCategoryService;
773            }
774    
775            /**
776             * Sets the asset category remote service.
777             *
778             * @param assetCategoryService the asset category remote service
779             */
780            public void setAssetCategoryService(
781                    com.liferay.portlet.asset.service.AssetCategoryService assetCategoryService) {
782                    this.assetCategoryService = assetCategoryService;
783            }
784    
785            /**
786             * Returns the asset category persistence.
787             *
788             * @return the asset category persistence
789             */
790            public AssetCategoryPersistence getAssetCategoryPersistence() {
791                    return assetCategoryPersistence;
792            }
793    
794            /**
795             * Sets the asset category persistence.
796             *
797             * @param assetCategoryPersistence the asset category persistence
798             */
799            public void setAssetCategoryPersistence(
800                    AssetCategoryPersistence assetCategoryPersistence) {
801                    this.assetCategoryPersistence = assetCategoryPersistence;
802            }
803    
804            /**
805             * Returns the asset category finder.
806             *
807             * @return the asset category finder
808             */
809            public AssetCategoryFinder getAssetCategoryFinder() {
810                    return assetCategoryFinder;
811            }
812    
813            /**
814             * Sets the asset category finder.
815             *
816             * @param assetCategoryFinder the asset category finder
817             */
818            public void setAssetCategoryFinder(AssetCategoryFinder assetCategoryFinder) {
819                    this.assetCategoryFinder = assetCategoryFinder;
820            }
821    
822            public void afterPropertiesSet() {
823                    persistedModelLocalServiceRegistry.register("com.liferay.portlet.asset.model.AssetVocabulary",
824                            assetVocabularyLocalService);
825            }
826    
827            public void destroy() {
828                    persistedModelLocalServiceRegistry.unregister(
829                            "com.liferay.portlet.asset.model.AssetVocabulary");
830            }
831    
832            /**
833             * Returns the Spring bean ID for this bean.
834             *
835             * @return the Spring bean ID for this bean
836             */
837            @Override
838            public String getBeanIdentifier() {
839                    return _beanIdentifier;
840            }
841    
842            /**
843             * Sets the Spring bean ID for this bean.
844             *
845             * @param beanIdentifier the Spring bean ID for this bean
846             */
847            @Override
848            public void setBeanIdentifier(String beanIdentifier) {
849                    _beanIdentifier = beanIdentifier;
850            }
851    
852            protected Class<?> getModelClass() {
853                    return AssetVocabulary.class;
854            }
855    
856            protected String getModelClassName() {
857                    return AssetVocabulary.class.getName();
858            }
859    
860            /**
861             * Performs a SQL query.
862             *
863             * @param sql the sql query
864             */
865            protected void runSQL(String sql) {
866                    try {
867                            DataSource dataSource = assetVocabularyPersistence.getDataSource();
868    
869                            DB db = DBFactoryUtil.getDB();
870    
871                            sql = db.buildSQL(sql);
872                            sql = PortalUtil.transformSQL(sql);
873    
874                            SqlUpdate sqlUpdate = SqlUpdateFactoryUtil.getSqlUpdate(dataSource,
875                                            sql, new int[0]);
876    
877                            sqlUpdate.update();
878                    }
879                    catch (Exception e) {
880                            throw new SystemException(e);
881                    }
882            }
883    
884            @BeanReference(type = com.liferay.portlet.asset.service.AssetVocabularyLocalService.class)
885            protected com.liferay.portlet.asset.service.AssetVocabularyLocalService assetVocabularyLocalService;
886            @BeanReference(type = com.liferay.portlet.asset.service.AssetVocabularyService.class)
887            protected com.liferay.portlet.asset.service.AssetVocabularyService assetVocabularyService;
888            @BeanReference(type = AssetVocabularyPersistence.class)
889            protected AssetVocabularyPersistence assetVocabularyPersistence;
890            @BeanReference(type = AssetVocabularyFinder.class)
891            protected AssetVocabularyFinder assetVocabularyFinder;
892            @BeanReference(type = com.liferay.counter.service.CounterLocalService.class)
893            protected com.liferay.counter.service.CounterLocalService counterLocalService;
894            @BeanReference(type = com.liferay.portal.service.ClassNameLocalService.class)
895            protected com.liferay.portal.service.ClassNameLocalService classNameLocalService;
896            @BeanReference(type = com.liferay.portal.service.ClassNameService.class)
897            protected com.liferay.portal.service.ClassNameService classNameService;
898            @BeanReference(type = ClassNamePersistence.class)
899            protected ClassNamePersistence classNamePersistence;
900            @BeanReference(type = com.liferay.portal.service.GroupLocalService.class)
901            protected com.liferay.portal.service.GroupLocalService groupLocalService;
902            @BeanReference(type = com.liferay.portal.service.GroupService.class)
903            protected com.liferay.portal.service.GroupService groupService;
904            @BeanReference(type = GroupPersistence.class)
905            protected GroupPersistence groupPersistence;
906            @BeanReference(type = GroupFinder.class)
907            protected GroupFinder groupFinder;
908            @BeanReference(type = com.liferay.portal.service.ResourceLocalService.class)
909            protected com.liferay.portal.service.ResourceLocalService resourceLocalService;
910            @BeanReference(type = com.liferay.portal.service.UserLocalService.class)
911            protected com.liferay.portal.service.UserLocalService userLocalService;
912            @BeanReference(type = com.liferay.portal.service.UserService.class)
913            protected com.liferay.portal.service.UserService userService;
914            @BeanReference(type = UserPersistence.class)
915            protected UserPersistence userPersistence;
916            @BeanReference(type = UserFinder.class)
917            protected UserFinder userFinder;
918            @BeanReference(type = com.liferay.portlet.asset.service.AssetCategoryLocalService.class)
919            protected com.liferay.portlet.asset.service.AssetCategoryLocalService assetCategoryLocalService;
920            @BeanReference(type = com.liferay.portlet.asset.service.AssetCategoryService.class)
921            protected com.liferay.portlet.asset.service.AssetCategoryService assetCategoryService;
922            @BeanReference(type = AssetCategoryPersistence.class)
923            protected AssetCategoryPersistence assetCategoryPersistence;
924            @BeanReference(type = AssetCategoryFinder.class)
925            protected AssetCategoryFinder assetCategoryFinder;
926            @BeanReference(type = PersistedModelLocalServiceRegistry.class)
927            protected PersistedModelLocalServiceRegistry persistedModelLocalServiceRegistry;
928            private String _beanIdentifier;
929    }