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.messageboards.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 MBThreadFlag. This utility wraps
024     * {@link com.liferay.portlet.messageboards.service.impl.MBThreadFlagLocalServiceImpl} 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 MBThreadFlagLocalService
032     * @see com.liferay.portlet.messageboards.service.base.MBThreadFlagLocalServiceBaseImpl
033     * @see com.liferay.portlet.messageboards.service.impl.MBThreadFlagLocalServiceImpl
034     * @generated
035     */
036    @ProviderType
037    public class MBThreadFlagLocalServiceUtil {
038            /*
039             * NOTE FOR DEVELOPERS:
040             *
041             * Never modify this class directly. Add custom service methods to {@link com.liferay.portlet.messageboards.service.impl.MBThreadFlagLocalServiceImpl} and rerun ServiceBuilder to regenerate this class.
042             */
043    
044            /**
045            * Adds the message boards thread flag to the database. Also notifies the appropriate model listeners.
046            *
047            * @param mbThreadFlag the message boards thread flag
048            * @return the message boards thread flag that was added
049            */
050            public static com.liferay.portlet.messageboards.model.MBThreadFlag addMBThreadFlag(
051                    com.liferay.portlet.messageboards.model.MBThreadFlag mbThreadFlag) {
052                    return getService().addMBThreadFlag(mbThreadFlag);
053            }
054    
055            public static void addThreadFlag(long userId,
056                    com.liferay.portlet.messageboards.model.MBThread thread,
057                    com.liferay.portal.service.ServiceContext serviceContext)
058                    throws com.liferay.portal.kernel.exception.PortalException {
059                    getService().addThreadFlag(userId, thread, serviceContext);
060            }
061    
062            /**
063            * Creates a new message boards thread flag with the primary key. Does not add the message boards thread flag to the database.
064            *
065            * @param threadFlagId the primary key for the new message boards thread flag
066            * @return the new message boards thread flag
067            */
068            public static com.liferay.portlet.messageboards.model.MBThreadFlag createMBThreadFlag(
069                    long threadFlagId) {
070                    return getService().createMBThreadFlag(threadFlagId);
071            }
072    
073            /**
074            * Deletes the message boards thread flag from the database. Also notifies the appropriate model listeners.
075            *
076            * @param mbThreadFlag the message boards thread flag
077            * @return the message boards thread flag that was removed
078            */
079            public static com.liferay.portlet.messageboards.model.MBThreadFlag deleteMBThreadFlag(
080                    com.liferay.portlet.messageboards.model.MBThreadFlag mbThreadFlag) {
081                    return getService().deleteMBThreadFlag(mbThreadFlag);
082            }
083    
084            /**
085            * Deletes the message boards thread flag with the primary key from the database. Also notifies the appropriate model listeners.
086            *
087            * @param threadFlagId the primary key of the message boards thread flag
088            * @return the message boards thread flag that was removed
089            * @throws PortalException if a message boards thread flag with the primary key could not be found
090            */
091            public static com.liferay.portlet.messageboards.model.MBThreadFlag deleteMBThreadFlag(
092                    long threadFlagId)
093                    throws com.liferay.portal.kernel.exception.PortalException {
094                    return getService().deleteMBThreadFlag(threadFlagId);
095            }
096    
097            /**
098            * @throws PortalException
099            */
100            public static com.liferay.portal.model.PersistedModel deletePersistedModel(
101                    com.liferay.portal.model.PersistedModel persistedModel)
102                    throws com.liferay.portal.kernel.exception.PortalException {
103                    return getService().deletePersistedModel(persistedModel);
104            }
105    
106            public static void deleteThreadFlag(
107                    com.liferay.portlet.messageboards.model.MBThreadFlag threadFlag) {
108                    getService().deleteThreadFlag(threadFlag);
109            }
110    
111            public static void deleteThreadFlag(long threadFlagId)
112                    throws com.liferay.portal.kernel.exception.PortalException {
113                    getService().deleteThreadFlag(threadFlagId);
114            }
115    
116            public static void deleteThreadFlagsByThreadId(long threadId) {
117                    getService().deleteThreadFlagsByThreadId(threadId);
118            }
119    
120            public static void deleteThreadFlagsByUserId(long userId) {
121                    getService().deleteThreadFlagsByUserId(userId);
122            }
123    
124            public static com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery() {
125                    return getService().dynamicQuery();
126            }
127    
128            /**
129            * Performs a dynamic query on the database and returns the matching rows.
130            *
131            * @param dynamicQuery the dynamic query
132            * @return the matching rows
133            */
134            public static <T> java.util.List<T> dynamicQuery(
135                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) {
136                    return getService().dynamicQuery(dynamicQuery);
137            }
138    
139            /**
140            * Performs a dynamic query on the database and returns a range of the matching rows.
141            *
142            * <p>
143            * 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.messageboards.model.impl.MBThreadFlagModelImpl}. 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.
144            * </p>
145            *
146            * @param dynamicQuery the dynamic query
147            * @param start the lower bound of the range of model instances
148            * @param end the upper bound of the range of model instances (not inclusive)
149            * @return the range of matching rows
150            */
151            public static <T> java.util.List<T> dynamicQuery(
152                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
153                    int end) {
154                    return getService().dynamicQuery(dynamicQuery, start, end);
155            }
156    
157            /**
158            * Performs a dynamic query on the database and returns an ordered range of the matching rows.
159            *
160            * <p>
161            * 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.messageboards.model.impl.MBThreadFlagModelImpl}. 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.
162            * </p>
163            *
164            * @param dynamicQuery the dynamic query
165            * @param start the lower bound of the range of model instances
166            * @param end the upper bound of the range of model instances (not inclusive)
167            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
168            * @return the ordered range of matching rows
169            */
170            public static <T> java.util.List<T> dynamicQuery(
171                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
172                    int end,
173                    com.liferay.portal.kernel.util.OrderByComparator<T> orderByComparator) {
174                    return getService()
175                                       .dynamicQuery(dynamicQuery, start, end, orderByComparator);
176            }
177    
178            /**
179            * Returns the number of rows matching the dynamic query.
180            *
181            * @param dynamicQuery the dynamic query
182            * @return the number of rows matching the dynamic query
183            */
184            public static long dynamicQueryCount(
185                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) {
186                    return getService().dynamicQueryCount(dynamicQuery);
187            }
188    
189            /**
190            * Returns the number of rows matching the dynamic query.
191            *
192            * @param dynamicQuery the dynamic query
193            * @param projection the projection to apply to the query
194            * @return the number of rows matching the dynamic query
195            */
196            public static long dynamicQueryCount(
197                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery,
198                    com.liferay.portal.kernel.dao.orm.Projection projection) {
199                    return getService().dynamicQueryCount(dynamicQuery, projection);
200            }
201    
202            public static com.liferay.portlet.messageboards.model.MBThreadFlag fetchMBThreadFlag(
203                    long threadFlagId) {
204                    return getService().fetchMBThreadFlag(threadFlagId);
205            }
206    
207            /**
208            * Returns the message boards thread flag matching the UUID and group.
209            *
210            * @param uuid the message boards thread flag's UUID
211            * @param groupId the primary key of the group
212            * @return the matching message boards thread flag, or <code>null</code> if a matching message boards thread flag could not be found
213            */
214            public static com.liferay.portlet.messageboards.model.MBThreadFlag fetchMBThreadFlagByUuidAndGroupId(
215                    java.lang.String uuid, long groupId) {
216                    return getService().fetchMBThreadFlagByUuidAndGroupId(uuid, groupId);
217            }
218    
219            public static com.liferay.portal.kernel.dao.orm.ActionableDynamicQuery getActionableDynamicQuery() {
220                    return getService().getActionableDynamicQuery();
221            }
222    
223            /**
224            * Returns the Spring bean ID for this bean.
225            *
226            * @return the Spring bean ID for this bean
227            */
228            public static java.lang.String getBeanIdentifier() {
229                    return getService().getBeanIdentifier();
230            }
231    
232            public static com.liferay.portal.kernel.dao.orm.ExportActionableDynamicQuery getExportActionableDynamicQuery(
233                    com.liferay.portal.kernel.lar.PortletDataContext portletDataContext) {
234                    return getService().getExportActionableDynamicQuery(portletDataContext);
235            }
236    
237            /**
238            * Returns the message boards thread flag with the primary key.
239            *
240            * @param threadFlagId the primary key of the message boards thread flag
241            * @return the message boards thread flag
242            * @throws PortalException if a message boards thread flag with the primary key could not be found
243            */
244            public static com.liferay.portlet.messageboards.model.MBThreadFlag getMBThreadFlag(
245                    long threadFlagId)
246                    throws com.liferay.portal.kernel.exception.PortalException {
247                    return getService().getMBThreadFlag(threadFlagId);
248            }
249    
250            /**
251            * Returns the message boards thread flag matching the UUID and group.
252            *
253            * @param uuid the message boards thread flag's UUID
254            * @param groupId the primary key of the group
255            * @return the matching message boards thread flag
256            * @throws PortalException if a matching message boards thread flag could not be found
257            */
258            public static com.liferay.portlet.messageboards.model.MBThreadFlag getMBThreadFlagByUuidAndGroupId(
259                    java.lang.String uuid, long groupId)
260                    throws com.liferay.portal.kernel.exception.PortalException {
261                    return getService().getMBThreadFlagByUuidAndGroupId(uuid, groupId);
262            }
263    
264            /**
265            * Returns a range of all the message boards thread flags.
266            *
267            * <p>
268            * 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.messageboards.model.impl.MBThreadFlagModelImpl}. 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.
269            * </p>
270            *
271            * @param start the lower bound of the range of message boards thread flags
272            * @param end the upper bound of the range of message boards thread flags (not inclusive)
273            * @return the range of message boards thread flags
274            */
275            public static java.util.List<com.liferay.portlet.messageboards.model.MBThreadFlag> getMBThreadFlags(
276                    int start, int end) {
277                    return getService().getMBThreadFlags(start, end);
278            }
279    
280            /**
281            * Returns all the message boards thread flags matching the UUID and company.
282            *
283            * @param uuid the UUID of the message boards thread flags
284            * @param companyId the primary key of the company
285            * @return the matching message boards thread flags, or an empty list if no matches were found
286            */
287            public static java.util.List<com.liferay.portlet.messageboards.model.MBThreadFlag> getMBThreadFlagsByUuidAndCompanyId(
288                    java.lang.String uuid, long companyId) {
289                    return getService().getMBThreadFlagsByUuidAndCompanyId(uuid, companyId);
290            }
291    
292            /**
293            * Returns a range of message boards thread flags matching the UUID and company.
294            *
295            * @param uuid the UUID of the message boards thread flags
296            * @param companyId the primary key of the company
297            * @param start the lower bound of the range of message boards thread flags
298            * @param end the upper bound of the range of message boards thread flags (not inclusive)
299            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
300            * @return the range of matching message boards thread flags, or an empty list if no matches were found
301            */
302            public static java.util.List<com.liferay.portlet.messageboards.model.MBThreadFlag> getMBThreadFlagsByUuidAndCompanyId(
303                    java.lang.String uuid, long companyId, int start, int end,
304                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.messageboards.model.MBThreadFlag> orderByComparator) {
305                    return getService()
306                                       .getMBThreadFlagsByUuidAndCompanyId(uuid, companyId, start,
307                            end, orderByComparator);
308            }
309    
310            /**
311            * Returns the number of message boards thread flags.
312            *
313            * @return the number of message boards thread flags
314            */
315            public static int getMBThreadFlagsCount() {
316                    return getService().getMBThreadFlagsCount();
317            }
318    
319            public static com.liferay.portal.model.PersistedModel getPersistedModel(
320                    java.io.Serializable primaryKeyObj)
321                    throws com.liferay.portal.kernel.exception.PortalException {
322                    return getService().getPersistedModel(primaryKeyObj);
323            }
324    
325            public static com.liferay.portlet.messageboards.model.MBThreadFlag getThreadFlag(
326                    long userId, com.liferay.portlet.messageboards.model.MBThread thread)
327                    throws com.liferay.portal.kernel.exception.PortalException {
328                    return getService().getThreadFlag(userId, thread);
329            }
330    
331            public static boolean hasThreadFlag(long userId,
332                    com.liferay.portlet.messageboards.model.MBThread thread)
333                    throws com.liferay.portal.kernel.exception.PortalException {
334                    return getService().hasThreadFlag(userId, thread);
335            }
336    
337            /**
338            * Sets the Spring bean ID for this bean.
339            *
340            * @param beanIdentifier the Spring bean ID for this bean
341            */
342            public static void setBeanIdentifier(java.lang.String beanIdentifier) {
343                    getService().setBeanIdentifier(beanIdentifier);
344            }
345    
346            /**
347            * Updates the message boards thread flag in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.
348            *
349            * @param mbThreadFlag the message boards thread flag
350            * @return the message boards thread flag that was updated
351            */
352            public static com.liferay.portlet.messageboards.model.MBThreadFlag updateMBThreadFlag(
353                    com.liferay.portlet.messageboards.model.MBThreadFlag mbThreadFlag) {
354                    return getService().updateMBThreadFlag(mbThreadFlag);
355            }
356    
357            public static MBThreadFlagLocalService getService() {
358                    if (_service == null) {
359                            _service = (MBThreadFlagLocalService)PortalBeanLocatorUtil.locate(MBThreadFlagLocalService.class.getName());
360    
361                            ReferenceRegistry.registerReference(MBThreadFlagLocalServiceUtil.class,
362                                    "_service");
363                    }
364    
365                    return _service;
366            }
367    
368            /**
369             * @deprecated As of 6.2.0
370             */
371            @Deprecated
372            public void setService(MBThreadFlagLocalService service) {
373            }
374    
375            private static MBThreadFlagLocalService _service;
376    }