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.AssetTagPropertyFinder;
052    import com.liferay.portlet.asset.service.persistence.AssetTagPropertyPersistence;
053    import com.liferay.portlet.asset.service.persistence.AssetTagStatsPersistence;
054    
055    import java.io.Serializable;
056    
057    import java.util.List;
058    
059    import javax.sql.DataSource;
060    
061    /**
062     * Provides the base implementation for the asset tag local service.
063     *
064     * <p>
065     * 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}.
066     * </p>
067     *
068     * @author Brian Wing Shun Chan
069     * @see com.liferay.portlet.asset.service.impl.AssetTagLocalServiceImpl
070     * @see com.liferay.portlet.asset.service.AssetTagLocalServiceUtil
071     * @generated
072     */
073    @ProviderType
074    public abstract class AssetTagLocalServiceBaseImpl extends BaseLocalServiceImpl
075            implements AssetTagLocalService, IdentifiableBean {
076            /*
077             * NOTE FOR DEVELOPERS:
078             *
079             * Never modify or reference this class directly. Always use {@link com.liferay.portlet.asset.service.AssetTagLocalServiceUtil} to access the asset tag local service.
080             */
081    
082            /**
083             * Adds the asset tag to the database. Also notifies the appropriate model listeners.
084             *
085             * @param assetTag the asset tag
086             * @return the asset tag that was added
087             */
088            @Indexable(type = IndexableType.REINDEX)
089            @Override
090            public AssetTag addAssetTag(AssetTag assetTag) {
091                    assetTag.setNew(true);
092    
093                    return assetTagPersistence.update(assetTag);
094            }
095    
096            /**
097             * Creates a new asset tag with the primary key. Does not add the asset tag to the database.
098             *
099             * @param tagId the primary key for the new asset tag
100             * @return the new asset tag
101             */
102            @Override
103            public AssetTag createAssetTag(long tagId) {
104                    return assetTagPersistence.create(tagId);
105            }
106    
107            /**
108             * Deletes the asset tag with the primary key from the database. Also notifies the appropriate model listeners.
109             *
110             * @param tagId the primary key of the asset tag
111             * @return the asset tag that was removed
112             * @throws PortalException if a asset tag with the primary key could not be found
113             */
114            @Indexable(type = IndexableType.DELETE)
115            @Override
116            public AssetTag deleteAssetTag(long tagId) throws PortalException {
117                    return assetTagPersistence.remove(tagId);
118            }
119    
120            /**
121             * Deletes the asset tag from the database. Also notifies the appropriate model listeners.
122             *
123             * @param assetTag the asset tag
124             * @return the asset tag that was removed
125             */
126            @Indexable(type = IndexableType.DELETE)
127            @Override
128            public AssetTag deleteAssetTag(AssetTag assetTag) {
129                    return assetTagPersistence.remove(assetTag);
130            }
131    
132            @Override
133            public DynamicQuery dynamicQuery() {
134                    Class<?> clazz = getClass();
135    
136                    return DynamicQueryFactoryUtil.forClass(AssetTag.class,
137                            clazz.getClassLoader());
138            }
139    
140            /**
141             * Performs a dynamic query on the database and returns the matching rows.
142             *
143             * @param dynamicQuery the dynamic query
144             * @return the matching rows
145             */
146            @Override
147            public <T> List<T> dynamicQuery(DynamicQuery dynamicQuery) {
148                    return assetTagPersistence.findWithDynamicQuery(dynamicQuery);
149            }
150    
151            /**
152             * Performs a dynamic query on the database and returns a range of the matching rows.
153             *
154             * <p>
155             * 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.
156             * </p>
157             *
158             * @param dynamicQuery the dynamic query
159             * @param start the lower bound of the range of model instances
160             * @param end the upper bound of the range of model instances (not inclusive)
161             * @return the range of matching rows
162             */
163            @Override
164            public <T> List<T> dynamicQuery(DynamicQuery dynamicQuery, int start,
165                    int end) {
166                    return assetTagPersistence.findWithDynamicQuery(dynamicQuery, start, end);
167            }
168    
169            /**
170             * Performs a dynamic query on the database and returns an ordered range of the matching rows.
171             *
172             * <p>
173             * 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.
174             * </p>
175             *
176             * @param dynamicQuery the dynamic query
177             * @param start the lower bound of the range of model instances
178             * @param end the upper bound of the range of model instances (not inclusive)
179             * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
180             * @return the ordered range of matching rows
181             */
182            @Override
183            public <T> List<T> dynamicQuery(DynamicQuery dynamicQuery, int start,
184                    int end, OrderByComparator<T> orderByComparator) {
185                    return assetTagPersistence.findWithDynamicQuery(dynamicQuery, start,
186                            end, orderByComparator);
187            }
188    
189            /**
190             * Returns the number of rows matching the dynamic query.
191             *
192             * @param dynamicQuery the dynamic query
193             * @return the number of rows matching the dynamic query
194             */
195            @Override
196            public long dynamicQueryCount(DynamicQuery dynamicQuery) {
197                    return assetTagPersistence.countWithDynamicQuery(dynamicQuery);
198            }
199    
200            /**
201             * Returns the number of rows matching the dynamic query.
202             *
203             * @param dynamicQuery the dynamic query
204             * @param projection the projection to apply to the query
205             * @return the number of rows matching the dynamic query
206             */
207            @Override
208            public long dynamicQueryCount(DynamicQuery dynamicQuery,
209                    Projection projection) {
210                    return assetTagPersistence.countWithDynamicQuery(dynamicQuery,
211                            projection);
212            }
213    
214            @Override
215            public AssetTag fetchAssetTag(long tagId) {
216                    return assetTagPersistence.fetchByPrimaryKey(tagId);
217            }
218    
219            /**
220             * Returns the asset tag with the primary key.
221             *
222             * @param tagId the primary key of the asset tag
223             * @return the asset tag
224             * @throws PortalException if a asset tag with the primary key could not be found
225             */
226            @Override
227            public AssetTag getAssetTag(long tagId) throws PortalException {
228                    return assetTagPersistence.findByPrimaryKey(tagId);
229            }
230    
231            @Override
232            public ActionableDynamicQuery getActionableDynamicQuery() {
233                    ActionableDynamicQuery actionableDynamicQuery = new DefaultActionableDynamicQuery();
234    
235                    actionableDynamicQuery.setBaseLocalService(com.liferay.portlet.asset.service.AssetTagLocalServiceUtil.getService());
236                    actionableDynamicQuery.setClass(AssetTag.class);
237                    actionableDynamicQuery.setClassLoader(getClassLoader());
238    
239                    actionableDynamicQuery.setPrimaryKeyPropertyName("tagId");
240    
241                    return actionableDynamicQuery;
242            }
243    
244            protected void initActionableDynamicQuery(
245                    ActionableDynamicQuery actionableDynamicQuery) {
246                    actionableDynamicQuery.setBaseLocalService(com.liferay.portlet.asset.service.AssetTagLocalServiceUtil.getService());
247                    actionableDynamicQuery.setClass(AssetTag.class);
248                    actionableDynamicQuery.setClassLoader(getClassLoader());
249    
250                    actionableDynamicQuery.setPrimaryKeyPropertyName("tagId");
251            }
252    
253            /**
254             * @throws PortalException
255             */
256            @Override
257            public PersistedModel deletePersistedModel(PersistedModel persistedModel)
258                    throws PortalException {
259                    return assetTagLocalService.deleteAssetTag((AssetTag)persistedModel);
260            }
261    
262            @Override
263            public PersistedModel getPersistedModel(Serializable primaryKeyObj)
264                    throws PortalException {
265                    return assetTagPersistence.findByPrimaryKey(primaryKeyObj);
266            }
267    
268            /**
269             * Returns a range of all the asset tags.
270             *
271             * <p>
272             * 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.
273             * </p>
274             *
275             * @param start the lower bound of the range of asset tags
276             * @param end the upper bound of the range of asset tags (not inclusive)
277             * @return the range of asset tags
278             */
279            @Override
280            public List<AssetTag> getAssetTags(int start, int end) {
281                    return assetTagPersistence.findAll(start, end);
282            }
283    
284            /**
285             * Returns the number of asset tags.
286             *
287             * @return the number of asset tags
288             */
289            @Override
290            public int getAssetTagsCount() {
291                    return assetTagPersistence.countAll();
292            }
293    
294            /**
295             * Updates the asset tag in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.
296             *
297             * @param assetTag the asset tag
298             * @return the asset tag that was updated
299             */
300            @Indexable(type = IndexableType.REINDEX)
301            @Override
302            public AssetTag updateAssetTag(AssetTag assetTag) {
303                    return assetTagPersistence.update(assetTag);
304            }
305    
306            /**
307             */
308            @Override
309            public void addAssetEntryAssetTag(long entryId, long tagId) {
310                    assetEntryPersistence.addAssetTag(entryId, tagId);
311            }
312    
313            /**
314             */
315            @Override
316            public void addAssetEntryAssetTag(long entryId, AssetTag assetTag) {
317                    assetEntryPersistence.addAssetTag(entryId, assetTag);
318            }
319    
320            /**
321             */
322            @Override
323            public void addAssetEntryAssetTags(long entryId, long[] tagIds) {
324                    assetEntryPersistence.addAssetTags(entryId, tagIds);
325            }
326    
327            /**
328             */
329            @Override
330            public void addAssetEntryAssetTags(long entryId, List<AssetTag> AssetTags) {
331                    assetEntryPersistence.addAssetTags(entryId, AssetTags);
332            }
333    
334            /**
335             */
336            @Override
337            public void clearAssetEntryAssetTags(long entryId) {
338                    assetEntryPersistence.clearAssetTags(entryId);
339            }
340    
341            /**
342             */
343            @Override
344            public void deleteAssetEntryAssetTag(long entryId, long tagId) {
345                    assetEntryPersistence.removeAssetTag(entryId, tagId);
346            }
347    
348            /**
349             */
350            @Override
351            public void deleteAssetEntryAssetTag(long entryId, AssetTag assetTag) {
352                    assetEntryPersistence.removeAssetTag(entryId, assetTag);
353            }
354    
355            /**
356             */
357            @Override
358            public void deleteAssetEntryAssetTags(long entryId, long[] tagIds) {
359                    assetEntryPersistence.removeAssetTags(entryId, tagIds);
360            }
361    
362            /**
363             */
364            @Override
365            public void deleteAssetEntryAssetTags(long entryId, List<AssetTag> AssetTags) {
366                    assetEntryPersistence.removeAssetTags(entryId, AssetTags);
367            }
368    
369            /**
370             * Returns the entryIds of the asset entries associated with the asset tag.
371             *
372             * @param tagId the tagId of the asset tag
373             * @return long[] the entryIds of asset entries associated with the asset tag
374             */
375            @Override
376            public long[] getAssetEntryPrimaryKeys(long tagId) {
377                    return assetTagPersistence.getAssetEntryPrimaryKeys(tagId);
378            }
379    
380            /**
381             */
382            @Override
383            public List<AssetTag> getAssetEntryAssetTags(long entryId) {
384                    return assetEntryPersistence.getAssetTags(entryId);
385            }
386    
387            /**
388             */
389            @Override
390            public List<AssetTag> getAssetEntryAssetTags(long entryId, int start,
391                    int end) {
392                    return assetEntryPersistence.getAssetTags(entryId, start, end);
393            }
394    
395            /**
396             */
397            @Override
398            public List<AssetTag> getAssetEntryAssetTags(long entryId, int start,
399                    int end, OrderByComparator<AssetTag> orderByComparator) {
400                    return assetEntryPersistence.getAssetTags(entryId, start, end,
401                            orderByComparator);
402            }
403    
404            /**
405             */
406            @Override
407            public int getAssetEntryAssetTagsCount(long entryId) {
408                    return assetEntryPersistence.getAssetTagsSize(entryId);
409            }
410    
411            /**
412             */
413            @Override
414            public boolean hasAssetEntryAssetTag(long entryId, long tagId) {
415                    return assetEntryPersistence.containsAssetTag(entryId, tagId);
416            }
417    
418            /**
419             */
420            @Override
421            public boolean hasAssetEntryAssetTags(long entryId) {
422                    return assetEntryPersistence.containsAssetTags(entryId);
423            }
424    
425            /**
426             */
427            @Override
428            public void setAssetEntryAssetTags(long entryId, long[] tagIds) {
429                    assetEntryPersistence.setAssetTags(entryId, tagIds);
430            }
431    
432            /**
433             * Returns the asset tag local service.
434             *
435             * @return the asset tag local service
436             */
437            public com.liferay.portlet.asset.service.AssetTagLocalService getAssetTagLocalService() {
438                    return assetTagLocalService;
439            }
440    
441            /**
442             * Sets the asset tag local service.
443             *
444             * @param assetTagLocalService the asset tag local service
445             */
446            public void setAssetTagLocalService(
447                    com.liferay.portlet.asset.service.AssetTagLocalService assetTagLocalService) {
448                    this.assetTagLocalService = assetTagLocalService;
449            }
450    
451            /**
452             * Returns the asset tag remote service.
453             *
454             * @return the asset tag remote service
455             */
456            public com.liferay.portlet.asset.service.AssetTagService getAssetTagService() {
457                    return assetTagService;
458            }
459    
460            /**
461             * Sets the asset tag remote service.
462             *
463             * @param assetTagService the asset tag remote service
464             */
465            public void setAssetTagService(
466                    com.liferay.portlet.asset.service.AssetTagService assetTagService) {
467                    this.assetTagService = assetTagService;
468            }
469    
470            /**
471             * Returns the asset tag persistence.
472             *
473             * @return the asset tag persistence
474             */
475            public AssetTagPersistence getAssetTagPersistence() {
476                    return assetTagPersistence;
477            }
478    
479            /**
480             * Sets the asset tag persistence.
481             *
482             * @param assetTagPersistence the asset tag persistence
483             */
484            public void setAssetTagPersistence(AssetTagPersistence assetTagPersistence) {
485                    this.assetTagPersistence = assetTagPersistence;
486            }
487    
488            /**
489             * Returns the asset tag finder.
490             *
491             * @return the asset tag finder
492             */
493            public AssetTagFinder getAssetTagFinder() {
494                    return assetTagFinder;
495            }
496    
497            /**
498             * Sets the asset tag finder.
499             *
500             * @param assetTagFinder the asset tag finder
501             */
502            public void setAssetTagFinder(AssetTagFinder assetTagFinder) {
503                    this.assetTagFinder = assetTagFinder;
504            }
505    
506            /**
507             * Returns the counter local service.
508             *
509             * @return the counter local service
510             */
511            public com.liferay.counter.service.CounterLocalService getCounterLocalService() {
512                    return counterLocalService;
513            }
514    
515            /**
516             * Sets the counter local service.
517             *
518             * @param counterLocalService the counter local service
519             */
520            public void setCounterLocalService(
521                    com.liferay.counter.service.CounterLocalService counterLocalService) {
522                    this.counterLocalService = counterLocalService;
523            }
524    
525            /**
526             * Returns the class name local service.
527             *
528             * @return the class name local service
529             */
530            public com.liferay.portal.service.ClassNameLocalService getClassNameLocalService() {
531                    return classNameLocalService;
532            }
533    
534            /**
535             * Sets the class name local service.
536             *
537             * @param classNameLocalService the class name local service
538             */
539            public void setClassNameLocalService(
540                    com.liferay.portal.service.ClassNameLocalService classNameLocalService) {
541                    this.classNameLocalService = classNameLocalService;
542            }
543    
544            /**
545             * Returns the class name remote service.
546             *
547             * @return the class name remote service
548             */
549            public com.liferay.portal.service.ClassNameService getClassNameService() {
550                    return classNameService;
551            }
552    
553            /**
554             * Sets the class name remote service.
555             *
556             * @param classNameService the class name remote service
557             */
558            public void setClassNameService(
559                    com.liferay.portal.service.ClassNameService classNameService) {
560                    this.classNameService = classNameService;
561            }
562    
563            /**
564             * Returns the class name persistence.
565             *
566             * @return the class name persistence
567             */
568            public ClassNamePersistence getClassNamePersistence() {
569                    return classNamePersistence;
570            }
571    
572            /**
573             * Sets the class name persistence.
574             *
575             * @param classNamePersistence the class name persistence
576             */
577            public void setClassNamePersistence(
578                    ClassNamePersistence classNamePersistence) {
579                    this.classNamePersistence = classNamePersistence;
580            }
581    
582            /**
583             * Returns the group local service.
584             *
585             * @return the group local service
586             */
587            public com.liferay.portal.service.GroupLocalService getGroupLocalService() {
588                    return groupLocalService;
589            }
590    
591            /**
592             * Sets the group local service.
593             *
594             * @param groupLocalService the group local service
595             */
596            public void setGroupLocalService(
597                    com.liferay.portal.service.GroupLocalService groupLocalService) {
598                    this.groupLocalService = groupLocalService;
599            }
600    
601            /**
602             * Returns the group remote service.
603             *
604             * @return the group remote service
605             */
606            public com.liferay.portal.service.GroupService getGroupService() {
607                    return groupService;
608            }
609    
610            /**
611             * Sets the group remote service.
612             *
613             * @param groupService the group remote service
614             */
615            public void setGroupService(
616                    com.liferay.portal.service.GroupService groupService) {
617                    this.groupService = groupService;
618            }
619    
620            /**
621             * Returns the group persistence.
622             *
623             * @return the group persistence
624             */
625            public GroupPersistence getGroupPersistence() {
626                    return groupPersistence;
627            }
628    
629            /**
630             * Sets the group persistence.
631             *
632             * @param groupPersistence the group persistence
633             */
634            public void setGroupPersistence(GroupPersistence groupPersistence) {
635                    this.groupPersistence = groupPersistence;
636            }
637    
638            /**
639             * Returns the group finder.
640             *
641             * @return the group finder
642             */
643            public GroupFinder getGroupFinder() {
644                    return groupFinder;
645            }
646    
647            /**
648             * Sets the group finder.
649             *
650             * @param groupFinder the group finder
651             */
652            public void setGroupFinder(GroupFinder groupFinder) {
653                    this.groupFinder = groupFinder;
654            }
655    
656            /**
657             * Returns the resource local service.
658             *
659             * @return the resource local service
660             */
661            public com.liferay.portal.service.ResourceLocalService getResourceLocalService() {
662                    return resourceLocalService;
663            }
664    
665            /**
666             * Sets the resource local service.
667             *
668             * @param resourceLocalService the resource local service
669             */
670            public void setResourceLocalService(
671                    com.liferay.portal.service.ResourceLocalService resourceLocalService) {
672                    this.resourceLocalService = resourceLocalService;
673            }
674    
675            /**
676             * Returns the user local service.
677             *
678             * @return the user local service
679             */
680            public com.liferay.portal.service.UserLocalService getUserLocalService() {
681                    return userLocalService;
682            }
683    
684            /**
685             * Sets the user local service.
686             *
687             * @param userLocalService the user local service
688             */
689            public void setUserLocalService(
690                    com.liferay.portal.service.UserLocalService userLocalService) {
691                    this.userLocalService = userLocalService;
692            }
693    
694            /**
695             * Returns the user remote service.
696             *
697             * @return the user remote service
698             */
699            public com.liferay.portal.service.UserService getUserService() {
700                    return userService;
701            }
702    
703            /**
704             * Sets the user remote service.
705             *
706             * @param userService the user remote service
707             */
708            public void setUserService(
709                    com.liferay.portal.service.UserService userService) {
710                    this.userService = userService;
711            }
712    
713            /**
714             * Returns the user persistence.
715             *
716             * @return the user persistence
717             */
718            public UserPersistence getUserPersistence() {
719                    return userPersistence;
720            }
721    
722            /**
723             * Sets the user persistence.
724             *
725             * @param userPersistence the user persistence
726             */
727            public void setUserPersistence(UserPersistence userPersistence) {
728                    this.userPersistence = userPersistence;
729            }
730    
731            /**
732             * Returns the user finder.
733             *
734             * @return the user finder
735             */
736            public UserFinder getUserFinder() {
737                    return userFinder;
738            }
739    
740            /**
741             * Sets the user finder.
742             *
743             * @param userFinder the user finder
744             */
745            public void setUserFinder(UserFinder userFinder) {
746                    this.userFinder = userFinder;
747            }
748    
749            /**
750             * Returns the asset entry local service.
751             *
752             * @return the asset entry local service
753             */
754            public com.liferay.portlet.asset.service.AssetEntryLocalService getAssetEntryLocalService() {
755                    return assetEntryLocalService;
756            }
757    
758            /**
759             * Sets the asset entry local service.
760             *
761             * @param assetEntryLocalService the asset entry local service
762             */
763            public void setAssetEntryLocalService(
764                    com.liferay.portlet.asset.service.AssetEntryLocalService assetEntryLocalService) {
765                    this.assetEntryLocalService = assetEntryLocalService;
766            }
767    
768            /**
769             * Returns the asset entry remote service.
770             *
771             * @return the asset entry remote service
772             */
773            public com.liferay.portlet.asset.service.AssetEntryService getAssetEntryService() {
774                    return assetEntryService;
775            }
776    
777            /**
778             * Sets the asset entry remote service.
779             *
780             * @param assetEntryService the asset entry remote service
781             */
782            public void setAssetEntryService(
783                    com.liferay.portlet.asset.service.AssetEntryService assetEntryService) {
784                    this.assetEntryService = assetEntryService;
785            }
786    
787            /**
788             * Returns the asset entry persistence.
789             *
790             * @return the asset entry persistence
791             */
792            public AssetEntryPersistence getAssetEntryPersistence() {
793                    return assetEntryPersistence;
794            }
795    
796            /**
797             * Sets the asset entry persistence.
798             *
799             * @param assetEntryPersistence the asset entry persistence
800             */
801            public void setAssetEntryPersistence(
802                    AssetEntryPersistence assetEntryPersistence) {
803                    this.assetEntryPersistence = assetEntryPersistence;
804            }
805    
806            /**
807             * Returns the asset entry finder.
808             *
809             * @return the asset entry finder
810             */
811            public AssetEntryFinder getAssetEntryFinder() {
812                    return assetEntryFinder;
813            }
814    
815            /**
816             * Sets the asset entry finder.
817             *
818             * @param assetEntryFinder the asset entry finder
819             */
820            public void setAssetEntryFinder(AssetEntryFinder assetEntryFinder) {
821                    this.assetEntryFinder = assetEntryFinder;
822            }
823    
824            /**
825             * Returns the asset tag property local service.
826             *
827             * @return the asset tag property local service
828             */
829            public com.liferay.portlet.asset.service.AssetTagPropertyLocalService getAssetTagPropertyLocalService() {
830                    return assetTagPropertyLocalService;
831            }
832    
833            /**
834             * Sets the asset tag property local service.
835             *
836             * @param assetTagPropertyLocalService the asset tag property local service
837             */
838            public void setAssetTagPropertyLocalService(
839                    com.liferay.portlet.asset.service.AssetTagPropertyLocalService assetTagPropertyLocalService) {
840                    this.assetTagPropertyLocalService = assetTagPropertyLocalService;
841            }
842    
843            /**
844             * Returns the asset tag property remote service.
845             *
846             * @return the asset tag property remote service
847             */
848            public com.liferay.portlet.asset.service.AssetTagPropertyService getAssetTagPropertyService() {
849                    return assetTagPropertyService;
850            }
851    
852            /**
853             * Sets the asset tag property remote service.
854             *
855             * @param assetTagPropertyService the asset tag property remote service
856             */
857            public void setAssetTagPropertyService(
858                    com.liferay.portlet.asset.service.AssetTagPropertyService assetTagPropertyService) {
859                    this.assetTagPropertyService = assetTagPropertyService;
860            }
861    
862            /**
863             * Returns the asset tag property persistence.
864             *
865             * @return the asset tag property persistence
866             */
867            public AssetTagPropertyPersistence getAssetTagPropertyPersistence() {
868                    return assetTagPropertyPersistence;
869            }
870    
871            /**
872             * Sets the asset tag property persistence.
873             *
874             * @param assetTagPropertyPersistence the asset tag property persistence
875             */
876            public void setAssetTagPropertyPersistence(
877                    AssetTagPropertyPersistence assetTagPropertyPersistence) {
878                    this.assetTagPropertyPersistence = assetTagPropertyPersistence;
879            }
880    
881            /**
882             * Returns the asset tag property finder.
883             *
884             * @return the asset tag property finder
885             */
886            public AssetTagPropertyFinder getAssetTagPropertyFinder() {
887                    return assetTagPropertyFinder;
888            }
889    
890            /**
891             * Sets the asset tag property finder.
892             *
893             * @param assetTagPropertyFinder the asset tag property finder
894             */
895            public void setAssetTagPropertyFinder(
896                    AssetTagPropertyFinder assetTagPropertyFinder) {
897                    this.assetTagPropertyFinder = assetTagPropertyFinder;
898            }
899    
900            /**
901             * Returns the asset tag stats local service.
902             *
903             * @return the asset tag stats local service
904             */
905            public com.liferay.portlet.asset.service.AssetTagStatsLocalService getAssetTagStatsLocalService() {
906                    return assetTagStatsLocalService;
907            }
908    
909            /**
910             * Sets the asset tag stats local service.
911             *
912             * @param assetTagStatsLocalService the asset tag stats local service
913             */
914            public void setAssetTagStatsLocalService(
915                    com.liferay.portlet.asset.service.AssetTagStatsLocalService assetTagStatsLocalService) {
916                    this.assetTagStatsLocalService = assetTagStatsLocalService;
917            }
918    
919            /**
920             * Returns the asset tag stats persistence.
921             *
922             * @return the asset tag stats persistence
923             */
924            public AssetTagStatsPersistence getAssetTagStatsPersistence() {
925                    return assetTagStatsPersistence;
926            }
927    
928            /**
929             * Sets the asset tag stats persistence.
930             *
931             * @param assetTagStatsPersistence the asset tag stats persistence
932             */
933            public void setAssetTagStatsPersistence(
934                    AssetTagStatsPersistence assetTagStatsPersistence) {
935                    this.assetTagStatsPersistence = assetTagStatsPersistence;
936            }
937    
938            public void afterPropertiesSet() {
939                    persistedModelLocalServiceRegistry.register("com.liferay.portlet.asset.model.AssetTag",
940                            assetTagLocalService);
941            }
942    
943            public void destroy() {
944                    persistedModelLocalServiceRegistry.unregister(
945                            "com.liferay.portlet.asset.model.AssetTag");
946            }
947    
948            /**
949             * Returns the Spring bean ID for this bean.
950             *
951             * @return the Spring bean ID for this bean
952             */
953            @Override
954            public String getBeanIdentifier() {
955                    return _beanIdentifier;
956            }
957    
958            /**
959             * Sets the Spring bean ID for this bean.
960             *
961             * @param beanIdentifier the Spring bean ID for this bean
962             */
963            @Override
964            public void setBeanIdentifier(String beanIdentifier) {
965                    _beanIdentifier = beanIdentifier;
966            }
967    
968            protected Class<?> getModelClass() {
969                    return AssetTag.class;
970            }
971    
972            protected String getModelClassName() {
973                    return AssetTag.class.getName();
974            }
975    
976            /**
977             * Performs a SQL query.
978             *
979             * @param sql the sql query
980             */
981            protected void runSQL(String sql) {
982                    try {
983                            DataSource dataSource = assetTagPersistence.getDataSource();
984    
985                            DB db = DBFactoryUtil.getDB();
986    
987                            sql = db.buildSQL(sql);
988                            sql = PortalUtil.transformSQL(sql);
989    
990                            SqlUpdate sqlUpdate = SqlUpdateFactoryUtil.getSqlUpdate(dataSource,
991                                            sql, new int[0]);
992    
993                            sqlUpdate.update();
994                    }
995                    catch (Exception e) {
996                            throw new SystemException(e);
997                    }
998            }
999    
1000            @BeanReference(type = com.liferay.portlet.asset.service.AssetTagLocalService.class)
1001            protected com.liferay.portlet.asset.service.AssetTagLocalService assetTagLocalService;
1002            @BeanReference(type = com.liferay.portlet.asset.service.AssetTagService.class)
1003            protected com.liferay.portlet.asset.service.AssetTagService assetTagService;
1004            @BeanReference(type = AssetTagPersistence.class)
1005            protected AssetTagPersistence assetTagPersistence;
1006            @BeanReference(type = AssetTagFinder.class)
1007            protected AssetTagFinder assetTagFinder;
1008            @BeanReference(type = com.liferay.counter.service.CounterLocalService.class)
1009            protected com.liferay.counter.service.CounterLocalService counterLocalService;
1010            @BeanReference(type = com.liferay.portal.service.ClassNameLocalService.class)
1011            protected com.liferay.portal.service.ClassNameLocalService classNameLocalService;
1012            @BeanReference(type = com.liferay.portal.service.ClassNameService.class)
1013            protected com.liferay.portal.service.ClassNameService classNameService;
1014            @BeanReference(type = ClassNamePersistence.class)
1015            protected ClassNamePersistence classNamePersistence;
1016            @BeanReference(type = com.liferay.portal.service.GroupLocalService.class)
1017            protected com.liferay.portal.service.GroupLocalService groupLocalService;
1018            @BeanReference(type = com.liferay.portal.service.GroupService.class)
1019            protected com.liferay.portal.service.GroupService groupService;
1020            @BeanReference(type = GroupPersistence.class)
1021            protected GroupPersistence groupPersistence;
1022            @BeanReference(type = GroupFinder.class)
1023            protected GroupFinder groupFinder;
1024            @BeanReference(type = com.liferay.portal.service.ResourceLocalService.class)
1025            protected com.liferay.portal.service.ResourceLocalService resourceLocalService;
1026            @BeanReference(type = com.liferay.portal.service.UserLocalService.class)
1027            protected com.liferay.portal.service.UserLocalService userLocalService;
1028            @BeanReference(type = com.liferay.portal.service.UserService.class)
1029            protected com.liferay.portal.service.UserService userService;
1030            @BeanReference(type = UserPersistence.class)
1031            protected UserPersistence userPersistence;
1032            @BeanReference(type = UserFinder.class)
1033            protected UserFinder userFinder;
1034            @BeanReference(type = com.liferay.portlet.asset.service.AssetEntryLocalService.class)
1035            protected com.liferay.portlet.asset.service.AssetEntryLocalService assetEntryLocalService;
1036            @BeanReference(type = com.liferay.portlet.asset.service.AssetEntryService.class)
1037            protected com.liferay.portlet.asset.service.AssetEntryService assetEntryService;
1038            @BeanReference(type = AssetEntryPersistence.class)
1039            protected AssetEntryPersistence assetEntryPersistence;
1040            @BeanReference(type = AssetEntryFinder.class)
1041            protected AssetEntryFinder assetEntryFinder;
1042            @BeanReference(type = com.liferay.portlet.asset.service.AssetTagPropertyLocalService.class)
1043            protected com.liferay.portlet.asset.service.AssetTagPropertyLocalService assetTagPropertyLocalService;
1044            @BeanReference(type = com.liferay.portlet.asset.service.AssetTagPropertyService.class)
1045            protected com.liferay.portlet.asset.service.AssetTagPropertyService assetTagPropertyService;
1046            @BeanReference(type = AssetTagPropertyPersistence.class)
1047            protected AssetTagPropertyPersistence assetTagPropertyPersistence;
1048            @BeanReference(type = AssetTagPropertyFinder.class)
1049            protected AssetTagPropertyFinder assetTagPropertyFinder;
1050            @BeanReference(type = com.liferay.portlet.asset.service.AssetTagStatsLocalService.class)
1051            protected com.liferay.portlet.asset.service.AssetTagStatsLocalService assetTagStatsLocalService;
1052            @BeanReference(type = AssetTagStatsPersistence.class)
1053            protected AssetTagStatsPersistence assetTagStatsPersistence;
1054            @BeanReference(type = PersistedModelLocalServiceRegistry.class)
1055            protected PersistedModelLocalServiceRegistry persistedModelLocalServiceRegistry;
1056            private String _beanIdentifier;
1057    }