001 /** 002 * Copyright (c) 2000-2013 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 052 /** 053 * Adds the message boards ban to the database. Also notifies the appropriate model listeners. 054 * 055 * @param mbBan the message boards ban 056 * @return the message boards ban that was added 057 * @throws SystemException if a system exception occurred 058 */ 059 @com.liferay.portal.kernel.search.Indexable(type = IndexableType.REINDEX) 060 public com.liferay.portlet.messageboards.model.MBBan addMBBan( 061 com.liferay.portlet.messageboards.model.MBBan mbBan) 062 throws com.liferay.portal.kernel.exception.SystemException; 063 064 /** 065 * Creates a new message boards ban with the primary key. Does not add the message boards ban to the database. 066 * 067 * @param banId the primary key for the new message boards ban 068 * @return the new message boards ban 069 */ 070 public com.liferay.portlet.messageboards.model.MBBan createMBBan(long banId); 071 072 /** 073 * Deletes the message boards ban with the primary key from the database. Also notifies the appropriate model listeners. 074 * 075 * @param banId the primary key of the message boards ban 076 * @return the message boards ban that was removed 077 * @throws PortalException if a message boards ban with the primary key could not be found 078 * @throws SystemException if a system exception occurred 079 */ 080 @com.liferay.portal.kernel.search.Indexable(type = IndexableType.DELETE) 081 public com.liferay.portlet.messageboards.model.MBBan deleteMBBan(long banId) 082 throws com.liferay.portal.kernel.exception.PortalException, 083 com.liferay.portal.kernel.exception.SystemException; 084 085 /** 086 * Deletes the message boards ban from the database. Also notifies the appropriate model listeners. 087 * 088 * @param mbBan the message boards ban 089 * @return the message boards ban that was removed 090 * @throws SystemException if a system exception occurred 091 */ 092 @com.liferay.portal.kernel.search.Indexable(type = IndexableType.DELETE) 093 public com.liferay.portlet.messageboards.model.MBBan deleteMBBan( 094 com.liferay.portlet.messageboards.model.MBBan mbBan) 095 throws com.liferay.portal.kernel.exception.SystemException; 096 097 public com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery(); 098 099 /** 100 * Performs a dynamic query on the database and returns the matching rows. 101 * 102 * @param dynamicQuery the dynamic query 103 * @return the matching rows 104 * @throws SystemException if a system exception occurred 105 */ 106 @SuppressWarnings("rawtypes") 107 public java.util.List dynamicQuery( 108 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) 109 throws com.liferay.portal.kernel.exception.SystemException; 110 111 /** 112 * Performs a dynamic query on the database and returns a range of the matching rows. 113 * 114 * <p> 115 * 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. 116 * </p> 117 * 118 * @param dynamicQuery the dynamic query 119 * @param start the lower bound of the range of model instances 120 * @param end the upper bound of the range of model instances (not inclusive) 121 * @return the range of matching rows 122 * @throws SystemException if a system exception occurred 123 */ 124 @SuppressWarnings("rawtypes") 125 public java.util.List dynamicQuery( 126 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start, 127 int end) throws com.liferay.portal.kernel.exception.SystemException; 128 129 /** 130 * Performs a dynamic query on the database and returns an ordered 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 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 140 * @return the ordered range of matching rows 141 * @throws SystemException if a system exception occurred 142 */ 143 @SuppressWarnings("rawtypes") 144 public java.util.List dynamicQuery( 145 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start, 146 int end, 147 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 148 throws com.liferay.portal.kernel.exception.SystemException; 149 150 /** 151 * Returns the number of rows that match the dynamic query. 152 * 153 * @param dynamicQuery the dynamic query 154 * @return the number of rows that match the dynamic query 155 * @throws SystemException if a system exception occurred 156 */ 157 public long dynamicQueryCount( 158 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) 159 throws com.liferay.portal.kernel.exception.SystemException; 160 161 /** 162 * Returns the number of rows that match the dynamic query. 163 * 164 * @param dynamicQuery the dynamic query 165 * @param projection the projection to apply to the query 166 * @return the number of rows that match the dynamic query 167 * @throws SystemException if a system exception occurred 168 */ 169 public long dynamicQueryCount( 170 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, 171 com.liferay.portal.kernel.dao.orm.Projection projection) 172 throws com.liferay.portal.kernel.exception.SystemException; 173 174 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 175 public com.liferay.portlet.messageboards.model.MBBan fetchMBBan(long banId) 176 throws com.liferay.portal.kernel.exception.SystemException; 177 178 /** 179 * Returns the message boards ban with the matching UUID and company. 180 * 181 * @param uuid the message boards ban's UUID 182 * @param companyId the primary key of the company 183 * @return the matching message boards ban, or <code>null</code> if a matching message boards ban could not be found 184 * @throws SystemException if a system exception occurred 185 */ 186 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 187 public com.liferay.portlet.messageboards.model.MBBan fetchMBBanByUuidAndCompanyId( 188 java.lang.String uuid, long companyId) 189 throws com.liferay.portal.kernel.exception.SystemException; 190 191 /** 192 * Returns the message boards ban matching the UUID and group. 193 * 194 * @param uuid the message boards ban's UUID 195 * @param groupId the primary key of the group 196 * @return the matching message boards ban, or <code>null</code> if a matching message boards ban could not be found 197 * @throws SystemException if a system exception occurred 198 */ 199 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 200 public com.liferay.portlet.messageboards.model.MBBan fetchMBBanByUuidAndGroupId( 201 java.lang.String uuid, long groupId) 202 throws com.liferay.portal.kernel.exception.SystemException; 203 204 /** 205 * Returns the message boards ban with the primary key. 206 * 207 * @param banId the primary key of the message boards ban 208 * @return the message boards ban 209 * @throws PortalException if a message boards ban with the primary key could not be found 210 * @throws SystemException if a system exception occurred 211 */ 212 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 213 public com.liferay.portlet.messageboards.model.MBBan getMBBan(long banId) 214 throws com.liferay.portal.kernel.exception.PortalException, 215 com.liferay.portal.kernel.exception.SystemException; 216 217 @Override 218 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 219 public com.liferay.portal.model.PersistedModel getPersistedModel( 220 java.io.Serializable primaryKeyObj) 221 throws com.liferay.portal.kernel.exception.PortalException, 222 com.liferay.portal.kernel.exception.SystemException; 223 224 /** 225 * Returns the message boards ban with the matching UUID and company. 226 * 227 * @param uuid the message boards ban's UUID 228 * @param companyId the primary key of the company 229 * @return the matching message boards ban 230 * @throws PortalException if a matching message boards ban could not be found 231 * @throws SystemException if a system exception occurred 232 */ 233 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 234 public com.liferay.portlet.messageboards.model.MBBan getMBBanByUuidAndCompanyId( 235 java.lang.String uuid, long companyId) 236 throws com.liferay.portal.kernel.exception.PortalException, 237 com.liferay.portal.kernel.exception.SystemException; 238 239 /** 240 * Returns the message boards ban matching the UUID and group. 241 * 242 * @param uuid the message boards ban's UUID 243 * @param groupId the primary key of the group 244 * @return the matching message boards ban 245 * @throws PortalException if a matching message boards ban could not be found 246 * @throws SystemException if a system exception occurred 247 */ 248 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 249 public com.liferay.portlet.messageboards.model.MBBan getMBBanByUuidAndGroupId( 250 java.lang.String uuid, long groupId) 251 throws com.liferay.portal.kernel.exception.PortalException, 252 com.liferay.portal.kernel.exception.SystemException; 253 254 /** 255 * Returns a range of all the message boards bans. 256 * 257 * <p> 258 * 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. 259 * </p> 260 * 261 * @param start the lower bound of the range of message boards bans 262 * @param end the upper bound of the range of message boards bans (not inclusive) 263 * @return the range of message boards bans 264 * @throws SystemException if a system exception occurred 265 */ 266 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 267 public java.util.List<com.liferay.portlet.messageboards.model.MBBan> getMBBans( 268 int start, int end) 269 throws com.liferay.portal.kernel.exception.SystemException; 270 271 /** 272 * Returns the number of message boards bans. 273 * 274 * @return the number of message boards bans 275 * @throws SystemException if a system exception occurred 276 */ 277 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 278 public int getMBBansCount() 279 throws com.liferay.portal.kernel.exception.SystemException; 280 281 /** 282 * Updates the message boards ban in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners. 283 * 284 * @param mbBan the message boards ban 285 * @return the message boards ban that was updated 286 * @throws SystemException if a system exception occurred 287 */ 288 @com.liferay.portal.kernel.search.Indexable(type = IndexableType.REINDEX) 289 public com.liferay.portlet.messageboards.model.MBBan updateMBBan( 290 com.liferay.portlet.messageboards.model.MBBan mbBan) 291 throws com.liferay.portal.kernel.exception.SystemException; 292 293 /** 294 * Returns the Spring bean ID for this bean. 295 * 296 * @return the Spring bean ID for this bean 297 */ 298 public java.lang.String getBeanIdentifier(); 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 public com.liferay.portlet.messageboards.model.MBBan addBan(long userId, 308 long banUserId, com.liferay.portal.service.ServiceContext serviceContext) 309 throws com.liferay.portal.kernel.exception.PortalException, 310 com.liferay.portal.kernel.exception.SystemException; 311 312 @com.liferay.portal.kernel.transaction.Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 313 public void checkBan(long groupId, long banUserId) 314 throws com.liferay.portal.kernel.exception.PortalException, 315 com.liferay.portal.kernel.exception.SystemException; 316 317 public void deleteBan(long banId) 318 throws com.liferay.portal.kernel.exception.PortalException, 319 com.liferay.portal.kernel.exception.SystemException; 320 321 public void deleteBan(long banUserId, 322 com.liferay.portal.service.ServiceContext serviceContext) 323 throws com.liferay.portal.kernel.exception.SystemException; 324 325 @com.liferay.portal.kernel.systemevent.SystemEvent(type = SystemEventConstants.TYPE_DELETE) 326 public void deleteBan(com.liferay.portlet.messageboards.model.MBBan ban) 327 throws com.liferay.portal.kernel.exception.SystemException; 328 329 public void deleteBansByBanUserId(long banUserId) 330 throws com.liferay.portal.kernel.exception.SystemException; 331 332 public void deleteBansByGroupId(long groupId) 333 throws com.liferay.portal.kernel.exception.SystemException; 334 335 public void expireBans() 336 throws com.liferay.portal.kernel.exception.SystemException; 337 338 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 339 public java.util.List<com.liferay.portlet.messageboards.model.MBBan> getBans( 340 long groupId, int start, int end) 341 throws com.liferay.portal.kernel.exception.SystemException; 342 343 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 344 public int getBansCount(long groupId) 345 throws com.liferay.portal.kernel.exception.SystemException; 346 347 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 348 public boolean hasBan(long groupId, long banUserId) 349 throws com.liferay.portal.kernel.exception.SystemException; 350 }