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.exception.PortalException;
020    import com.liferay.portal.kernel.exception.SystemException;
021    import com.liferay.portal.kernel.search.IndexableType;
022    import com.liferay.portal.kernel.transaction.Isolation;
023    import com.liferay.portal.kernel.transaction.Propagation;
024    import com.liferay.portal.kernel.transaction.Transactional;
025    import com.liferay.portal.model.SystemEventConstants;
026    import com.liferay.portal.service.BaseLocalService;
027    import com.liferay.portal.service.PersistedModelLocalService;
028    
029    /**
030     * Provides the local service interface for MBBan. Methods of this
031     * service will not have security checks based on the propagated JAAS
032     * credentials because this service can only be accessed from within the same
033     * VM.
034     *
035     * @author Brian Wing Shun Chan
036     * @see MBBanLocalServiceUtil
037     * @see com.liferay.portlet.messageboards.service.base.MBBanLocalServiceBaseImpl
038     * @see com.liferay.portlet.messageboards.service.impl.MBBanLocalServiceImpl
039     * @generated
040     */
041    @ProviderType
042    @Transactional(isolation = Isolation.PORTAL, rollbackFor =  {
043            PortalException.class, SystemException.class})
044    public interface MBBanLocalService extends BaseLocalService,
045            PersistedModelLocalService {
046            /*
047             * NOTE FOR DEVELOPERS:
048             *
049             * Never modify or reference this interface directly. Always use {@link MBBanLocalServiceUtil} to access the message boards ban local service. Add custom service methods to {@link com.liferay.portlet.messageboards.service.impl.MBBanLocalServiceImpl} and rerun ServiceBuilder to automatically copy the method declarations to this interface.
050             */
051            public com.liferay.portlet.messageboards.model.MBBan addBan(long userId,
052                    long banUserId, com.liferay.portal.service.ServiceContext serviceContext)
053                    throws com.liferay.portal.kernel.exception.PortalException;
054    
055            /**
056            * Adds the message boards ban to the database. Also notifies the appropriate model listeners.
057            *
058            * @param mbBan the message boards ban
059            * @return the message boards ban that was added
060            */
061            @com.liferay.portal.kernel.search.Indexable(type = IndexableType.REINDEX)
062            public com.liferay.portlet.messageboards.model.MBBan addMBBan(
063                    com.liferay.portlet.messageboards.model.MBBan mbBan);
064    
065            @com.liferay.portal.kernel.transaction.Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
066            public void checkBan(long groupId, long banUserId)
067                    throws com.liferay.portal.kernel.exception.PortalException;
068    
069            /**
070            * Creates a new message boards ban with the primary key. Does not add the message boards ban to the database.
071            *
072            * @param banId the primary key for the new message boards ban
073            * @return the new message boards ban
074            */
075            public com.liferay.portlet.messageboards.model.MBBan createMBBan(long banId);
076    
077            @com.liferay.portal.kernel.systemevent.SystemEvent(type = SystemEventConstants.TYPE_DELETE)
078            public void deleteBan(com.liferay.portlet.messageboards.model.MBBan ban);
079    
080            public void deleteBan(long banId)
081                    throws com.liferay.portal.kernel.exception.PortalException;
082    
083            public void deleteBan(long banUserId,
084                    com.liferay.portal.service.ServiceContext serviceContext);
085    
086            public void deleteBansByBanUserId(long banUserId);
087    
088            public void deleteBansByGroupId(long groupId);
089    
090            /**
091            * Deletes the message boards ban with the primary key from the database. Also notifies the appropriate model listeners.
092            *
093            * @param banId the primary key of the message boards ban
094            * @return the message boards ban that was removed
095            * @throws PortalException if a message boards ban with the primary key could not be found
096            */
097            @com.liferay.portal.kernel.search.Indexable(type = IndexableType.DELETE)
098            public com.liferay.portlet.messageboards.model.MBBan deleteMBBan(long banId)
099                    throws com.liferay.portal.kernel.exception.PortalException;
100    
101            /**
102            * Deletes the message boards ban from the database. Also notifies the appropriate model listeners.
103            *
104            * @param mbBan the message boards ban
105            * @return the message boards ban that was removed
106            */
107            @com.liferay.portal.kernel.search.Indexable(type = IndexableType.DELETE)
108            public com.liferay.portlet.messageboards.model.MBBan deleteMBBan(
109                    com.liferay.portlet.messageboards.model.MBBan mbBan);
110    
111            /**
112            * @throws PortalException
113            */
114            @Override
115            public com.liferay.portal.model.PersistedModel deletePersistedModel(
116                    com.liferay.portal.model.PersistedModel persistedModel)
117                    throws com.liferay.portal.kernel.exception.PortalException;
118    
119            public com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery();
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 <T> java.util.List<T> dynamicQuery(
128                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery);
129    
130            /**
131            * Performs a dynamic query on the database and returns a range of the matching rows.
132            *
133            * <p>
134            * 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.MBBanModelImpl}. 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.
135            * </p>
136            *
137            * @param dynamicQuery the dynamic query
138            * @param start the lower bound of the range of model instances
139            * @param end the upper bound of the range of model instances (not inclusive)
140            * @return the range of matching rows
141            */
142            public <T> java.util.List<T> dynamicQuery(
143                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
144                    int end);
145    
146            /**
147            * Performs a dynamic query on the database and returns an ordered range of the matching rows.
148            *
149            * <p>
150            * 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.MBBanModelImpl}. 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.
151            * </p>
152            *
153            * @param dynamicQuery the dynamic query
154            * @param start the lower bound of the range of model instances
155            * @param end the upper bound of the range of model instances (not inclusive)
156            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
157            * @return the ordered range of matching rows
158            */
159            public <T> java.util.List<T> dynamicQuery(
160                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
161                    int end,
162                    com.liferay.portal.kernel.util.OrderByComparator<T> orderByComparator);
163    
164            /**
165            * Returns the number of rows matching the dynamic query.
166            *
167            * @param dynamicQuery the dynamic query
168            * @return the number of rows matching the dynamic query
169            */
170            public long dynamicQueryCount(
171                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery);
172    
173            /**
174            * Returns the number of rows matching the dynamic query.
175            *
176            * @param dynamicQuery the dynamic query
177            * @param projection the projection to apply to the query
178            * @return the number of rows matching the dynamic query
179            */
180            public long dynamicQueryCount(
181                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery,
182                    com.liferay.portal.kernel.dao.orm.Projection projection);
183    
184            public void expireBans();
185    
186            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
187            public com.liferay.portlet.messageboards.model.MBBan fetchMBBan(long banId);
188    
189            /**
190            * Returns the message boards ban matching the UUID and group.
191            *
192            * @param uuid the message boards ban's UUID
193            * @param groupId the primary key of the group
194            * @return the matching message boards ban, or <code>null</code> if a matching message boards ban could not be found
195            */
196            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
197            public com.liferay.portlet.messageboards.model.MBBan fetchMBBanByUuidAndGroupId(
198                    java.lang.String uuid, long groupId);
199    
200            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
201            public com.liferay.portal.kernel.dao.orm.ActionableDynamicQuery getActionableDynamicQuery();
202    
203            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
204            public java.util.List<com.liferay.portlet.messageboards.model.MBBan> getBans(
205                    long groupId, int start, int end);
206    
207            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
208            public int getBansCount(long groupId);
209    
210            /**
211            * Returns the Spring bean ID for this bean.
212            *
213            * @return the Spring bean ID for this bean
214            */
215            public java.lang.String getBeanIdentifier();
216    
217            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
218            public com.liferay.portal.kernel.dao.orm.ExportActionableDynamicQuery getExportActionableDynamicQuery(
219                    com.liferay.portal.kernel.lar.PortletDataContext portletDataContext);
220    
221            /**
222            * Returns the message boards ban with the primary key.
223            *
224            * @param banId the primary key of the message boards ban
225            * @return the message boards ban
226            * @throws PortalException if a message boards ban with the primary key could not be found
227            */
228            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
229            public com.liferay.portlet.messageboards.model.MBBan getMBBan(long banId)
230                    throws com.liferay.portal.kernel.exception.PortalException;
231    
232            /**
233            * Returns the message boards ban matching the UUID and group.
234            *
235            * @param uuid the message boards ban's UUID
236            * @param groupId the primary key of the group
237            * @return the matching message boards ban
238            * @throws PortalException if a matching message boards ban could not be found
239            */
240            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
241            public com.liferay.portlet.messageboards.model.MBBan getMBBanByUuidAndGroupId(
242                    java.lang.String uuid, long groupId)
243                    throws com.liferay.portal.kernel.exception.PortalException;
244    
245            /**
246            * Returns a range of all the message boards bans.
247            *
248            * <p>
249            * 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.MBBanModelImpl}. 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.
250            * </p>
251            *
252            * @param start the lower bound of the range of message boards bans
253            * @param end the upper bound of the range of message boards bans (not inclusive)
254            * @return the range of message boards bans
255            */
256            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
257            public java.util.List<com.liferay.portlet.messageboards.model.MBBan> getMBBans(
258                    int start, int end);
259    
260            /**
261            * Returns all the message boards bans matching the UUID and company.
262            *
263            * @param uuid the UUID of the message boards bans
264            * @param companyId the primary key of the company
265            * @return the matching message boards bans, or an empty list if no matches were found
266            */
267            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
268            public java.util.List<com.liferay.portlet.messageboards.model.MBBan> getMBBansByUuidAndCompanyId(
269                    java.lang.String uuid, long companyId);
270    
271            /**
272            * Returns a range of message boards bans matching the UUID and company.
273            *
274            * @param uuid the UUID of the message boards bans
275            * @param companyId the primary key of the company
276            * @param start the lower bound of the range of message boards bans
277            * @param end the upper bound of the range of message boards bans (not inclusive)
278            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
279            * @return the range of matching message boards bans, or an empty list if no matches were found
280            */
281            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
282            public java.util.List<com.liferay.portlet.messageboards.model.MBBan> getMBBansByUuidAndCompanyId(
283                    java.lang.String uuid, long companyId, int start, int end,
284                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.messageboards.model.MBBan> orderByComparator);
285    
286            /**
287            * Returns the number of message boards bans.
288            *
289            * @return the number of message boards bans
290            */
291            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
292            public int getMBBansCount();
293    
294            @Override
295            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
296            public com.liferay.portal.model.PersistedModel getPersistedModel(
297                    java.io.Serializable primaryKeyObj)
298                    throws com.liferay.portal.kernel.exception.PortalException;
299    
300            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
301            public boolean hasBan(long groupId, long banUserId);
302    
303            /**
304            * Sets the Spring bean ID for this bean.
305            *
306            * @param beanIdentifier the Spring bean ID for this bean
307            */
308            public void setBeanIdentifier(java.lang.String beanIdentifier);
309    
310            /**
311            * Updates the message boards ban in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.
312            *
313            * @param mbBan the message boards ban
314            * @return the message boards ban that was updated
315            */
316            @com.liferay.portal.kernel.search.Indexable(type = IndexableType.REINDEX)
317            public com.liferay.portlet.messageboards.model.MBBan updateMBBan(
318                    com.liferay.portlet.messageboards.model.MBBan mbBan);
319    }