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