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.bean.PortalBeanLocatorUtil; 020 import com.liferay.portal.kernel.util.ReferenceRegistry; 021 022 /** 023 * Provides the local service utility for MBBan. This utility wraps 024 * {@link com.liferay.portlet.messageboards.service.impl.MBBanLocalServiceImpl} and is the 025 * primary access point for service operations in application layer code running 026 * on the local server. Methods of this service will not have security checks 027 * based on the propagated JAAS credentials because this service can only be 028 * accessed from within the same VM. 029 * 030 * @author Brian Wing Shun Chan 031 * @see MBBanLocalService 032 * @see com.liferay.portlet.messageboards.service.base.MBBanLocalServiceBaseImpl 033 * @see com.liferay.portlet.messageboards.service.impl.MBBanLocalServiceImpl 034 * @generated 035 */ 036 @ProviderType 037 public class MBBanLocalServiceUtil { 038 /* 039 * NOTE FOR DEVELOPERS: 040 * 041 * Never modify this class directly. Add custom service methods to {@link com.liferay.portlet.messageboards.service.impl.MBBanLocalServiceImpl} and rerun ServiceBuilder to regenerate this class. 042 */ 043 public static com.liferay.portlet.messageboards.model.MBBan addBan( 044 long userId, long banUserId, 045 com.liferay.portal.service.ServiceContext serviceContext) 046 throws com.liferay.portal.kernel.exception.PortalException { 047 return getService().addBan(userId, banUserId, serviceContext); 048 } 049 050 /** 051 * Adds the message boards ban to the database. Also notifies the appropriate model listeners. 052 * 053 * @param mbBan the message boards ban 054 * @return the message boards ban that was added 055 */ 056 public static com.liferay.portlet.messageboards.model.MBBan addMBBan( 057 com.liferay.portlet.messageboards.model.MBBan mbBan) { 058 return getService().addMBBan(mbBan); 059 } 060 061 public static void checkBan(long groupId, long banUserId) 062 throws com.liferay.portal.kernel.exception.PortalException { 063 getService().checkBan(groupId, banUserId); 064 } 065 066 /** 067 * Creates a new message boards ban with the primary key. Does not add the message boards ban to the database. 068 * 069 * @param banId the primary key for the new message boards ban 070 * @return the new message boards ban 071 */ 072 public static com.liferay.portlet.messageboards.model.MBBan createMBBan( 073 long banId) { 074 return getService().createMBBan(banId); 075 } 076 077 public static void deleteBan( 078 com.liferay.portlet.messageboards.model.MBBan ban) { 079 getService().deleteBan(ban); 080 } 081 082 public static void deleteBan(long banId) 083 throws com.liferay.portal.kernel.exception.PortalException { 084 getService().deleteBan(banId); 085 } 086 087 public static void deleteBan(long banUserId, 088 com.liferay.portal.service.ServiceContext serviceContext) { 089 getService().deleteBan(banUserId, serviceContext); 090 } 091 092 public static void deleteBansByBanUserId(long banUserId) { 093 getService().deleteBansByBanUserId(banUserId); 094 } 095 096 public static void deleteBansByGroupId(long groupId) { 097 getService().deleteBansByGroupId(groupId); 098 } 099 100 /** 101 * Deletes the message boards ban with the primary key from the database. Also notifies the appropriate model listeners. 102 * 103 * @param banId the primary key of the message boards ban 104 * @return the message boards ban that was removed 105 * @throws PortalException if a message boards ban with the primary key could not be found 106 */ 107 public static com.liferay.portlet.messageboards.model.MBBan deleteMBBan( 108 long banId) throws com.liferay.portal.kernel.exception.PortalException { 109 return getService().deleteMBBan(banId); 110 } 111 112 /** 113 * Deletes the message boards ban from the database. Also notifies the appropriate model listeners. 114 * 115 * @param mbBan the message boards ban 116 * @return the message boards ban that was removed 117 */ 118 public static com.liferay.portlet.messageboards.model.MBBan deleteMBBan( 119 com.liferay.portlet.messageboards.model.MBBan mbBan) { 120 return getService().deleteMBBan(mbBan); 121 } 122 123 /** 124 * @throws PortalException 125 */ 126 public static com.liferay.portal.model.PersistedModel deletePersistedModel( 127 com.liferay.portal.model.PersistedModel persistedModel) 128 throws com.liferay.portal.kernel.exception.PortalException { 129 return getService().deletePersistedModel(persistedModel); 130 } 131 132 public static com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery() { 133 return getService().dynamicQuery(); 134 } 135 136 /** 137 * Performs a dynamic query on the database and returns the matching rows. 138 * 139 * @param dynamicQuery the dynamic query 140 * @return the matching rows 141 */ 142 public static <T> java.util.List<T> dynamicQuery( 143 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) { 144 return getService().dynamicQuery(dynamicQuery); 145 } 146 147 /** 148 * Performs a dynamic query on the database and returns a range of the matching rows. 149 * 150 * <p> 151 * 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. 152 * </p> 153 * 154 * @param dynamicQuery the dynamic query 155 * @param start the lower bound of the range of model instances 156 * @param end the upper bound of the range of model instances (not inclusive) 157 * @return the range of matching rows 158 */ 159 public static <T> java.util.List<T> dynamicQuery( 160 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start, 161 int end) { 162 return getService().dynamicQuery(dynamicQuery, start, end); 163 } 164 165 /** 166 * Performs a dynamic query on the database and returns an ordered range of the matching rows. 167 * 168 * <p> 169 * 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. 170 * </p> 171 * 172 * @param dynamicQuery the dynamic query 173 * @param start the lower bound of the range of model instances 174 * @param end the upper bound of the range of model instances (not inclusive) 175 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 176 * @return the ordered range of matching rows 177 */ 178 public static <T> java.util.List<T> dynamicQuery( 179 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start, 180 int end, 181 com.liferay.portal.kernel.util.OrderByComparator<T> orderByComparator) { 182 return getService() 183 .dynamicQuery(dynamicQuery, start, end, orderByComparator); 184 } 185 186 /** 187 * Returns the number of rows matching the dynamic query. 188 * 189 * @param dynamicQuery the dynamic query 190 * @return the number of rows matching the dynamic query 191 */ 192 public static long dynamicQueryCount( 193 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) { 194 return getService().dynamicQueryCount(dynamicQuery); 195 } 196 197 /** 198 * Returns the number of rows matching the dynamic query. 199 * 200 * @param dynamicQuery the dynamic query 201 * @param projection the projection to apply to the query 202 * @return the number of rows matching the dynamic query 203 */ 204 public static long dynamicQueryCount( 205 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, 206 com.liferay.portal.kernel.dao.orm.Projection projection) { 207 return getService().dynamicQueryCount(dynamicQuery, projection); 208 } 209 210 public static void expireBans() { 211 getService().expireBans(); 212 } 213 214 public static com.liferay.portlet.messageboards.model.MBBan fetchMBBan( 215 long banId) { 216 return getService().fetchMBBan(banId); 217 } 218 219 /** 220 * Returns the message boards ban matching the UUID and group. 221 * 222 * @param uuid the message boards ban's UUID 223 * @param groupId the primary key of the group 224 * @return the matching message boards ban, or <code>null</code> if a matching message boards ban could not be found 225 */ 226 public static com.liferay.portlet.messageboards.model.MBBan fetchMBBanByUuidAndGroupId( 227 java.lang.String uuid, long groupId) { 228 return getService().fetchMBBanByUuidAndGroupId(uuid, groupId); 229 } 230 231 public static com.liferay.portal.kernel.dao.orm.ActionableDynamicQuery getActionableDynamicQuery() { 232 return getService().getActionableDynamicQuery(); 233 } 234 235 public static java.util.List<com.liferay.portlet.messageboards.model.MBBan> getBans( 236 long groupId, int start, int end) { 237 return getService().getBans(groupId, start, end); 238 } 239 240 public static int getBansCount(long groupId) { 241 return getService().getBansCount(groupId); 242 } 243 244 /** 245 * Returns the Spring bean ID for this bean. 246 * 247 * @return the Spring bean ID for this bean 248 */ 249 public static java.lang.String getBeanIdentifier() { 250 return getService().getBeanIdentifier(); 251 } 252 253 public static com.liferay.portal.kernel.dao.orm.ExportActionableDynamicQuery getExportActionableDynamicQuery( 254 com.liferay.portlet.exportimport.lar.PortletDataContext portletDataContext) { 255 return getService().getExportActionableDynamicQuery(portletDataContext); 256 } 257 258 /** 259 * Returns the message boards ban with the primary key. 260 * 261 * @param banId the primary key of the message boards ban 262 * @return the message boards ban 263 * @throws PortalException if a message boards ban with the primary key could not be found 264 */ 265 public static com.liferay.portlet.messageboards.model.MBBan getMBBan( 266 long banId) throws com.liferay.portal.kernel.exception.PortalException { 267 return getService().getMBBan(banId); 268 } 269 270 /** 271 * Returns the message boards ban matching the UUID and group. 272 * 273 * @param uuid the message boards ban's UUID 274 * @param groupId the primary key of the group 275 * @return the matching message boards ban 276 * @throws PortalException if a matching message boards ban could not be found 277 */ 278 public static com.liferay.portlet.messageboards.model.MBBan getMBBanByUuidAndGroupId( 279 java.lang.String uuid, long groupId) 280 throws com.liferay.portal.kernel.exception.PortalException { 281 return getService().getMBBanByUuidAndGroupId(uuid, groupId); 282 } 283 284 /** 285 * Returns a range of all the message boards bans. 286 * 287 * <p> 288 * 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. 289 * </p> 290 * 291 * @param start the lower bound of the range of message boards bans 292 * @param end the upper bound of the range of message boards bans (not inclusive) 293 * @return the range of message boards bans 294 */ 295 public static java.util.List<com.liferay.portlet.messageboards.model.MBBan> getMBBans( 296 int start, int end) { 297 return getService().getMBBans(start, end); 298 } 299 300 /** 301 * Returns all the message boards bans matching the UUID and company. 302 * 303 * @param uuid the UUID of the message boards bans 304 * @param companyId the primary key of the company 305 * @return the matching message boards bans, or an empty list if no matches were found 306 */ 307 public static java.util.List<com.liferay.portlet.messageboards.model.MBBan> getMBBansByUuidAndCompanyId( 308 java.lang.String uuid, long companyId) { 309 return getService().getMBBansByUuidAndCompanyId(uuid, companyId); 310 } 311 312 /** 313 * Returns a range of message boards bans matching the UUID and company. 314 * 315 * @param uuid the UUID of the message boards bans 316 * @param companyId the primary key of the company 317 * @param start the lower bound of the range of message boards bans 318 * @param end the upper bound of the range of message boards bans (not inclusive) 319 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 320 * @return the range of matching message boards bans, or an empty list if no matches were found 321 */ 322 public static java.util.List<com.liferay.portlet.messageboards.model.MBBan> getMBBansByUuidAndCompanyId( 323 java.lang.String uuid, long companyId, int start, int end, 324 com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.messageboards.model.MBBan> orderByComparator) { 325 return getService() 326 .getMBBansByUuidAndCompanyId(uuid, companyId, start, end, 327 orderByComparator); 328 } 329 330 /** 331 * Returns the number of message boards bans. 332 * 333 * @return the number of message boards bans 334 */ 335 public static int getMBBansCount() { 336 return getService().getMBBansCount(); 337 } 338 339 public static com.liferay.portal.model.PersistedModel getPersistedModel( 340 java.io.Serializable primaryKeyObj) 341 throws com.liferay.portal.kernel.exception.PortalException { 342 return getService().getPersistedModel(primaryKeyObj); 343 } 344 345 public static boolean hasBan(long groupId, long banUserId) { 346 return getService().hasBan(groupId, banUserId); 347 } 348 349 /** 350 * Sets the Spring bean ID for this bean. 351 * 352 * @param beanIdentifier the Spring bean ID for this bean 353 */ 354 public static void setBeanIdentifier(java.lang.String beanIdentifier) { 355 getService().setBeanIdentifier(beanIdentifier); 356 } 357 358 /** 359 * Updates the message boards ban in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners. 360 * 361 * @param mbBan the message boards ban 362 * @return the message boards ban that was updated 363 */ 364 public static com.liferay.portlet.messageboards.model.MBBan updateMBBan( 365 com.liferay.portlet.messageboards.model.MBBan mbBan) { 366 return getService().updateMBBan(mbBan); 367 } 368 369 public static MBBanLocalService getService() { 370 if (_service == null) { 371 _service = (MBBanLocalService)PortalBeanLocatorUtil.locate(MBBanLocalService.class.getName()); 372 373 ReferenceRegistry.registerReference(MBBanLocalServiceUtil.class, 374 "_service"); 375 } 376 377 return _service; 378 } 379 380 /** 381 * @deprecated As of 6.2.0 382 */ 383 @Deprecated 384 public void setService(MBBanLocalService service) { 385 } 386 387 private static MBBanLocalService _service; 388 }