001    /**
002     * Copyright (c) 2000-2012 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            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
148            public com.liferay.portlet.messageboards.model.MBBan fetchMBBan(long banId)
149                    throws com.liferay.portal.kernel.exception.SystemException;
150    
151            /**
152            * Returns the message boards ban with the primary key.
153            *
154            * @param banId the primary key of the message boards ban
155            * @return the message boards ban
156            * @throws PortalException if a message boards ban with the primary key could not be found
157            * @throws SystemException if a system exception occurred
158            */
159            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
160            public com.liferay.portlet.messageboards.model.MBBan getMBBan(long banId)
161                    throws com.liferay.portal.kernel.exception.PortalException,
162                            com.liferay.portal.kernel.exception.SystemException;
163    
164            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
165            public com.liferay.portal.model.PersistedModel getPersistedModel(
166                    java.io.Serializable primaryKeyObj)
167                    throws com.liferay.portal.kernel.exception.PortalException,
168                            com.liferay.portal.kernel.exception.SystemException;
169    
170            /**
171            * Returns a range of all the message boards bans.
172            *
173            * <p>
174            * 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.
175            * </p>
176            *
177            * @param start the lower bound of the range of message boards bans
178            * @param end the upper bound of the range of message boards bans (not inclusive)
179            * @return the range of message boards bans
180            * @throws SystemException if a system exception occurred
181            */
182            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
183            public java.util.List<com.liferay.portlet.messageboards.model.MBBan> getMBBans(
184                    int start, int end)
185                    throws com.liferay.portal.kernel.exception.SystemException;
186    
187            /**
188            * Returns the number of message boards bans.
189            *
190            * @return the number of message boards bans
191            * @throws SystemException if a system exception occurred
192            */
193            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
194            public int getMBBansCount()
195                    throws com.liferay.portal.kernel.exception.SystemException;
196    
197            /**
198            * Updates the message boards ban in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.
199            *
200            * @param mbBan the message boards ban
201            * @return the message boards ban that was updated
202            * @throws SystemException if a system exception occurred
203            */
204            public com.liferay.portlet.messageboards.model.MBBan updateMBBan(
205                    com.liferay.portlet.messageboards.model.MBBan mbBan)
206                    throws com.liferay.portal.kernel.exception.SystemException;
207    
208            /**
209            * Updates the message boards ban in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.
210            *
211            * @param mbBan the message boards ban
212            * @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.
213            * @return the message boards ban that was updated
214            * @throws SystemException if a system exception occurred
215            */
216            public com.liferay.portlet.messageboards.model.MBBan updateMBBan(
217                    com.liferay.portlet.messageboards.model.MBBan mbBan, boolean merge)
218                    throws com.liferay.portal.kernel.exception.SystemException;
219    
220            /**
221            * Returns the Spring bean ID for this bean.
222            *
223            * @return the Spring bean ID for this bean
224            */
225            public java.lang.String getBeanIdentifier();
226    
227            /**
228            * Sets the Spring bean ID for this bean.
229            *
230            * @param beanIdentifier the Spring bean ID for this bean
231            */
232            public void setBeanIdentifier(java.lang.String beanIdentifier);
233    
234            public com.liferay.portlet.messageboards.model.MBBan addBan(long userId,
235                    long banUserId, com.liferay.portal.service.ServiceContext serviceContext)
236                    throws com.liferay.portal.kernel.exception.PortalException,
237                            com.liferay.portal.kernel.exception.SystemException;
238    
239            public void checkBan(long groupId, long banUserId)
240                    throws com.liferay.portal.kernel.exception.PortalException,
241                            com.liferay.portal.kernel.exception.SystemException;
242    
243            public void deleteBan(long banId)
244                    throws com.liferay.portal.kernel.exception.PortalException,
245                            com.liferay.portal.kernel.exception.SystemException;
246    
247            public void deleteBan(long banUserId,
248                    com.liferay.portal.service.ServiceContext serviceContext)
249                    throws com.liferay.portal.kernel.exception.SystemException;
250    
251            public void deleteBan(com.liferay.portlet.messageboards.model.MBBan ban)
252                    throws com.liferay.portal.kernel.exception.SystemException;
253    
254            public void deleteBansByBanUserId(long banUserId)
255                    throws com.liferay.portal.kernel.exception.SystemException;
256    
257            public void deleteBansByGroupId(long groupId)
258                    throws com.liferay.portal.kernel.exception.SystemException;
259    
260            public void expireBans()
261                    throws com.liferay.portal.kernel.exception.SystemException;
262    
263            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
264            public java.util.List<com.liferay.portlet.messageboards.model.MBBan> getBans(
265                    long groupId, int start, int end)
266                    throws com.liferay.portal.kernel.exception.SystemException;
267    
268            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
269            public int getBansCount(long groupId)
270                    throws com.liferay.portal.kernel.exception.SystemException;
271    
272            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
273            public boolean hasBan(long groupId, long banUserId)
274                    throws com.liferay.portal.kernel.exception.SystemException;
275    }