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.blogs.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.portlet.blogs.model.BlogsStatsUser addBlogsStatsUser(
051                    com.liferay.portlet.blogs.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.portlet.blogs.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.portlet.blogs.model.BlogsStatsUser deleteBlogsStatsUser(
073                    com.liferay.portlet.blogs.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.portlet.blogs.model.BlogsStatsUser deleteBlogsStatsUser(
085                    long statsUserId)
086                    throws com.liferay.portal.kernel.exception.PortalException {
087                    return getService().deleteBlogsStatsUser(statsUserId);
088            }
089    
090            /**
091            * @throws PortalException
092            */
093            public static com.liferay.portal.model.PersistedModel deletePersistedModel(
094                    com.liferay.portal.model.PersistedModel persistedModel)
095                    throws com.liferay.portal.kernel.exception.PortalException {
096                    return getService().deletePersistedModel(persistedModel);
097            }
098    
099            public static void deleteStatsUser(long statsUserId)
100                    throws com.liferay.portal.kernel.exception.PortalException {
101                    getService().deleteStatsUser(statsUserId);
102            }
103    
104            public static void deleteStatsUser(
105                    com.liferay.portlet.blogs.model.BlogsStatsUser statsUsers) {
106                    getService().deleteStatsUser(statsUsers);
107            }
108    
109            public static void deleteStatsUserByGroupId(long groupId) {
110                    getService().deleteStatsUserByGroupId(groupId);
111            }
112    
113            public static void deleteStatsUserByUserId(long userId) {
114                    getService().deleteStatsUserByUserId(userId);
115            }
116    
117            public static com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery() {
118                    return getService().dynamicQuery();
119            }
120    
121            /**
122            * Performs a dynamic query on the database and returns the matching rows.
123            *
124            * @param dynamicQuery the dynamic query
125            * @return the matching rows
126            */
127            public static <T> java.util.List<T> dynamicQuery(
128                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) {
129                    return getService().dynamicQuery(dynamicQuery);
130            }
131    
132            /**
133            * Performs a dynamic query on the database and returns a range of the matching rows.
134            *
135            * <p>
136            * 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.
137            * </p>
138            *
139            * @param dynamicQuery the dynamic query
140            * @param start the lower bound of the range of model instances
141            * @param end the upper bound of the range of model instances (not inclusive)
142            * @return the range of matching rows
143            */
144            public static <T> java.util.List<T> dynamicQuery(
145                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
146                    int end) {
147                    return getService().dynamicQuery(dynamicQuery, start, end);
148            }
149    
150            /**
151            * Performs a dynamic query on the database and returns an ordered range of the matching rows.
152            *
153            * <p>
154            * 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.
155            * </p>
156            *
157            * @param dynamicQuery the dynamic query
158            * @param start the lower bound of the range of model instances
159            * @param end the upper bound of the range of model instances (not inclusive)
160            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
161            * @return the ordered range of matching rows
162            */
163            public static <T> java.util.List<T> dynamicQuery(
164                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
165                    int end,
166                    com.liferay.portal.kernel.util.OrderByComparator<T> orderByComparator) {
167                    return getService()
168                                       .dynamicQuery(dynamicQuery, start, end, orderByComparator);
169            }
170    
171            /**
172            * Returns the number of rows matching the dynamic query.
173            *
174            * @param dynamicQuery the dynamic query
175            * @return the number of rows matching the dynamic query
176            */
177            public static long dynamicQueryCount(
178                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) {
179                    return getService().dynamicQueryCount(dynamicQuery);
180            }
181    
182            /**
183            * Returns the number of rows matching the dynamic query.
184            *
185            * @param dynamicQuery the dynamic query
186            * @param projection the projection to apply to the query
187            * @return the number of rows matching the dynamic query
188            */
189            public static long dynamicQueryCount(
190                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery,
191                    com.liferay.portal.kernel.dao.orm.Projection projection) {
192                    return getService().dynamicQueryCount(dynamicQuery, projection);
193            }
194    
195            public static com.liferay.portlet.blogs.model.BlogsStatsUser fetchBlogsStatsUser(
196                    long statsUserId) {
197                    return getService().fetchBlogsStatsUser(statsUserId);
198            }
199    
200            public static com.liferay.portal.kernel.dao.orm.ActionableDynamicQuery getActionableDynamicQuery() {
201                    return getService().getActionableDynamicQuery();
202            }
203    
204            /**
205            * Returns the blogs stats user with the primary key.
206            *
207            * @param statsUserId the primary key of the blogs stats user
208            * @return the blogs stats user
209            * @throws PortalException if a blogs stats user with the primary key could not be found
210            */
211            public static com.liferay.portlet.blogs.model.BlogsStatsUser getBlogsStatsUser(
212                    long statsUserId)
213                    throws com.liferay.portal.kernel.exception.PortalException {
214                    return getService().getBlogsStatsUser(statsUserId);
215            }
216    
217            /**
218            * Returns a range of all the blogs stats users.
219            *
220            * <p>
221            * 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.
222            * </p>
223            *
224            * @param start the lower bound of the range of blogs stats users
225            * @param end the upper bound of the range of blogs stats users (not inclusive)
226            * @return the range of blogs stats users
227            */
228            public static java.util.List<com.liferay.portlet.blogs.model.BlogsStatsUser> getBlogsStatsUsers(
229                    int start, int end) {
230                    return getService().getBlogsStatsUsers(start, end);
231            }
232    
233            /**
234            * Returns the number of blogs stats users.
235            *
236            * @return the number of blogs stats users
237            */
238            public static int getBlogsStatsUsersCount() {
239                    return getService().getBlogsStatsUsersCount();
240            }
241    
242            public static java.util.List<com.liferay.portlet.blogs.model.BlogsStatsUser> getCompanyStatsUsers(
243                    long companyId, int start, int end) {
244                    return getService().getCompanyStatsUsers(companyId, start, end);
245            }
246    
247            public static java.util.List<com.liferay.portlet.blogs.model.BlogsStatsUser> getCompanyStatsUsers(
248                    long companyId, int start, int end,
249                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.blogs.model.BlogsStatsUser> obc) {
250                    return getService().getCompanyStatsUsers(companyId, start, end, obc);
251            }
252    
253            public static int getCompanyStatsUsersCount(long companyId) {
254                    return getService().getCompanyStatsUsersCount(companyId);
255            }
256    
257            public static java.util.List<com.liferay.portlet.blogs.model.BlogsStatsUser> getGroupStatsUsers(
258                    long groupId, int start, int end) {
259                    return getService().getGroupStatsUsers(groupId, start, end);
260            }
261    
262            public static java.util.List<com.liferay.portlet.blogs.model.BlogsStatsUser> getGroupStatsUsers(
263                    long groupId, int start, int end,
264                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.blogs.model.BlogsStatsUser> obc) {
265                    return getService().getGroupStatsUsers(groupId, start, end, obc);
266            }
267    
268            public static int getGroupStatsUsersCount(long groupId) {
269                    return getService().getGroupStatsUsersCount(groupId);
270            }
271    
272            public static java.util.List<com.liferay.portlet.blogs.model.BlogsStatsUser> getGroupsStatsUsers(
273                    long companyId, long groupId, int start, int end) {
274                    return getService().getGroupsStatsUsers(companyId, groupId, start, end);
275            }
276    
277            public static com.liferay.portal.kernel.dao.orm.IndexableActionableDynamicQuery getIndexableActionableDynamicQuery() {
278                    return getService().getIndexableActionableDynamicQuery();
279            }
280    
281            /**
282            * Returns the OSGi service identifier.
283            *
284            * @return the OSGi service identifier
285            */
286            public static java.lang.String getOSGiServiceIdentifier() {
287                    return getService().getOSGiServiceIdentifier();
288            }
289    
290            public static java.util.List<com.liferay.portlet.blogs.model.BlogsStatsUser> getOrganizationStatsUsers(
291                    long organizationId, int start, int end) {
292                    return getService().getOrganizationStatsUsers(organizationId, start, end);
293            }
294    
295            public static java.util.List<com.liferay.portlet.blogs.model.BlogsStatsUser> getOrganizationStatsUsers(
296                    long organizationId, int start, int end,
297                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.blogs.model.BlogsStatsUser> obc) {
298                    return getService()
299                                       .getOrganizationStatsUsers(organizationId, start, end, obc);
300            }
301    
302            public static int getOrganizationStatsUsersCount(long organizationId) {
303                    return getService().getOrganizationStatsUsersCount(organizationId);
304            }
305    
306            public static com.liferay.portal.model.PersistedModel getPersistedModel(
307                    java.io.Serializable primaryKeyObj)
308                    throws com.liferay.portal.kernel.exception.PortalException {
309                    return getService().getPersistedModel(primaryKeyObj);
310            }
311    
312            public static com.liferay.portlet.blogs.model.BlogsStatsUser getStatsUser(
313                    long groupId, long userId)
314                    throws com.liferay.portal.kernel.exception.PortalException {
315                    return getService().getStatsUser(groupId, userId);
316            }
317    
318            /**
319            * Updates the blogs stats user in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.
320            *
321            * @param blogsStatsUser the blogs stats user
322            * @return the blogs stats user that was updated
323            */
324            public static com.liferay.portlet.blogs.model.BlogsStatsUser updateBlogsStatsUser(
325                    com.liferay.portlet.blogs.model.BlogsStatsUser blogsStatsUser) {
326                    return getService().updateBlogsStatsUser(blogsStatsUser);
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    }