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.asset.kernel.service;
016    
017    import aQute.bnd.annotation.ProviderType;
018    
019    import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
020    import com.liferay.portal.kernel.util.ReferenceRegistry;
021    
022    /**
023     * Provides the local service utility for AssetTagStats. This utility wraps
024     * {@link com.liferay.portlet.asset.service.impl.AssetTagStatsLocalServiceImpl} and is the
025     * primary access point for service operations in application layer code running
026     * on the local server. Methods of this service will not have security checks
027     * based on the propagated JAAS credentials because this service can only be
028     * accessed from within the same VM.
029     *
030     * @author Brian Wing Shun Chan
031     * @see AssetTagStatsLocalService
032     * @see com.liferay.portlet.asset.service.base.AssetTagStatsLocalServiceBaseImpl
033     * @see com.liferay.portlet.asset.service.impl.AssetTagStatsLocalServiceImpl
034     * @generated
035     */
036    @ProviderType
037    public class AssetTagStatsLocalServiceUtil {
038            /*
039             * NOTE FOR DEVELOPERS:
040             *
041             * Never modify this class directly. Add custom service methods to {@link com.liferay.portlet.asset.service.impl.AssetTagStatsLocalServiceImpl} and rerun ServiceBuilder to regenerate this class.
042             */
043    
044            /**
045            * Adds the asset tag stats to the database. Also notifies the appropriate model listeners.
046            *
047            * @param assetTagStats the asset tag stats
048            * @return the asset tag stats that was added
049            */
050            public static com.liferay.asset.kernel.model.AssetTagStats addAssetTagStats(
051                    com.liferay.asset.kernel.model.AssetTagStats assetTagStats) {
052                    return getService().addAssetTagStats(assetTagStats);
053            }
054    
055            /**
056            * Adds an asset tag statistics instance.
057            *
058            * @param tagId the primary key of the tag
059            * @param classNameId the asset entry's class name ID
060            * @return the asset tag statistics instance
061            */
062            public static com.liferay.asset.kernel.model.AssetTagStats addTagStats(
063                    long tagId, long classNameId) {
064                    return getService().addTagStats(tagId, classNameId);
065            }
066    
067            /**
068            * Creates a new asset tag stats with the primary key. Does not add the asset tag stats to the database.
069            *
070            * @param tagStatsId the primary key for the new asset tag stats
071            * @return the new asset tag stats
072            */
073            public static com.liferay.asset.kernel.model.AssetTagStats createAssetTagStats(
074                    long tagStatsId) {
075                    return getService().createAssetTagStats(tagStatsId);
076            }
077    
078            /**
079            * Deletes the asset tag stats from the database. Also notifies the appropriate model listeners.
080            *
081            * @param assetTagStats the asset tag stats
082            * @return the asset tag stats that was removed
083            */
084            public static com.liferay.asset.kernel.model.AssetTagStats deleteAssetTagStats(
085                    com.liferay.asset.kernel.model.AssetTagStats assetTagStats) {
086                    return getService().deleteAssetTagStats(assetTagStats);
087            }
088    
089            /**
090            * Deletes the asset tag stats with the primary key from the database. Also notifies the appropriate model listeners.
091            *
092            * @param tagStatsId the primary key of the asset tag stats
093            * @return the asset tag stats that was removed
094            * @throws PortalException if a asset tag stats with the primary key could not be found
095            */
096            public static com.liferay.asset.kernel.model.AssetTagStats deleteAssetTagStats(
097                    long tagStatsId)
098                    throws com.liferay.portal.kernel.exception.PortalException {
099                    return getService().deleteAssetTagStats(tagStatsId);
100            }
101    
102            public static com.liferay.asset.kernel.model.AssetTagStats fetchAssetTagStats(
103                    long tagStatsId) {
104                    return getService().fetchAssetTagStats(tagStatsId);
105            }
106    
107            /**
108            * Returns the asset tag stats with the primary key.
109            *
110            * @param tagStatsId the primary key of the asset tag stats
111            * @return the asset tag stats
112            * @throws PortalException if a asset tag stats with the primary key could not be found
113            */
114            public static com.liferay.asset.kernel.model.AssetTagStats getAssetTagStats(
115                    long tagStatsId)
116                    throws com.liferay.portal.kernel.exception.PortalException {
117                    return getService().getAssetTagStats(tagStatsId);
118            }
119    
120            /**
121            * Returns the asset tag statistics instance with the tag and asset entry
122            * matching the class name ID
123            *
124            * @param tagId the primary key of the tag
125            * @param classNameId the asset entry's class name ID
126            * @return Returns the asset tag statistics instance with the tag and asset
127            entry  matching the class name ID
128            */
129            public static com.liferay.asset.kernel.model.AssetTagStats getTagStats(
130                    long tagId, long classNameId) {
131                    return getService().getTagStats(tagId, classNameId);
132            }
133    
134            /**
135            * Updates the asset tag stats in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.
136            *
137            * @param assetTagStats the asset tag stats
138            * @return the asset tag stats that was updated
139            */
140            public static com.liferay.asset.kernel.model.AssetTagStats updateAssetTagStats(
141                    com.liferay.asset.kernel.model.AssetTagStats assetTagStats) {
142                    return getService().updateAssetTagStats(assetTagStats);
143            }
144    
145            /**
146            * Updates the asset tag statistics instance.
147            *
148            * @param tagId the primary key of the tag
149            * @param classNameId the asset entry's class name ID
150            * @return the updated asset tag statistics instance
151            */
152            public static com.liferay.asset.kernel.model.AssetTagStats updateTagStats(
153                    long tagId, long classNameId)
154                    throws com.liferay.portal.kernel.exception.PortalException {
155                    return getService().updateTagStats(tagId, classNameId);
156            }
157    
158            public static com.liferay.portal.kernel.dao.orm.ActionableDynamicQuery getActionableDynamicQuery() {
159                    return getService().getActionableDynamicQuery();
160            }
161    
162            public static com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery() {
163                    return getService().dynamicQuery();
164            }
165    
166            public static com.liferay.portal.kernel.dao.orm.IndexableActionableDynamicQuery getIndexableActionableDynamicQuery() {
167                    return getService().getIndexableActionableDynamicQuery();
168            }
169    
170            /**
171            * @throws PortalException
172            */
173            public static com.liferay.portal.kernel.model.PersistedModel deletePersistedModel(
174                    com.liferay.portal.kernel.model.PersistedModel persistedModel)
175                    throws com.liferay.portal.kernel.exception.PortalException {
176                    return getService().deletePersistedModel(persistedModel);
177            }
178    
179            public static com.liferay.portal.kernel.model.PersistedModel getPersistedModel(
180                    java.io.Serializable primaryKeyObj)
181                    throws com.liferay.portal.kernel.exception.PortalException {
182                    return getService().getPersistedModel(primaryKeyObj);
183            }
184    
185            /**
186            * Returns the number of asset tag statses.
187            *
188            * @return the number of asset tag statses
189            */
190            public static int getAssetTagStatsesCount() {
191                    return getService().getAssetTagStatsesCount();
192            }
193    
194            /**
195            * Returns the OSGi service identifier.
196            *
197            * @return the OSGi service identifier
198            */
199            public static java.lang.String getOSGiServiceIdentifier() {
200                    return getService().getOSGiServiceIdentifier();
201            }
202    
203            /**
204            * Performs a dynamic query on the database and returns the matching rows.
205            *
206            * @param dynamicQuery the dynamic query
207            * @return the matching rows
208            */
209            public static <T> java.util.List<T> dynamicQuery(
210                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) {
211                    return getService().dynamicQuery(dynamicQuery);
212            }
213    
214            /**
215            * Performs a dynamic query on the database and returns a range of the matching rows.
216            *
217            * <p>
218            * 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.AssetTagStatsModelImpl}. 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.
219            * </p>
220            *
221            * @param dynamicQuery the dynamic query
222            * @param start the lower bound of the range of model instances
223            * @param end the upper bound of the range of model instances (not inclusive)
224            * @return the range of matching rows
225            */
226            public static <T> java.util.List<T> dynamicQuery(
227                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
228                    int end) {
229                    return getService().dynamicQuery(dynamicQuery, start, end);
230            }
231    
232            /**
233            * Performs a dynamic query on the database and returns an ordered range of the matching rows.
234            *
235            * <p>
236            * 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.AssetTagStatsModelImpl}. 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.
237            * </p>
238            *
239            * @param dynamicQuery the dynamic query
240            * @param start the lower bound of the range of model instances
241            * @param end the upper bound of the range of model instances (not inclusive)
242            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
243            * @return the ordered range of matching rows
244            */
245            public static <T> java.util.List<T> dynamicQuery(
246                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
247                    int end,
248                    com.liferay.portal.kernel.util.OrderByComparator<T> orderByComparator) {
249                    return getService()
250                                       .dynamicQuery(dynamicQuery, start, end, orderByComparator);
251            }
252    
253            /**
254            * Returns a range of all the asset tag statses.
255            *
256            * <p>
257            * 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.AssetTagStatsModelImpl}. 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.
258            * </p>
259            *
260            * @param start the lower bound of the range of asset tag statses
261            * @param end the upper bound of the range of asset tag statses (not inclusive)
262            * @return the range of asset tag statses
263            */
264            public static java.util.List<com.liferay.asset.kernel.model.AssetTagStats> getAssetTagStatses(
265                    int start, int end) {
266                    return getService().getAssetTagStatses(start, end);
267            }
268    
269            /**
270            * Returns a range of all the asset tag statistics instances associated with
271            * the asset entry matching the class name ID.
272            *
273            * <p>
274            * Useful when paginating results. Returns a maximum of <code>end -
275            * start</code> instances. <code>start</code> and <code>end</code> are not
276            * primary keys, they are indexes in the result set. Thus, <code>0</code>
277            * refers to the first result in the set. Setting both <code>start</code>
278            * and <code>end</code> to {@link
279            * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full
280            * result set.
281            * </p>
282            *
283            * @param classNameId the asset entry's class name ID
284            * @param start the lower bound of the range of results
285            * @param end the upper bound of the range of results (not inclusive)
286            * @return the range of asset tag statistics associated with the asset entry
287            matching the class name ID
288            */
289            public static java.util.List<com.liferay.asset.kernel.model.AssetTagStats> getTagStats(
290                    long classNameId, int start, int end) {
291                    return getService().getTagStats(classNameId, start, end);
292            }
293    
294            /**
295            * Returns the number of rows matching the dynamic query.
296            *
297            * @param dynamicQuery the dynamic query
298            * @return the number of rows matching the dynamic query
299            */
300            public static long dynamicQueryCount(
301                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) {
302                    return getService().dynamicQueryCount(dynamicQuery);
303            }
304    
305            /**
306            * Returns the number of rows matching the dynamic query.
307            *
308            * @param dynamicQuery the dynamic query
309            * @param projection the projection to apply to the query
310            * @return the number of rows matching the dynamic query
311            */
312            public static long dynamicQueryCount(
313                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery,
314                    com.liferay.portal.kernel.dao.orm.Projection projection) {
315                    return getService().dynamicQueryCount(dynamicQuery, projection);
316            }
317    
318            /**
319            * Deletes the asset tag statistics instance.
320            *
321            * @param tagStats the asset tag statistics instance
322            */
323            public static void deleteTagStats(
324                    com.liferay.asset.kernel.model.AssetTagStats tagStats) {
325                    getService().deleteTagStats(tagStats);
326            }
327    
328            /**
329            * Deletes the asset tag statistics instance matching the tag statistics ID.
330            *
331            * @param tagStatsId the primary key of the asset tag statistics instance
332            */
333            public static void deleteTagStats(long tagStatsId)
334                    throws com.liferay.portal.kernel.exception.PortalException {
335                    getService().deleteTagStats(tagStatsId);
336            }
337    
338            /**
339            * Deletes all asset tag statistics instances associated with the asset
340            * entry matching the class name ID.
341            *
342            * @param classNameId the asset entry's class name ID
343            */
344            public static void deleteTagStatsByClassNameId(long classNameId) {
345                    getService().deleteTagStatsByClassNameId(classNameId);
346            }
347    
348            /**
349            * Deletes all asset tag statistics instances associated with the tag.
350            *
351            * @param tagId the primary key of the tag
352            */
353            public static void deleteTagStatsByTagId(long tagId) {
354                    getService().deleteTagStatsByTagId(tagId);
355            }
356    
357            public static AssetTagStatsLocalService getService() {
358                    if (_service == null) {
359                            _service = (AssetTagStatsLocalService)PortalBeanLocatorUtil.locate(AssetTagStatsLocalService.class.getName());
360    
361                            ReferenceRegistry.registerReference(AssetTagStatsLocalServiceUtil.class,
362                                    "_service");
363                    }
364    
365                    return _service;
366            }
367    
368            private static AssetTagStatsLocalService _service;
369    }