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