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            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
210            public com.liferay.portal.kernel.dao.orm.ExportActionableDynamicQuery getExportActionableDynamicQuery(
211                    com.liferay.portlet.exportimport.lar.PortletDataContext portletDataContext);
212    
213            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
214            public com.liferay.portal.kernel.dao.orm.IndexableActionableDynamicQuery getIndexableActionableDynamicQuery();
215    
216            /**
217            * Returns the message boards ban with the primary key.
218            *
219            * @param banId the primary key of the message boards ban
220            * @return the message boards ban
221            * @throws PortalException if a message boards ban with the primary key could not be found
222            */
223            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
224            public com.liferay.portlet.messageboards.model.MBBan getMBBan(long banId)
225                    throws PortalException;
226    
227            /**
228            * Returns the message boards ban matching the UUID and group.
229            *
230            * @param uuid the message boards ban's UUID
231            * @param groupId the primary key of the group
232            * @return the matching message boards ban
233            * @throws PortalException if a matching message boards ban could not be found
234            */
235            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
236            public com.liferay.portlet.messageboards.model.MBBan getMBBanByUuidAndGroupId(
237                    java.lang.String uuid, long groupId) throws PortalException;
238    
239            /**
240            * Returns a range of all the message boards bans.
241            *
242            * <p>
243            * 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.
244            * </p>
245            *
246            * @param start the lower bound of the range of message boards bans
247            * @param end the upper bound of the range of message boards bans (not inclusive)
248            * @return the range of message boards bans
249            */
250            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
251            public java.util.List<com.liferay.portlet.messageboards.model.MBBan> getMBBans(
252                    int start, int end);
253    
254            /**
255            * Returns all the message boards bans matching the UUID and company.
256            *
257            * @param uuid the UUID of the message boards bans
258            * @param companyId the primary key of the company
259            * @return the matching message boards bans, or an empty list if no matches were found
260            */
261            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
262            public java.util.List<com.liferay.portlet.messageboards.model.MBBan> getMBBansByUuidAndCompanyId(
263                    java.lang.String uuid, long companyId);
264    
265            /**
266            * Returns a range of message boards bans matching the UUID and company.
267            *
268            * @param uuid the UUID of the message boards bans
269            * @param companyId the primary key of the company
270            * @param start the lower bound of the range of message boards bans
271            * @param end the upper bound of the range of message boards bans (not inclusive)
272            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
273            * @return the range of matching message boards bans, or an empty list if no matches were found
274            */
275            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
276            public java.util.List<com.liferay.portlet.messageboards.model.MBBan> getMBBansByUuidAndCompanyId(
277                    java.lang.String uuid, long companyId, int start, int end,
278                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.messageboards.model.MBBan> orderByComparator);
279    
280            /**
281            * Returns the number of message boards bans.
282            *
283            * @return the number of message boards bans
284            */
285            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
286            public int getMBBansCount();
287    
288            /**
289            * Returns the OSGi service identifier.
290            *
291            * @return the OSGi service identifier
292            */
293            public java.lang.String getOSGiServiceIdentifier();
294    
295            @Override
296            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
297            public com.liferay.portal.model.PersistedModel getPersistedModel(
298                    java.io.Serializable primaryKeyObj) throws PortalException;
299    
300            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
301            public boolean hasBan(long groupId, long banUserId);
302    
303            /**
304            * Updates the message boards ban in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.
305            *
306            * @param mbBan the message boards ban
307            * @return the message boards ban that was updated
308            */
309            @com.liferay.portal.kernel.search.Indexable(type = IndexableType.REINDEX)
310            public com.liferay.portlet.messageboards.model.MBBan updateMBBan(
311                    com.liferay.portlet.messageboards.model.MBBan mbBan);
312    }