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.Projection;
030    import com.liferay.portal.kernel.exception.PortalException;
031    import com.liferay.portal.kernel.exception.SystemException;
032    import com.liferay.portal.kernel.search.Indexable;
033    import com.liferay.portal.kernel.search.IndexableType;
034    import com.liferay.portal.kernel.util.OrderByComparator;
035    import com.liferay.portal.model.PersistedModel;
036    import com.liferay.portal.service.BaseLocalServiceImpl;
037    import com.liferay.portal.service.PersistedModelLocalServiceRegistry;
038    import com.liferay.portal.service.persistence.ClassNamePersistence;
039    import com.liferay.portal.service.persistence.GroupFinder;
040    import com.liferay.portal.service.persistence.GroupPersistence;
041    import com.liferay.portal.service.persistence.UserFinder;
042    import com.liferay.portal.service.persistence.UserPersistence;
043    import com.liferay.portal.util.PortalUtil;
044    
045    import com.liferay.portlet.asset.model.AssetTag;
046    import com.liferay.portlet.asset.service.AssetTagLocalService;
047    import com.liferay.portlet.asset.service.persistence.AssetEntryFinder;
048    import com.liferay.portlet.asset.service.persistence.AssetEntryPersistence;
049    import com.liferay.portlet.asset.service.persistence.AssetTagFinder;
050    import com.liferay.portlet.asset.service.persistence.AssetTagPersistence;
051    import com.liferay.portlet.asset.service.persistence.AssetTagStatsPersistence;
052    
053    import java.io.Serializable;
054    
055    import java.util.List;
056    
057    import javax.sql.DataSource;
058    
059    /**
060     * Provides the base implementation for the asset tag local service.
061     *
062     * <p>
063     * 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.AssetTagLocalServiceImpl}.
064     * </p>
065     *
066     * @author Brian Wing Shun Chan
067     * @see com.liferay.portlet.asset.service.impl.AssetTagLocalServiceImpl
068     * @see com.liferay.portlet.asset.service.AssetTagLocalServiceUtil
069     * @generated
070     */
071    @ProviderType
072    public abstract class AssetTagLocalServiceBaseImpl extends BaseLocalServiceImpl
073            implements AssetTagLocalService, IdentifiableBean {
074            /*
075             * NOTE FOR DEVELOPERS:
076             *
077             * Never modify or reference this class directly. Always use {@link com.liferay.portlet.asset.service.AssetTagLocalServiceUtil} to access the asset tag local service.
078             */
079    
080            /**
081             * Adds the asset tag to the database. Also notifies the appropriate model listeners.
082             *
083             * @param assetTag the asset tag
084             * @return the asset tag that was added
085             */
086            @Indexable(type = IndexableType.REINDEX)
087            @Override
088            public AssetTag addAssetTag(AssetTag assetTag) {
089                    assetTag.setNew(true);
090    
091                    return assetTagPersistence.update(assetTag);
092            }
093    
094            /**
095             * Creates a new asset tag with the primary key. Does not add the asset tag to the database.
096             *
097             * @param tagId the primary key for the new asset tag
098             * @return the new asset tag
099             */
100            @Override
101            public AssetTag createAssetTag(long tagId) {
102                    return assetTagPersistence.create(tagId);
103            }
104    
105            /**
106             * Deletes the asset tag with the primary key from the database. Also notifies the appropriate model listeners.
107             *
108             * @param tagId the primary key of the asset tag
109             * @return the asset tag that was removed
110             * @throws PortalException if a asset tag with the primary key could not be found
111             */
112            @Indexable(type = IndexableType.DELETE)
113            @Override
114            public AssetTag deleteAssetTag(long tagId) throws PortalException {
115                    return assetTagPersistence.remove(tagId);
116            }
117    
118            /**
119             * Deletes the asset tag from the database. Also notifies the appropriate model listeners.
120             *
121             * @param assetTag the asset tag
122             * @return the asset tag that was removed
123             */
124            @Indexable(type = IndexableType.DELETE)
125            @Override
126            public AssetTag deleteAssetTag(AssetTag assetTag) {
127                    return assetTagPersistence.remove(assetTag);
128            }
129    
130            @Override
131            public DynamicQuery dynamicQuery() {
132                    Class<?> clazz = getClass();
133    
134                    return DynamicQueryFactoryUtil.forClass(AssetTag.class,
135                            clazz.getClassLoader());
136            }
137    
138            /**
139             * Performs a dynamic query on the database and returns the matching rows.
140             *
141             * @param dynamicQuery the dynamic query
142             * @return the matching rows
143             */
144            @Override
145            public <T> List<T> dynamicQuery(DynamicQuery dynamicQuery) {
146                    return assetTagPersistence.findWithDynamicQuery(dynamicQuery);
147            }
148    
149            /**
150             * Performs a dynamic query on the database and returns a range of the matching rows.
151             *
152             * <p>
153             * 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.AssetTagModelImpl}. 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.
154             * </p>
155             *
156             * @param dynamicQuery the dynamic query
157             * @param start the lower bound of the range of model instances
158             * @param end the upper bound of the range of model instances (not inclusive)
159             * @return the range of matching rows
160             */
161            @Override
162            public <T> List<T> dynamicQuery(DynamicQuery dynamicQuery, int start,
163                    int end) {
164                    return assetTagPersistence.findWithDynamicQuery(dynamicQuery, start, end);
165            }
166    
167            /**
168             * Performs a dynamic query on the database and returns an ordered range of the matching rows.
169             *
170             * <p>
171             * 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.AssetTagModelImpl}. 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.
172             * </p>
173             *
174             * @param dynamicQuery the dynamic query
175             * @param start the lower bound of the range of model instances
176             * @param end the upper bound of the range of model instances (not inclusive)
177             * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
178             * @return the ordered range of matching rows
179             */
180            @Override
181            public <T> List<T> dynamicQuery(DynamicQuery dynamicQuery, int start,
182                    int end, OrderByComparator<T> orderByComparator) {
183                    return assetTagPersistence.findWithDynamicQuery(dynamicQuery, start,
184                            end, orderByComparator);
185            }
186    
187            /**
188             * Returns the number of rows matching the dynamic query.
189             *
190             * @param dynamicQuery the dynamic query
191             * @return the number of rows matching the dynamic query
192             */
193            @Override
194            public long dynamicQueryCount(DynamicQuery dynamicQuery) {
195                    return assetTagPersistence.countWithDynamicQuery(dynamicQuery);
196            }
197    
198            /**
199             * Returns the number of rows matching the dynamic query.
200             *
201             * @param dynamicQuery the dynamic query
202             * @param projection the projection to apply to the query
203             * @return the number of rows matching the dynamic query
204             */
205            @Override
206            public long dynamicQueryCount(DynamicQuery dynamicQuery,
207                    Projection projection) {
208                    return assetTagPersistence.countWithDynamicQuery(dynamicQuery,
209                            projection);
210            }
211    
212            @Override
213            public AssetTag fetchAssetTag(long tagId) {
214                    return assetTagPersistence.fetchByPrimaryKey(tagId);
215            }
216    
217            /**
218             * Returns the asset tag with the primary key.
219             *
220             * @param tagId the primary key of the asset tag
221             * @return the asset tag
222             * @throws PortalException if a asset tag with the primary key could not be found
223             */
224            @Override
225            public AssetTag getAssetTag(long tagId) throws PortalException {
226                    return assetTagPersistence.findByPrimaryKey(tagId);
227            }
228    
229            @Override
230            public ActionableDynamicQuery getActionableDynamicQuery() {
231                    ActionableDynamicQuery actionableDynamicQuery = new DefaultActionableDynamicQuery();
232    
233                    actionableDynamicQuery.setBaseLocalService(com.liferay.portlet.asset.service.AssetTagLocalServiceUtil.getService());
234                    actionableDynamicQuery.setClass(AssetTag.class);
235                    actionableDynamicQuery.setClassLoader(getClassLoader());
236    
237                    actionableDynamicQuery.setPrimaryKeyPropertyName("tagId");
238    
239                    return actionableDynamicQuery;
240            }
241    
242            protected void initActionableDynamicQuery(
243                    ActionableDynamicQuery actionableDynamicQuery) {
244                    actionableDynamicQuery.setBaseLocalService(com.liferay.portlet.asset.service.AssetTagLocalServiceUtil.getService());
245                    actionableDynamicQuery.setClass(AssetTag.class);
246                    actionableDynamicQuery.setClassLoader(getClassLoader());
247    
248                    actionableDynamicQuery.setPrimaryKeyPropertyName("tagId");
249            }
250    
251            /**
252             * @throws PortalException
253             */
254            @Override
255            public PersistedModel deletePersistedModel(PersistedModel persistedModel)
256                    throws PortalException {
257                    return assetTagLocalService.deleteAssetTag((AssetTag)persistedModel);
258            }
259    
260            @Override
261            public PersistedModel getPersistedModel(Serializable primaryKeyObj)
262                    throws PortalException {
263                    return assetTagPersistence.findByPrimaryKey(primaryKeyObj);
264            }
265    
266            /**
267             * Returns a range of all the asset tags.
268             *
269             * <p>
270             * 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.AssetTagModelImpl}. 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.
271             * </p>
272             *
273             * @param start the lower bound of the range of asset tags
274             * @param end the upper bound of the range of asset tags (not inclusive)
275             * @return the range of asset tags
276             */
277            @Override
278            public List<AssetTag> getAssetTags(int start, int end) {
279                    return assetTagPersistence.findAll(start, end);
280            }
281    
282            /**
283             * Returns the number of asset tags.
284             *
285             * @return the number of asset tags
286             */
287            @Override
288            public int getAssetTagsCount() {
289                    return assetTagPersistence.countAll();
290            }
291    
292            /**
293             * Updates the asset tag in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.
294             *
295             * @param assetTag the asset tag
296             * @return the asset tag that was updated
297             */
298            @Indexable(type = IndexableType.REINDEX)
299            @Override
300            public AssetTag updateAssetTag(AssetTag assetTag) {
301                    return assetTagPersistence.update(assetTag);
302            }
303    
304            /**
305             */
306            @Override
307            public void addAssetEntryAssetTag(long entryId, long tagId) {
308                    assetEntryPersistence.addAssetTag(entryId, tagId);
309            }
310    
311            /**
312             */
313            @Override
314            public void addAssetEntryAssetTag(long entryId, AssetTag assetTag) {
315                    assetEntryPersistence.addAssetTag(entryId, assetTag);
316            }
317    
318            /**
319             */
320            @Override
321            public void addAssetEntryAssetTags(long entryId, long[] tagIds) {
322                    assetEntryPersistence.addAssetTags(entryId, tagIds);
323            }
324    
325            /**
326             */
327            @Override
328            public void addAssetEntryAssetTags(long entryId, List<AssetTag> AssetTags) {
329                    assetEntryPersistence.addAssetTags(entryId, AssetTags);
330            }
331    
332            /**
333             */
334            @Override
335            public void clearAssetEntryAssetTags(long entryId) {
336                    assetEntryPersistence.clearAssetTags(entryId);
337            }
338    
339            /**
340             */
341            @Override
342            public void deleteAssetEntryAssetTag(long entryId, long tagId) {
343                    assetEntryPersistence.removeAssetTag(entryId, tagId);
344            }
345    
346            /**
347             */
348            @Override
349            public void deleteAssetEntryAssetTag(long entryId, AssetTag assetTag) {
350                    assetEntryPersistence.removeAssetTag(entryId, assetTag);
351            }
352    
353            /**
354             */
355            @Override
356            public void deleteAssetEntryAssetTags(long entryId, long[] tagIds) {
357                    assetEntryPersistence.removeAssetTags(entryId, tagIds);
358            }
359    
360            /**
361             */
362            @Override
363            public void deleteAssetEntryAssetTags(long entryId, List<AssetTag> AssetTags) {
364                    assetEntryPersistence.removeAssetTags(entryId, AssetTags);
365            }
366    
367            /**
368             * Returns the entryIds of the asset entries associated with the asset tag.
369             *
370             * @param tagId the tagId of the asset tag
371             * @return long[] the entryIds of asset entries associated with the asset tag
372             */
373            @Override
374            public long[] getAssetEntryPrimaryKeys(long tagId) {
375                    return assetTagPersistence.getAssetEntryPrimaryKeys(tagId);
376            }
377    
378            /**
379             */
380            @Override
381            public List<AssetTag> getAssetEntryAssetTags(long entryId) {
382                    return assetEntryPersistence.getAssetTags(entryId);
383            }
384    
385            /**
386             */
387            @Override
388            public List<AssetTag> getAssetEntryAssetTags(long entryId, int start,
389                    int end) {
390                    return assetEntryPersistence.getAssetTags(entryId, start, end);
391            }
392    
393            /**
394             */
395            @Override
396            public List<AssetTag> getAssetEntryAssetTags(long entryId, int start,
397                    int end, OrderByComparator<AssetTag> orderByComparator) {
398                    return assetEntryPersistence.getAssetTags(entryId, start, end,
399                            orderByComparator);
400            }
401    
402            /**
403             */
404            @Override
405            public int getAssetEntryAssetTagsCount(long entryId) {
406                    return assetEntryPersistence.getAssetTagsSize(entryId);
407            }
408    
409            /**
410             */
411            @Override
412            public boolean hasAssetEntryAssetTag(long entryId, long tagId) {
413                    return assetEntryPersistence.containsAssetTag(entryId, tagId);
414            }
415    
416            /**
417             */
418            @Override
419            public boolean hasAssetEntryAssetTags(long entryId) {
420                    return assetEntryPersistence.containsAssetTags(entryId);
421            }
422    
423            /**
424             */
425            @Override
426            public void setAssetEntryAssetTags(long entryId, long[] tagIds) {
427                    assetEntryPersistence.setAssetTags(entryId, tagIds);
428            }
429    
430            /**
431             * Returns the asset tag local service.
432             *
433             * @return the asset tag local service
434             */
435            public AssetTagLocalService getAssetTagLocalService() {
436                    return assetTagLocalService;
437            }
438    
439            /**
440             * Sets the asset tag local service.
441             *
442             * @param assetTagLocalService the asset tag local service
443             */
444            public void setAssetTagLocalService(
445                    AssetTagLocalService assetTagLocalService) {
446                    this.assetTagLocalService = assetTagLocalService;
447            }
448    
449            /**
450             * Returns the asset tag remote service.
451             *
452             * @return the asset tag remote service
453             */
454            public com.liferay.portlet.asset.service.AssetTagService getAssetTagService() {
455                    return assetTagService;
456            }
457    
458            /**
459             * Sets the asset tag remote service.
460             *
461             * @param assetTagService the asset tag remote service
462             */
463            public void setAssetTagService(
464                    com.liferay.portlet.asset.service.AssetTagService assetTagService) {
465                    this.assetTagService = assetTagService;
466            }
467    
468            /**
469             * Returns the asset tag persistence.
470             *
471             * @return the asset tag persistence
472             */
473            public AssetTagPersistence getAssetTagPersistence() {
474                    return assetTagPersistence;
475            }
476    
477            /**
478             * Sets the asset tag persistence.
479             *
480             * @param assetTagPersistence the asset tag persistence
481             */
482            public void setAssetTagPersistence(AssetTagPersistence assetTagPersistence) {
483                    this.assetTagPersistence = assetTagPersistence;
484            }
485    
486            /**
487             * Returns the asset tag finder.
488             *
489             * @return the asset tag finder
490             */
491            public AssetTagFinder getAssetTagFinder() {
492                    return assetTagFinder;
493            }
494    
495            /**
496             * Sets the asset tag finder.
497             *
498             * @param assetTagFinder the asset tag finder
499             */
500            public void setAssetTagFinder(AssetTagFinder assetTagFinder) {
501                    this.assetTagFinder = assetTagFinder;
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 entry local service.
749             *
750             * @return the asset entry local service
751             */
752            public com.liferay.portlet.asset.service.AssetEntryLocalService getAssetEntryLocalService() {
753                    return assetEntryLocalService;
754            }
755    
756            /**
757             * Sets the asset entry local service.
758             *
759             * @param assetEntryLocalService the asset entry local service
760             */
761            public void setAssetEntryLocalService(
762                    com.liferay.portlet.asset.service.AssetEntryLocalService assetEntryLocalService) {
763                    this.assetEntryLocalService = assetEntryLocalService;
764            }
765    
766            /**
767             * Returns the asset entry remote service.
768             *
769             * @return the asset entry remote service
770             */
771            public com.liferay.portlet.asset.service.AssetEntryService getAssetEntryService() {
772                    return assetEntryService;
773            }
774    
775            /**
776             * Sets the asset entry remote service.
777             *
778             * @param assetEntryService the asset entry remote service
779             */
780            public void setAssetEntryService(
781                    com.liferay.portlet.asset.service.AssetEntryService assetEntryService) {
782                    this.assetEntryService = assetEntryService;
783            }
784    
785            /**
786             * Returns the asset entry persistence.
787             *
788             * @return the asset entry persistence
789             */
790            public AssetEntryPersistence getAssetEntryPersistence() {
791                    return assetEntryPersistence;
792            }
793    
794            /**
795             * Sets the asset entry persistence.
796             *
797             * @param assetEntryPersistence the asset entry persistence
798             */
799            public void setAssetEntryPersistence(
800                    AssetEntryPersistence assetEntryPersistence) {
801                    this.assetEntryPersistence = assetEntryPersistence;
802            }
803    
804            /**
805             * Returns the asset entry finder.
806             *
807             * @return the asset entry finder
808             */
809            public AssetEntryFinder getAssetEntryFinder() {
810                    return assetEntryFinder;
811            }
812    
813            /**
814             * Sets the asset entry finder.
815             *
816             * @param assetEntryFinder the asset entry finder
817             */
818            public void setAssetEntryFinder(AssetEntryFinder assetEntryFinder) {
819                    this.assetEntryFinder = assetEntryFinder;
820            }
821    
822            /**
823             * Returns the asset tag stats local service.
824             *
825             * @return the asset tag stats local service
826             */
827            public com.liferay.portlet.asset.service.AssetTagStatsLocalService getAssetTagStatsLocalService() {
828                    return assetTagStatsLocalService;
829            }
830    
831            /**
832             * Sets the asset tag stats local service.
833             *
834             * @param assetTagStatsLocalService the asset tag stats local service
835             */
836            public void setAssetTagStatsLocalService(
837                    com.liferay.portlet.asset.service.AssetTagStatsLocalService assetTagStatsLocalService) {
838                    this.assetTagStatsLocalService = assetTagStatsLocalService;
839            }
840    
841            /**
842             * Returns the asset tag stats persistence.
843             *
844             * @return the asset tag stats persistence
845             */
846            public AssetTagStatsPersistence getAssetTagStatsPersistence() {
847                    return assetTagStatsPersistence;
848            }
849    
850            /**
851             * Sets the asset tag stats persistence.
852             *
853             * @param assetTagStatsPersistence the asset tag stats persistence
854             */
855            public void setAssetTagStatsPersistence(
856                    AssetTagStatsPersistence assetTagStatsPersistence) {
857                    this.assetTagStatsPersistence = assetTagStatsPersistence;
858            }
859    
860            public void afterPropertiesSet() {
861                    persistedModelLocalServiceRegistry.register("com.liferay.portlet.asset.model.AssetTag",
862                            assetTagLocalService);
863            }
864    
865            public void destroy() {
866                    persistedModelLocalServiceRegistry.unregister(
867                            "com.liferay.portlet.asset.model.AssetTag");
868            }
869    
870            /**
871             * Returns the Spring bean ID for this bean.
872             *
873             * @return the Spring bean ID for this bean
874             */
875            @Override
876            public String getBeanIdentifier() {
877                    return _beanIdentifier;
878            }
879    
880            /**
881             * Sets the Spring bean ID for this bean.
882             *
883             * @param beanIdentifier the Spring bean ID for this bean
884             */
885            @Override
886            public void setBeanIdentifier(String beanIdentifier) {
887                    _beanIdentifier = beanIdentifier;
888            }
889    
890            protected Class<?> getModelClass() {
891                    return AssetTag.class;
892            }
893    
894            protected String getModelClassName() {
895                    return AssetTag.class.getName();
896            }
897    
898            /**
899             * Performs a SQL query.
900             *
901             * @param sql the sql query
902             */
903            protected void runSQL(String sql) {
904                    try {
905                            DataSource dataSource = assetTagPersistence.getDataSource();
906    
907                            DB db = DBFactoryUtil.getDB();
908    
909                            sql = db.buildSQL(sql);
910                            sql = PortalUtil.transformSQL(sql);
911    
912                            SqlUpdate sqlUpdate = SqlUpdateFactoryUtil.getSqlUpdate(dataSource,
913                                            sql, new int[0]);
914    
915                            sqlUpdate.update();
916                    }
917                    catch (Exception e) {
918                            throw new SystemException(e);
919                    }
920            }
921    
922            @BeanReference(type = AssetTagLocalService.class)
923            protected AssetTagLocalService assetTagLocalService;
924            @BeanReference(type = com.liferay.portlet.asset.service.AssetTagService.class)
925            protected com.liferay.portlet.asset.service.AssetTagService assetTagService;
926            @BeanReference(type = AssetTagPersistence.class)
927            protected AssetTagPersistence assetTagPersistence;
928            @BeanReference(type = AssetTagFinder.class)
929            protected AssetTagFinder assetTagFinder;
930            @BeanReference(type = com.liferay.counter.service.CounterLocalService.class)
931            protected com.liferay.counter.service.CounterLocalService counterLocalService;
932            @BeanReference(type = com.liferay.portal.service.ClassNameLocalService.class)
933            protected com.liferay.portal.service.ClassNameLocalService classNameLocalService;
934            @BeanReference(type = com.liferay.portal.service.ClassNameService.class)
935            protected com.liferay.portal.service.ClassNameService classNameService;
936            @BeanReference(type = ClassNamePersistence.class)
937            protected ClassNamePersistence classNamePersistence;
938            @BeanReference(type = com.liferay.portal.service.GroupLocalService.class)
939            protected com.liferay.portal.service.GroupLocalService groupLocalService;
940            @BeanReference(type = com.liferay.portal.service.GroupService.class)
941            protected com.liferay.portal.service.GroupService groupService;
942            @BeanReference(type = GroupPersistence.class)
943            protected GroupPersistence groupPersistence;
944            @BeanReference(type = GroupFinder.class)
945            protected GroupFinder groupFinder;
946            @BeanReference(type = com.liferay.portal.service.ResourceLocalService.class)
947            protected com.liferay.portal.service.ResourceLocalService resourceLocalService;
948            @BeanReference(type = com.liferay.portal.service.UserLocalService.class)
949            protected com.liferay.portal.service.UserLocalService userLocalService;
950            @BeanReference(type = com.liferay.portal.service.UserService.class)
951            protected com.liferay.portal.service.UserService userService;
952            @BeanReference(type = UserPersistence.class)
953            protected UserPersistence userPersistence;
954            @BeanReference(type = UserFinder.class)
955            protected UserFinder userFinder;
956            @BeanReference(type = com.liferay.portlet.asset.service.AssetEntryLocalService.class)
957            protected com.liferay.portlet.asset.service.AssetEntryLocalService assetEntryLocalService;
958            @BeanReference(type = com.liferay.portlet.asset.service.AssetEntryService.class)
959            protected com.liferay.portlet.asset.service.AssetEntryService assetEntryService;
960            @BeanReference(type = AssetEntryPersistence.class)
961            protected AssetEntryPersistence assetEntryPersistence;
962            @BeanReference(type = AssetEntryFinder.class)
963            protected AssetEntryFinder assetEntryFinder;
964            @BeanReference(type = com.liferay.portlet.asset.service.AssetTagStatsLocalService.class)
965            protected com.liferay.portlet.asset.service.AssetTagStatsLocalService assetTagStatsLocalService;
966            @BeanReference(type = AssetTagStatsPersistence.class)
967            protected AssetTagStatsPersistence assetTagStatsPersistence;
968            @BeanReference(type = PersistedModelLocalServiceRegistry.class)
969            protected PersistedModelLocalServiceRegistry persistedModelLocalServiceRegistry;
970            private String _beanIdentifier;
971    }