001    /**
002     * Copyright (c) 2000-2011 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.PersistedModelLocalService;
023    
024    /**
025     * The interface for the message boards ban local service.
026     *
027     * <p>
028     * This is a local service. Methods of this service will not have security checks based on the propagated JAAS credentials because this service can only be accessed from within the same VM.
029     * </p>
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 PersistedModelLocalService {
040            /*
041             * NOTE FOR DEVELOPERS:
042             *
043             * 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.
044             */
045    
046            /**
047            * Adds the message boards ban to the database. Also notifies the appropriate model listeners.
048            *
049            * @param mbBan the message boards ban
050            * @return the message boards ban that was added
051            * @throws SystemException if a system exception occurred
052            */
053            public com.liferay.portlet.messageboards.model.MBBan addMBBan(
054                    com.liferay.portlet.messageboards.model.MBBan mbBan)
055                    throws com.liferay.portal.kernel.exception.SystemException;
056    
057            /**
058            * Creates a new message boards ban with the primary key. Does not add the message boards ban to the database.
059            *
060            * @param banId the primary key for the new message boards ban
061            * @return the new message boards ban
062            */
063            public com.liferay.portlet.messageboards.model.MBBan createMBBan(long banId);
064    
065            /**
066            * Deletes the message boards ban with the primary key from the database. Also notifies the appropriate model listeners.
067            *
068            * @param banId the primary key of the message boards ban
069            * @throws PortalException if a message boards ban with the primary key could not be found
070            * @throws SystemException if a system exception occurred
071            */
072            public void deleteMBBan(long banId)
073                    throws com.liferay.portal.kernel.exception.PortalException,
074                            com.liferay.portal.kernel.exception.SystemException;
075    
076            /**
077            * Deletes the message boards ban from the database. Also notifies the appropriate model listeners.
078            *
079            * @param mbBan the message boards ban
080            * @throws SystemException if a system exception occurred
081            */
082            public void deleteMBBan(com.liferay.portlet.messageboards.model.MBBan mbBan)
083                    throws com.liferay.portal.kernel.exception.SystemException;
084    
085            /**
086            * Performs a dynamic query on the database and returns the matching rows.
087            *
088            * @param dynamicQuery the dynamic query
089            * @return the matching rows
090            * @throws SystemException if a system exception occurred
091            */
092            @SuppressWarnings("rawtypes")
093            public java.util.List dynamicQuery(
094                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
095                    throws com.liferay.portal.kernel.exception.SystemException;
096    
097            /**
098            * Performs a dynamic query on the database and returns a range of the matching rows.
099            *
100            * <p>
101            * 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.
102            * </p>
103            *
104            * @param dynamicQuery the dynamic query
105            * @param start the lower bound of the range of model instances
106            * @param end the upper bound of the range of model instances (not inclusive)
107            * @return the range of matching rows
108            * @throws SystemException if a system exception occurred
109            */
110            @SuppressWarnings("rawtypes")
111            public java.util.List dynamicQuery(
112                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
113                    int end) throws com.liferay.portal.kernel.exception.SystemException;
114    
115            /**
116            * Performs a dynamic query on the database and returns an ordered range of the matching rows.
117            *
118            * <p>
119            * 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.
120            * </p>
121            *
122            * @param dynamicQuery the dynamic query
123            * @param start the lower bound of the range of model instances
124            * @param end the upper bound of the range of model instances (not inclusive)
125            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
126            * @return the ordered range of matching rows
127            * @throws SystemException if a system exception occurred
128            */
129            @SuppressWarnings("rawtypes")
130            public java.util.List dynamicQuery(
131                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
132                    int end,
133                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
134                    throws com.liferay.portal.kernel.exception.SystemException;
135    
136            /**
137            * Returns the number of rows that match the dynamic query.
138            *
139            * @param dynamicQuery the dynamic query
140            * @return the number of rows that match the dynamic query
141            * @throws SystemException if a system exception occurred
142            */
143            public long dynamicQueryCount(
144                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
145                    throws com.liferay.portal.kernel.exception.SystemException;
146    
147            /**
148            * Returns the message boards ban with the primary key.
149            *
150            * @param banId the primary key of the message boards ban
151            * @return the message boards ban
152            * @throws PortalException if a message boards ban with the primary key could not be found
153            * @throws SystemException if a system exception occurred
154            */
155            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
156            public com.liferay.portlet.messageboards.model.MBBan getMBBan(long banId)
157                    throws com.liferay.portal.kernel.exception.PortalException,
158                            com.liferay.portal.kernel.exception.SystemException;
159    
160            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
161            public com.liferay.portal.model.PersistedModel getPersistedModel(
162                    java.io.Serializable primaryKeyObj)
163                    throws com.liferay.portal.kernel.exception.PortalException,
164                            com.liferay.portal.kernel.exception.SystemException;
165    
166            /**
167            * Returns a range of all the message boards bans.
168            *
169            * <p>
170            * 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.
171            * </p>
172            *
173            * @param start the lower bound of the range of message boards bans
174            * @param end the upper bound of the range of message boards bans (not inclusive)
175            * @return the range of message boards bans
176            * @throws SystemException if a system exception occurred
177            */
178            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
179            public java.util.List<com.liferay.portlet.messageboards.model.MBBan> getMBBans(
180                    int start, int end)
181                    throws com.liferay.portal.kernel.exception.SystemException;
182    
183            /**
184            * Returns the number of message boards bans.
185            *
186            * @return the number of message boards bans
187            * @throws SystemException if a system exception occurred
188            */
189            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
190            public int getMBBansCount()
191                    throws com.liferay.portal.kernel.exception.SystemException;
192    
193            /**
194            * Updates the message boards ban in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.
195            *
196            * @param mbBan the message boards ban
197            * @return the message boards ban that was updated
198            * @throws SystemException if a system exception occurred
199            */
200            public com.liferay.portlet.messageboards.model.MBBan updateMBBan(
201                    com.liferay.portlet.messageboards.model.MBBan mbBan)
202                    throws com.liferay.portal.kernel.exception.SystemException;
203    
204            /**
205            * Updates the message boards ban in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.
206            *
207            * @param mbBan the message boards ban
208            * @param merge whether to merge the message boards ban with the current session. See {@link com.liferay.portal.service.persistence.BatchSession#update(com.liferay.portal.kernel.dao.orm.Session, com.liferay.portal.model.BaseModel, boolean)} for an explanation.
209            * @return the message boards ban that was updated
210            * @throws SystemException if a system exception occurred
211            */
212            public com.liferay.portlet.messageboards.model.MBBan updateMBBan(
213                    com.liferay.portlet.messageboards.model.MBBan mbBan, boolean merge)
214                    throws com.liferay.portal.kernel.exception.SystemException;
215    
216            /**
217            * Returns the Spring bean ID for this bean.
218            *
219            * @return the Spring bean ID for this bean
220            */
221            public java.lang.String getBeanIdentifier();
222    
223            /**
224            * Sets the Spring bean ID for this bean.
225            *
226            * @param beanIdentifier the Spring bean ID for this bean
227            */
228            public void setBeanIdentifier(java.lang.String beanIdentifier);
229    
230            public com.liferay.portlet.messageboards.model.MBBan addBan(long userId,
231                    long banUserId, com.liferay.portal.service.ServiceContext serviceContext)
232                    throws com.liferay.portal.kernel.exception.PortalException,
233                            com.liferay.portal.kernel.exception.SystemException;
234    
235            public void checkBan(long groupId, long banUserId)
236                    throws com.liferay.portal.kernel.exception.PortalException,
237                            com.liferay.portal.kernel.exception.SystemException;
238    
239            public void deleteBan(long banId)
240                    throws com.liferay.portal.kernel.exception.PortalException,
241                            com.liferay.portal.kernel.exception.SystemException;
242    
243            public void deleteBan(long banUserId,
244                    com.liferay.portal.service.ServiceContext serviceContext)
245                    throws com.liferay.portal.kernel.exception.SystemException;
246    
247            public void deleteBan(com.liferay.portlet.messageboards.model.MBBan ban)
248                    throws com.liferay.portal.kernel.exception.SystemException;
249    
250            public void deleteBansByBanUserId(long banUserId)
251                    throws com.liferay.portal.kernel.exception.SystemException;
252    
253            public void deleteBansByGroupId(long groupId)
254                    throws com.liferay.portal.kernel.exception.SystemException;
255    
256            public void expireBans()
257                    throws com.liferay.portal.kernel.exception.SystemException;
258    
259            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
260            public java.util.List<com.liferay.portlet.messageboards.model.MBBan> getBans(
261                    long groupId, int start, int end)
262                    throws com.liferay.portal.kernel.exception.SystemException;
263    
264            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
265            public int getBansCount(long groupId)
266                    throws com.liferay.portal.kernel.exception.SystemException;
267    
268            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
269            public boolean hasBan(long groupId, long banUserId)
270                    throws com.liferay.portal.kernel.exception.SystemException;
271    }