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 com.liferay.portlet.messageboards.model.MBThreadFlag addThreadFlag(
056                    long userId, com.liferay.portlet.messageboards.model.MBThread thread,
057                    com.liferay.portal.service.ServiceContext serviceContext)
058                    throws com.liferay.portal.kernel.exception.PortalException {
059                    return 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            public static com.liferay.portal.kernel.dao.orm.ExportActionableDynamicQuery getExportActionableDynamicQuery(
224                    com.liferay.portlet.exportimport.lar.PortletDataContext portletDataContext) {
225                    return getService().getExportActionableDynamicQuery(portletDataContext);
226            }
227    
228            public static com.liferay.portal.kernel.dao.orm.IndexableActionableDynamicQuery getIndexableActionableDynamicQuery() {
229                    return getService().getIndexableActionableDynamicQuery();
230            }
231    
232            /**
233            * Returns the message boards thread flag with the primary key.
234            *
235            * @param threadFlagId the primary key of the message boards thread flag
236            * @return the message boards thread flag
237            * @throws PortalException if a message boards thread flag with the primary key could not be found
238            */
239            public static com.liferay.portlet.messageboards.model.MBThreadFlag getMBThreadFlag(
240                    long threadFlagId)
241                    throws com.liferay.portal.kernel.exception.PortalException {
242                    return getService().getMBThreadFlag(threadFlagId);
243            }
244    
245            /**
246            * Returns the message boards thread flag matching the UUID and group.
247            *
248            * @param uuid the message boards thread flag's UUID
249            * @param groupId the primary key of the group
250            * @return the matching message boards thread flag
251            * @throws PortalException if a matching message boards thread flag could not be found
252            */
253            public static com.liferay.portlet.messageboards.model.MBThreadFlag getMBThreadFlagByUuidAndGroupId(
254                    java.lang.String uuid, long groupId)
255                    throws com.liferay.portal.kernel.exception.PortalException {
256                    return getService().getMBThreadFlagByUuidAndGroupId(uuid, groupId);
257            }
258    
259            /**
260            * Returns a range of all the message boards thread flags.
261            *
262            * <p>
263            * 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.
264            * </p>
265            *
266            * @param start the lower bound of the range of message boards thread flags
267            * @param end the upper bound of the range of message boards thread flags (not inclusive)
268            * @return the range of message boards thread flags
269            */
270            public static java.util.List<com.liferay.portlet.messageboards.model.MBThreadFlag> getMBThreadFlags(
271                    int start, int end) {
272                    return getService().getMBThreadFlags(start, end);
273            }
274    
275            /**
276            * Returns all the message boards thread flags matching the UUID and company.
277            *
278            * @param uuid the UUID of the message boards thread flags
279            * @param companyId the primary key of the company
280            * @return the matching message boards thread flags, or an empty list if no matches were found
281            */
282            public static java.util.List<com.liferay.portlet.messageboards.model.MBThreadFlag> getMBThreadFlagsByUuidAndCompanyId(
283                    java.lang.String uuid, long companyId) {
284                    return getService().getMBThreadFlagsByUuidAndCompanyId(uuid, companyId);
285            }
286    
287            /**
288            * Returns a range of message boards thread flags matching the UUID and company.
289            *
290            * @param uuid the UUID of the message boards thread flags
291            * @param companyId the primary key of the company
292            * @param start the lower bound of the range of message boards thread flags
293            * @param end the upper bound of the range of message boards thread flags (not inclusive)
294            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
295            * @return the range of matching message boards thread flags, or an empty list if no matches were found
296            */
297            public static java.util.List<com.liferay.portlet.messageboards.model.MBThreadFlag> getMBThreadFlagsByUuidAndCompanyId(
298                    java.lang.String uuid, long companyId, int start, int end,
299                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.messageboards.model.MBThreadFlag> orderByComparator) {
300                    return getService()
301                                       .getMBThreadFlagsByUuidAndCompanyId(uuid, companyId, start,
302                            end, orderByComparator);
303            }
304    
305            /**
306            * Returns the number of message boards thread flags.
307            *
308            * @return the number of message boards thread flags
309            */
310            public static int getMBThreadFlagsCount() {
311                    return getService().getMBThreadFlagsCount();
312            }
313    
314            /**
315            * Returns the OSGi service identifier.
316            *
317            * @return the OSGi service identifier
318            */
319            public static java.lang.String getOSGiServiceIdentifier() {
320                    return getService().getOSGiServiceIdentifier();
321            }
322    
323            public static com.liferay.portal.model.PersistedModel getPersistedModel(
324                    java.io.Serializable primaryKeyObj)
325                    throws com.liferay.portal.kernel.exception.PortalException {
326                    return getService().getPersistedModel(primaryKeyObj);
327            }
328    
329            public static com.liferay.portlet.messageboards.model.MBThreadFlag getThreadFlag(
330                    long userId, com.liferay.portlet.messageboards.model.MBThread thread)
331                    throws com.liferay.portal.kernel.exception.PortalException {
332                    return getService().getThreadFlag(userId, thread);
333            }
334    
335            public static boolean hasThreadFlag(long userId,
336                    com.liferay.portlet.messageboards.model.MBThread thread)
337                    throws com.liferay.portal.kernel.exception.PortalException {
338                    return getService().hasThreadFlag(userId, thread);
339            }
340    
341            /**
342            * Updates the message boards thread flag in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.
343            *
344            * @param mbThreadFlag the message boards thread flag
345            * @return the message boards thread flag that was updated
346            */
347            public static com.liferay.portlet.messageboards.model.MBThreadFlag updateMBThreadFlag(
348                    com.liferay.portlet.messageboards.model.MBThreadFlag mbThreadFlag) {
349                    return getService().updateMBThreadFlag(mbThreadFlag);
350            }
351    
352            public static MBThreadFlagLocalService getService() {
353                    if (_service == null) {
354                            _service = (MBThreadFlagLocalService)PortalBeanLocatorUtil.locate(MBThreadFlagLocalService.class.getName());
355    
356                            ReferenceRegistry.registerReference(MBThreadFlagLocalServiceUtil.class,
357                                    "_service");
358                    }
359    
360                    return _service;
361            }
362    
363            private static MBThreadFlagLocalService _service;
364    }