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 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            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
066            public void checkBan(long groupId, long banUserId)
067                    throws 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) throws PortalException;
081    
082            public void deleteBan(long banUserId,
083                    com.liferay.portal.service.ServiceContext serviceContext);
084    
085            public void deleteBansByBanUserId(long banUserId);
086    
087            public void deleteBansByGroupId(long groupId);
088    
089            /**
090            * Deletes the message boards ban with the primary key from the database. Also notifies the appropriate model listeners.
091            *
092            * @param banId the primary key of the message boards ban
093            * @return the message boards ban that was removed
094            * @throws PortalException if a message boards ban with the primary key could not be found
095            */
096            @com.liferay.portal.kernel.search.Indexable(type = IndexableType.DELETE)
097            public com.liferay.portlet.messageboards.model.MBBan deleteMBBan(long banId)
098                    throws PortalException;
099    
100            /**
101            * Deletes the message boards ban from the database. Also notifies the appropriate model listeners.
102            *
103            * @param mbBan the message boards ban
104            * @return the message boards ban that was removed
105            */
106            @com.liferay.portal.kernel.search.Indexable(type = IndexableType.DELETE)
107            public com.liferay.portlet.messageboards.model.MBBan deleteMBBan(
108                    com.liferay.portlet.messageboards.model.MBBan mbBan);
109    
110            /**
111            * @throws PortalException
112            */
113            @Override
114            public com.liferay.portal.model.PersistedModel deletePersistedModel(
115                    com.liferay.portal.model.PersistedModel persistedModel)
116                    throws PortalException;
117    
118            public com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery();
119    
120            /**
121            * Performs a dynamic query on the database and returns the matching rows.
122            *
123            * @param dynamicQuery the dynamic query
124            * @return the matching rows
125            */
126            public <T> java.util.List<T> dynamicQuery(
127                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery);
128    
129            /**
130            * Performs a dynamic query on the database and returns a range of the matching rows.
131            *
132            * <p>
133            * 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.
134            * </p>
135            *
136            * @param dynamicQuery the dynamic query
137            * @param start the lower bound of the range of model instances
138            * @param end the upper bound of the range of model instances (not inclusive)
139            * @return the range of matching rows
140            */
141            public <T> java.util.List<T> dynamicQuery(
142                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
143                    int end);
144    
145            /**
146            * Performs a dynamic query on the database and returns an ordered range of the matching rows.
147            *
148            * <p>
149            * 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.
150            * </p>
151            *
152            * @param dynamicQuery the dynamic query
153            * @param start the lower bound of the range of model instances
154            * @param end the upper bound of the range of model instances (not inclusive)
155            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
156            * @return the ordered range of matching rows
157            */
158            public <T> java.util.List<T> dynamicQuery(
159                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
160                    int end,
161                    com.liferay.portal.kernel.util.OrderByComparator<T> orderByComparator);
162    
163            /**
164            * Returns the number of rows matching the dynamic query.
165            *
166            * @param dynamicQuery the dynamic query
167            * @return the number of rows matching the dynamic query
168            */
169            public long dynamicQueryCount(
170                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery);
171    
172            /**
173            * Returns the number of rows matching the dynamic query.
174            *
175            * @param dynamicQuery the dynamic query
176            * @param projection the projection to apply to the query
177            * @return the number of rows matching the dynamic query
178            */
179            public long dynamicQueryCount(
180                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery,
181                    com.liferay.portal.kernel.dao.orm.Projection projection);
182    
183            public void expireBans();
184    
185            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
186            public com.liferay.portlet.messageboards.model.MBBan fetchMBBan(long banId);
187    
188            /**
189            * Returns the message boards ban matching the UUID and group.
190            *
191            * @param uuid the message boards ban's UUID
192            * @param groupId the primary key of the group
193            * @return the matching message boards ban, or <code>null</code> if a matching message boards ban could not be found
194            */
195            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
196            public com.liferay.portlet.messageboards.model.MBBan fetchMBBanByUuidAndGroupId(
197                    java.lang.String uuid, long groupId);
198    
199            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
200            public com.liferay.portal.kernel.dao.orm.ActionableDynamicQuery getActionableDynamicQuery();
201    
202            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
203            public java.util.List<com.liferay.portlet.messageboards.model.MBBan> getBans(
204                    long groupId, int start, int end);
205    
206            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
207            public int getBansCount(long groupId);
208    
209            /**
210            * Returns the Spring bean ID for this bean.
211            *
212            * @return the Spring bean ID for this bean
213            */
214            public java.lang.String getBeanIdentifier();
215    
216            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
217            public com.liferay.portal.kernel.dao.orm.ExportActionableDynamicQuery getExportActionableDynamicQuery(
218                    com.liferay.portlet.exportimport.lar.PortletDataContext portletDataContext);
219    
220            /**
221            * Returns the message boards ban with the primary key.
222            *
223            * @param banId the primary key of the message boards ban
224            * @return the message boards ban
225            * @throws PortalException if a message boards ban with the primary key could not be found
226            */
227            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
228            public com.liferay.portlet.messageboards.model.MBBan getMBBan(long banId)
229                    throws PortalException;
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            */
239            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
240            public com.liferay.portlet.messageboards.model.MBBan getMBBanByUuidAndGroupId(
241                    java.lang.String uuid, long groupId) throws PortalException;
242    
243            /**
244            * Returns a range of all the message boards bans.
245            *
246            * <p>
247            * 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.
248            * </p>
249            *
250            * @param start the lower bound of the range of message boards bans
251            * @param end the upper bound of the range of message boards bans (not inclusive)
252            * @return the range of message boards bans
253            */
254            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
255            public java.util.List<com.liferay.portlet.messageboards.model.MBBan> getMBBans(
256                    int start, int end);
257    
258            /**
259            * Returns all the message boards bans matching the UUID and company.
260            *
261            * @param uuid the UUID of the message boards bans
262            * @param companyId the primary key of the company
263            * @return the matching message boards bans, or an empty list if no matches were found
264            */
265            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
266            public java.util.List<com.liferay.portlet.messageboards.model.MBBan> getMBBansByUuidAndCompanyId(
267                    java.lang.String uuid, long companyId);
268    
269            /**
270            * Returns a range of message boards bans matching the UUID and company.
271            *
272            * @param uuid the UUID of the message boards bans
273            * @param companyId the primary key of the company
274            * @param start the lower bound of the range of message boards bans
275            * @param end the upper bound of the range of message boards bans (not inclusive)
276            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
277            * @return the range of matching message boards bans, or an empty list if no matches were found
278            */
279            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
280            public java.util.List<com.liferay.portlet.messageboards.model.MBBan> getMBBansByUuidAndCompanyId(
281                    java.lang.String uuid, long companyId, int start, int end,
282                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.messageboards.model.MBBan> orderByComparator);
283    
284            /**
285            * Returns the number of message boards bans.
286            *
287            * @return the number of message boards bans
288            */
289            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
290            public int getMBBansCount();
291    
292            @Override
293            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
294            public com.liferay.portal.model.PersistedModel getPersistedModel(
295                    java.io.Serializable primaryKeyObj) throws PortalException;
296    
297            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
298            public boolean hasBan(long groupId, long banUserId);
299    
300            /**
301            * Sets the Spring bean ID for this bean.
302            *
303            * @param beanIdentifier the Spring bean ID for this bean
304            */
305            public void setBeanIdentifier(java.lang.String beanIdentifier);
306    
307            /**
308            * Updates the message boards ban in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.
309            *
310            * @param mbBan the message boards ban
311            * @return the message boards ban that was updated
312            */
313            @com.liferay.portal.kernel.search.Indexable(type = IndexableType.REINDEX)
314            public com.liferay.portlet.messageboards.model.MBBan updateMBBan(
315                    com.liferay.portlet.messageboards.model.MBBan mbBan);
316    }