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