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.blogs.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 BlogsStatsUser. This utility wraps
024     * {@link com.liferay.portlet.blogs.service.impl.BlogsStatsUserLocalServiceImpl} 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 BlogsStatsUserLocalService
032     * @see com.liferay.portlet.blogs.service.base.BlogsStatsUserLocalServiceBaseImpl
033     * @see com.liferay.portlet.blogs.service.impl.BlogsStatsUserLocalServiceImpl
034     * @generated
035     */
036    @ProviderType
037    public class BlogsStatsUserLocalServiceUtil {
038            /*
039             * NOTE FOR DEVELOPERS:
040             *
041             * Never modify this class directly. Add custom service methods to {@link com.liferay.portlet.blogs.service.impl.BlogsStatsUserLocalServiceImpl} and rerun ServiceBuilder to regenerate this class.
042             */
043    
044            /**
045            * Adds the blogs stats user to the database. Also notifies the appropriate model listeners.
046            *
047            * @param blogsStatsUser the blogs stats user
048            * @return the blogs stats user that was added
049            */
050            public static com.liferay.blogs.kernel.model.BlogsStatsUser addBlogsStatsUser(
051                    com.liferay.blogs.kernel.model.BlogsStatsUser blogsStatsUser) {
052                    return getService().addBlogsStatsUser(blogsStatsUser);
053            }
054    
055            /**
056            * Creates a new blogs stats user with the primary key. Does not add the blogs stats user to the database.
057            *
058            * @param statsUserId the primary key for the new blogs stats user
059            * @return the new blogs stats user
060            */
061            public static com.liferay.blogs.kernel.model.BlogsStatsUser createBlogsStatsUser(
062                    long statsUserId) {
063                    return getService().createBlogsStatsUser(statsUserId);
064            }
065    
066            /**
067            * Deletes the blogs stats user from the database. Also notifies the appropriate model listeners.
068            *
069            * @param blogsStatsUser the blogs stats user
070            * @return the blogs stats user that was removed
071            */
072            public static com.liferay.blogs.kernel.model.BlogsStatsUser deleteBlogsStatsUser(
073                    com.liferay.blogs.kernel.model.BlogsStatsUser blogsStatsUser) {
074                    return getService().deleteBlogsStatsUser(blogsStatsUser);
075            }
076    
077            /**
078            * Deletes the blogs stats user with the primary key from the database. Also notifies the appropriate model listeners.
079            *
080            * @param statsUserId the primary key of the blogs stats user
081            * @return the blogs stats user that was removed
082            * @throws PortalException if a blogs stats user with the primary key could not be found
083            */
084            public static com.liferay.blogs.kernel.model.BlogsStatsUser deleteBlogsStatsUser(
085                    long statsUserId)
086                    throws com.liferay.portal.kernel.exception.PortalException {
087                    return getService().deleteBlogsStatsUser(statsUserId);
088            }
089    
090            public static com.liferay.blogs.kernel.model.BlogsStatsUser fetchBlogsStatsUser(
091                    long statsUserId) {
092                    return getService().fetchBlogsStatsUser(statsUserId);
093            }
094    
095            /**
096            * Returns the blogs stats user with the primary key.
097            *
098            * @param statsUserId the primary key of the blogs stats user
099            * @return the blogs stats user
100            * @throws PortalException if a blogs stats user with the primary key could not be found
101            */
102            public static com.liferay.blogs.kernel.model.BlogsStatsUser getBlogsStatsUser(
103                    long statsUserId)
104                    throws com.liferay.portal.kernel.exception.PortalException {
105                    return getService().getBlogsStatsUser(statsUserId);
106            }
107    
108            public static com.liferay.blogs.kernel.model.BlogsStatsUser getStatsUser(
109                    long groupId, long userId)
110                    throws com.liferay.portal.kernel.exception.PortalException {
111                    return getService().getStatsUser(groupId, userId);
112            }
113    
114            /**
115            * Updates the blogs stats user in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.
116            *
117            * @param blogsStatsUser the blogs stats user
118            * @return the blogs stats user that was updated
119            */
120            public static com.liferay.blogs.kernel.model.BlogsStatsUser updateBlogsStatsUser(
121                    com.liferay.blogs.kernel.model.BlogsStatsUser blogsStatsUser) {
122                    return getService().updateBlogsStatsUser(blogsStatsUser);
123            }
124    
125            public static com.liferay.portal.kernel.dao.orm.ActionableDynamicQuery getActionableDynamicQuery() {
126                    return getService().getActionableDynamicQuery();
127            }
128    
129            public static com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery() {
130                    return getService().dynamicQuery();
131            }
132    
133            public static com.liferay.portal.kernel.dao.orm.IndexableActionableDynamicQuery getIndexableActionableDynamicQuery() {
134                    return getService().getIndexableActionableDynamicQuery();
135            }
136    
137            /**
138            * @throws PortalException
139            */
140            public static com.liferay.portal.kernel.model.PersistedModel deletePersistedModel(
141                    com.liferay.portal.kernel.model.PersistedModel persistedModel)
142                    throws com.liferay.portal.kernel.exception.PortalException {
143                    return getService().deletePersistedModel(persistedModel);
144            }
145    
146            public static com.liferay.portal.kernel.model.PersistedModel getPersistedModel(
147                    java.io.Serializable primaryKeyObj)
148                    throws com.liferay.portal.kernel.exception.PortalException {
149                    return getService().getPersistedModel(primaryKeyObj);
150            }
151    
152            /**
153            * Returns the number of blogs stats users.
154            *
155            * @return the number of blogs stats users
156            */
157            public static int getBlogsStatsUsersCount() {
158                    return getService().getBlogsStatsUsersCount();
159            }
160    
161            public static int getCompanyStatsUsersCount(long companyId) {
162                    return getService().getCompanyStatsUsersCount(companyId);
163            }
164    
165            public static int getGroupStatsUsersCount(long groupId) {
166                    return getService().getGroupStatsUsersCount(groupId);
167            }
168    
169            public static int getOrganizationStatsUsersCount(long organizationId) {
170                    return getService().getOrganizationStatsUsersCount(organizationId);
171            }
172    
173            /**
174            * Returns the OSGi service identifier.
175            *
176            * @return the OSGi service identifier
177            */
178            public static java.lang.String getOSGiServiceIdentifier() {
179                    return getService().getOSGiServiceIdentifier();
180            }
181    
182            /**
183            * Performs a dynamic query on the database and returns the matching rows.
184            *
185            * @param dynamicQuery the dynamic query
186            * @return the matching rows
187            */
188            public static <T> java.util.List<T> dynamicQuery(
189                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) {
190                    return getService().dynamicQuery(dynamicQuery);
191            }
192    
193            /**
194            * Performs a dynamic query on the database and returns a range of the matching rows.
195            *
196            * <p>
197            * 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.blogs.model.impl.BlogsStatsUserModelImpl}. 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.
198            * </p>
199            *
200            * @param dynamicQuery the dynamic query
201            * @param start the lower bound of the range of model instances
202            * @param end the upper bound of the range of model instances (not inclusive)
203            * @return the range of matching rows
204            */
205            public static <T> java.util.List<T> dynamicQuery(
206                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
207                    int end) {
208                    return getService().dynamicQuery(dynamicQuery, start, end);
209            }
210    
211            /**
212            * Performs a dynamic query on the database and returns an ordered range of the matching rows.
213            *
214            * <p>
215            * 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.blogs.model.impl.BlogsStatsUserModelImpl}. 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.
216            * </p>
217            *
218            * @param dynamicQuery the dynamic query
219            * @param start the lower bound of the range of model instances
220            * @param end the upper bound of the range of model instances (not inclusive)
221            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
222            * @return the ordered range of matching rows
223            */
224            public static <T> java.util.List<T> dynamicQuery(
225                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
226                    int end,
227                    com.liferay.portal.kernel.util.OrderByComparator<T> orderByComparator) {
228                    return getService()
229                                       .dynamicQuery(dynamicQuery, start, end, orderByComparator);
230            }
231    
232            /**
233            * Returns a range of all the blogs stats users.
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.blogs.model.impl.BlogsStatsUserModelImpl}. 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 start the lower bound of the range of blogs stats users
240            * @param end the upper bound of the range of blogs stats users (not inclusive)
241            * @return the range of blogs stats users
242            */
243            public static java.util.List<com.liferay.blogs.kernel.model.BlogsStatsUser> getBlogsStatsUsers(
244                    int start, int end) {
245                    return getService().getBlogsStatsUsers(start, end);
246            }
247    
248            public static java.util.List<com.liferay.blogs.kernel.model.BlogsStatsUser> getCompanyStatsUsers(
249                    long companyId, int start, int end) {
250                    return getService().getCompanyStatsUsers(companyId, start, end);
251            }
252    
253            public static java.util.List<com.liferay.blogs.kernel.model.BlogsStatsUser> getCompanyStatsUsers(
254                    long companyId, int start, int end,
255                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.blogs.kernel.model.BlogsStatsUser> obc) {
256                    return getService().getCompanyStatsUsers(companyId, start, end, obc);
257            }
258    
259            public static java.util.List<com.liferay.blogs.kernel.model.BlogsStatsUser> getGroupStatsUsers(
260                    long groupId, int start, int end) {
261                    return getService().getGroupStatsUsers(groupId, start, end);
262            }
263    
264            public static java.util.List<com.liferay.blogs.kernel.model.BlogsStatsUser> getGroupStatsUsers(
265                    long groupId, int start, int end,
266                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.blogs.kernel.model.BlogsStatsUser> obc) {
267                    return getService().getGroupStatsUsers(groupId, start, end, obc);
268            }
269    
270            public static java.util.List<com.liferay.blogs.kernel.model.BlogsStatsUser> getGroupsStatsUsers(
271                    long companyId, long groupId, int start, int end) {
272                    return getService().getGroupsStatsUsers(companyId, groupId, start, end);
273            }
274    
275            public static java.util.List<com.liferay.blogs.kernel.model.BlogsStatsUser> getOrganizationStatsUsers(
276                    long organizationId, int start, int end) {
277                    return getService().getOrganizationStatsUsers(organizationId, start, end);
278            }
279    
280            public static java.util.List<com.liferay.blogs.kernel.model.BlogsStatsUser> getOrganizationStatsUsers(
281                    long organizationId, int start, int end,
282                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.blogs.kernel.model.BlogsStatsUser> obc) {
283                    return getService()
284                                       .getOrganizationStatsUsers(organizationId, start, end, obc);
285            }
286    
287            /**
288            * Returns the number of rows matching the dynamic query.
289            *
290            * @param dynamicQuery the dynamic query
291            * @return the number of rows matching the dynamic query
292            */
293            public static long dynamicQueryCount(
294                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) {
295                    return getService().dynamicQueryCount(dynamicQuery);
296            }
297    
298            /**
299            * Returns the number of rows matching the dynamic query.
300            *
301            * @param dynamicQuery the dynamic query
302            * @param projection the projection to apply to the query
303            * @return the number of rows matching the dynamic query
304            */
305            public static long dynamicQueryCount(
306                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery,
307                    com.liferay.portal.kernel.dao.orm.Projection projection) {
308                    return getService().dynamicQueryCount(dynamicQuery, projection);
309            }
310    
311            public static void deleteStatsUser(
312                    com.liferay.blogs.kernel.model.BlogsStatsUser statsUsers) {
313                    getService().deleteStatsUser(statsUsers);
314            }
315    
316            public static void deleteStatsUser(long statsUserId)
317                    throws com.liferay.portal.kernel.exception.PortalException {
318                    getService().deleteStatsUser(statsUserId);
319            }
320    
321            public static void deleteStatsUserByGroupId(long groupId) {
322                    getService().deleteStatsUserByGroupId(groupId);
323            }
324    
325            public static void deleteStatsUserByUserId(long userId) {
326                    getService().deleteStatsUserByUserId(userId);
327            }
328    
329            public static void updateStatsUser(long groupId, long userId)
330                    throws com.liferay.portal.kernel.exception.PortalException {
331                    getService().updateStatsUser(groupId, userId);
332            }
333    
334            public static void updateStatsUser(long groupId, long userId,
335                    java.util.Date displayDate)
336                    throws com.liferay.portal.kernel.exception.PortalException {
337                    getService().updateStatsUser(groupId, userId, displayDate);
338            }
339    
340            public static BlogsStatsUserLocalService getService() {
341                    if (_service == null) {
342                            _service = (BlogsStatsUserLocalService)PortalBeanLocatorUtil.locate(BlogsStatsUserLocalService.class.getName());
343    
344                            ReferenceRegistry.registerReference(BlogsStatsUserLocalServiceUtil.class,
345                                    "_service");
346                    }
347    
348                    return _service;
349            }
350    
351            private static BlogsStatsUserLocalService _service;
352    }