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