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