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.message.boards.kernel.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 MBMailingList. This utility wraps 024 * {@link com.liferay.portlet.messageboards.service.impl.MBMailingListLocalServiceImpl} 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 MBMailingListLocalService 032 * @see com.liferay.portlet.messageboards.service.base.MBMailingListLocalServiceBaseImpl 033 * @see com.liferay.portlet.messageboards.service.impl.MBMailingListLocalServiceImpl 034 * @generated 035 */ 036 @ProviderType 037 public class MBMailingListLocalServiceUtil { 038 /* 039 * NOTE FOR DEVELOPERS: 040 * 041 * Never modify this class directly. Add custom service methods to {@link com.liferay.portlet.messageboards.service.impl.MBMailingListLocalServiceImpl} and rerun ServiceBuilder to regenerate this class. 042 */ 043 044 /** 045 * Adds the message boards mailing list to the database. Also notifies the appropriate model listeners. 046 * 047 * @param mbMailingList the message boards mailing list 048 * @return the message boards mailing list that was added 049 */ 050 public static com.liferay.message.boards.kernel.model.MBMailingList addMBMailingList( 051 com.liferay.message.boards.kernel.model.MBMailingList mbMailingList) { 052 return getService().addMBMailingList(mbMailingList); 053 } 054 055 public static com.liferay.message.boards.kernel.model.MBMailingList addMailingList( 056 long userId, long groupId, long categoryId, 057 java.lang.String emailAddress, java.lang.String inProtocol, 058 java.lang.String inServerName, int inServerPort, boolean inUseSSL, 059 java.lang.String inUserName, java.lang.String inPassword, 060 int inReadInterval, java.lang.String outEmailAddress, 061 boolean outCustom, java.lang.String outServerName, int outServerPort, 062 boolean outUseSSL, java.lang.String outUserName, 063 java.lang.String outPassword, boolean allowAnonymous, boolean active, 064 com.liferay.portal.kernel.service.ServiceContext serviceContext) 065 throws com.liferay.portal.kernel.exception.PortalException { 066 return getService() 067 .addMailingList(userId, groupId, categoryId, emailAddress, 068 inProtocol, inServerName, inServerPort, inUseSSL, inUserName, 069 inPassword, inReadInterval, outEmailAddress, outCustom, 070 outServerName, outServerPort, outUseSSL, outUserName, outPassword, 071 allowAnonymous, active, serviceContext); 072 } 073 074 /** 075 * Creates a new message boards mailing list with the primary key. Does not add the message boards mailing list to the database. 076 * 077 * @param mailingListId the primary key for the new message boards mailing list 078 * @return the new message boards mailing list 079 */ 080 public static com.liferay.message.boards.kernel.model.MBMailingList createMBMailingList( 081 long mailingListId) { 082 return getService().createMBMailingList(mailingListId); 083 } 084 085 /** 086 * Deletes the message boards mailing list from the database. Also notifies the appropriate model listeners. 087 * 088 * @param mbMailingList the message boards mailing list 089 * @return the message boards mailing list that was removed 090 */ 091 public static com.liferay.message.boards.kernel.model.MBMailingList deleteMBMailingList( 092 com.liferay.message.boards.kernel.model.MBMailingList mbMailingList) { 093 return getService().deleteMBMailingList(mbMailingList); 094 } 095 096 /** 097 * Deletes the message boards mailing list with the primary key from the database. Also notifies the appropriate model listeners. 098 * 099 * @param mailingListId the primary key of the message boards mailing list 100 * @return the message boards mailing list that was removed 101 * @throws PortalException if a message boards mailing list with the primary key could not be found 102 */ 103 public static com.liferay.message.boards.kernel.model.MBMailingList deleteMBMailingList( 104 long mailingListId) 105 throws com.liferay.portal.kernel.exception.PortalException { 106 return getService().deleteMBMailingList(mailingListId); 107 } 108 109 public static com.liferay.message.boards.kernel.model.MBMailingList fetchCategoryMailingList( 110 long groupId, long categoryId) { 111 return getService().fetchCategoryMailingList(groupId, categoryId); 112 } 113 114 public static com.liferay.message.boards.kernel.model.MBMailingList fetchMBMailingList( 115 long mailingListId) { 116 return getService().fetchMBMailingList(mailingListId); 117 } 118 119 /** 120 * Returns the message boards mailing list matching the UUID and group. 121 * 122 * @param uuid the message boards mailing list's UUID 123 * @param groupId the primary key of the group 124 * @return the matching message boards mailing list, or <code>null</code> if a matching message boards mailing list could not be found 125 */ 126 public static com.liferay.message.boards.kernel.model.MBMailingList fetchMBMailingListByUuidAndGroupId( 127 java.lang.String uuid, long groupId) { 128 return getService().fetchMBMailingListByUuidAndGroupId(uuid, groupId); 129 } 130 131 public static com.liferay.message.boards.kernel.model.MBMailingList getCategoryMailingList( 132 long groupId, long categoryId) 133 throws com.liferay.portal.kernel.exception.PortalException { 134 return getService().getCategoryMailingList(groupId, categoryId); 135 } 136 137 /** 138 * Returns the message boards mailing list with the primary key. 139 * 140 * @param mailingListId the primary key of the message boards mailing list 141 * @return the message boards mailing list 142 * @throws PortalException if a message boards mailing list with the primary key could not be found 143 */ 144 public static com.liferay.message.boards.kernel.model.MBMailingList getMBMailingList( 145 long mailingListId) 146 throws com.liferay.portal.kernel.exception.PortalException { 147 return getService().getMBMailingList(mailingListId); 148 } 149 150 /** 151 * Returns the message boards mailing list matching the UUID and group. 152 * 153 * @param uuid the message boards mailing list's UUID 154 * @param groupId the primary key of the group 155 * @return the matching message boards mailing list 156 * @throws PortalException if a matching message boards mailing list could not be found 157 */ 158 public static com.liferay.message.boards.kernel.model.MBMailingList getMBMailingListByUuidAndGroupId( 159 java.lang.String uuid, long groupId) 160 throws com.liferay.portal.kernel.exception.PortalException { 161 return getService().getMBMailingListByUuidAndGroupId(uuid, groupId); 162 } 163 164 /** 165 * Updates the message boards mailing list in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners. 166 * 167 * @param mbMailingList the message boards mailing list 168 * @return the message boards mailing list that was updated 169 */ 170 public static com.liferay.message.boards.kernel.model.MBMailingList updateMBMailingList( 171 com.liferay.message.boards.kernel.model.MBMailingList mbMailingList) { 172 return getService().updateMBMailingList(mbMailingList); 173 } 174 175 public static com.liferay.message.boards.kernel.model.MBMailingList updateMailingList( 176 long mailingListId, java.lang.String emailAddress, 177 java.lang.String inProtocol, java.lang.String inServerName, 178 int inServerPort, boolean inUseSSL, java.lang.String inUserName, 179 java.lang.String inPassword, int inReadInterval, 180 java.lang.String outEmailAddress, boolean outCustom, 181 java.lang.String outServerName, int outServerPort, boolean outUseSSL, 182 java.lang.String outUserName, java.lang.String outPassword, 183 boolean allowAnonymous, boolean active, 184 com.liferay.portal.kernel.service.ServiceContext serviceContext) 185 throws com.liferay.portal.kernel.exception.PortalException { 186 return getService() 187 .updateMailingList(mailingListId, emailAddress, inProtocol, 188 inServerName, inServerPort, inUseSSL, inUserName, inPassword, 189 inReadInterval, outEmailAddress, outCustom, outServerName, 190 outServerPort, outUseSSL, outUserName, outPassword, allowAnonymous, 191 active, serviceContext); 192 } 193 194 public static com.liferay.portal.kernel.dao.orm.ActionableDynamicQuery getActionableDynamicQuery() { 195 return getService().getActionableDynamicQuery(); 196 } 197 198 public static com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery() { 199 return getService().dynamicQuery(); 200 } 201 202 public static com.liferay.portal.kernel.dao.orm.ExportActionableDynamicQuery getExportActionableDynamicQuery( 203 com.liferay.exportimport.kernel.lar.PortletDataContext portletDataContext) { 204 return getService().getExportActionableDynamicQuery(portletDataContext); 205 } 206 207 public static com.liferay.portal.kernel.dao.orm.IndexableActionableDynamicQuery getIndexableActionableDynamicQuery() { 208 return getService().getIndexableActionableDynamicQuery(); 209 } 210 211 /** 212 * @throws PortalException 213 */ 214 public static com.liferay.portal.kernel.model.PersistedModel deletePersistedModel( 215 com.liferay.portal.kernel.model.PersistedModel persistedModel) 216 throws com.liferay.portal.kernel.exception.PortalException { 217 return getService().deletePersistedModel(persistedModel); 218 } 219 220 public static com.liferay.portal.kernel.model.PersistedModel getPersistedModel( 221 java.io.Serializable primaryKeyObj) 222 throws com.liferay.portal.kernel.exception.PortalException { 223 return getService().getPersistedModel(primaryKeyObj); 224 } 225 226 /** 227 * Returns the number of message boards mailing lists. 228 * 229 * @return the number of message boards mailing lists 230 */ 231 public static int getMBMailingListsCount() { 232 return getService().getMBMailingListsCount(); 233 } 234 235 /** 236 * Returns the OSGi service identifier. 237 * 238 * @return the OSGi service identifier 239 */ 240 public static java.lang.String getOSGiServiceIdentifier() { 241 return getService().getOSGiServiceIdentifier(); 242 } 243 244 /** 245 * Performs a dynamic query on the database and returns the matching rows. 246 * 247 * @param dynamicQuery the dynamic query 248 * @return the matching rows 249 */ 250 public static <T> java.util.List<T> dynamicQuery( 251 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) { 252 return getService().dynamicQuery(dynamicQuery); 253 } 254 255 /** 256 * Performs a dynamic query on the database and returns a range of the matching rows. 257 * 258 * <p> 259 * 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.MBMailingListModelImpl}. 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. 260 * </p> 261 * 262 * @param dynamicQuery the dynamic query 263 * @param start the lower bound of the range of model instances 264 * @param end the upper bound of the range of model instances (not inclusive) 265 * @return the range of matching rows 266 */ 267 public static <T> java.util.List<T> dynamicQuery( 268 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start, 269 int end) { 270 return getService().dynamicQuery(dynamicQuery, start, end); 271 } 272 273 /** 274 * Performs a dynamic query on the database and returns an ordered range of the matching rows. 275 * 276 * <p> 277 * 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.MBMailingListModelImpl}. 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. 278 * </p> 279 * 280 * @param dynamicQuery the dynamic query 281 * @param start the lower bound of the range of model instances 282 * @param end the upper bound of the range of model instances (not inclusive) 283 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 284 * @return the ordered range of matching rows 285 */ 286 public static <T> java.util.List<T> dynamicQuery( 287 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start, 288 int end, 289 com.liferay.portal.kernel.util.OrderByComparator<T> orderByComparator) { 290 return getService() 291 .dynamicQuery(dynamicQuery, start, end, orderByComparator); 292 } 293 294 /** 295 * Returns a range of all the message boards mailing lists. 296 * 297 * <p> 298 * 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.MBMailingListModelImpl}. 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. 299 * </p> 300 * 301 * @param start the lower bound of the range of message boards mailing lists 302 * @param end the upper bound of the range of message boards mailing lists (not inclusive) 303 * @return the range of message boards mailing lists 304 */ 305 public static java.util.List<com.liferay.message.boards.kernel.model.MBMailingList> getMBMailingLists( 306 int start, int end) { 307 return getService().getMBMailingLists(start, end); 308 } 309 310 /** 311 * Returns all the message boards mailing lists matching the UUID and company. 312 * 313 * @param uuid the UUID of the message boards mailing lists 314 * @param companyId the primary key of the company 315 * @return the matching message boards mailing lists, or an empty list if no matches were found 316 */ 317 public static java.util.List<com.liferay.message.boards.kernel.model.MBMailingList> getMBMailingListsByUuidAndCompanyId( 318 java.lang.String uuid, long companyId) { 319 return getService().getMBMailingListsByUuidAndCompanyId(uuid, companyId); 320 } 321 322 /** 323 * Returns a range of message boards mailing lists matching the UUID and company. 324 * 325 * @param uuid the UUID of the message boards mailing lists 326 * @param companyId the primary key of the company 327 * @param start the lower bound of the range of message boards mailing lists 328 * @param end the upper bound of the range of message boards mailing lists (not inclusive) 329 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 330 * @return the range of matching message boards mailing lists, or an empty list if no matches were found 331 */ 332 public static java.util.List<com.liferay.message.boards.kernel.model.MBMailingList> getMBMailingListsByUuidAndCompanyId( 333 java.lang.String uuid, long companyId, int start, int end, 334 com.liferay.portal.kernel.util.OrderByComparator<com.liferay.message.boards.kernel.model.MBMailingList> orderByComparator) { 335 return getService() 336 .getMBMailingListsByUuidAndCompanyId(uuid, companyId, start, 337 end, orderByComparator); 338 } 339 340 /** 341 * Returns the number of rows matching the dynamic query. 342 * 343 * @param dynamicQuery the dynamic query 344 * @return the number of rows matching the dynamic query 345 */ 346 public static long dynamicQueryCount( 347 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) { 348 return getService().dynamicQueryCount(dynamicQuery); 349 } 350 351 /** 352 * Returns the number of rows matching the dynamic query. 353 * 354 * @param dynamicQuery the dynamic query 355 * @param projection the projection to apply to the query 356 * @return the number of rows matching the dynamic query 357 */ 358 public static long dynamicQueryCount( 359 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, 360 com.liferay.portal.kernel.dao.orm.Projection projection) { 361 return getService().dynamicQueryCount(dynamicQuery, projection); 362 } 363 364 public static void deleteCategoryMailingList(long groupId, long categoryId) 365 throws com.liferay.portal.kernel.exception.PortalException { 366 getService().deleteCategoryMailingList(groupId, categoryId); 367 } 368 369 public static void deleteMailingList( 370 com.liferay.message.boards.kernel.model.MBMailingList mailingList) 371 throws com.liferay.portal.kernel.exception.PortalException { 372 getService().deleteMailingList(mailingList); 373 } 374 375 public static void deleteMailingList(long mailingListId) 376 throws com.liferay.portal.kernel.exception.PortalException { 377 getService().deleteMailingList(mailingListId); 378 } 379 380 public static MBMailingListLocalService getService() { 381 if (_service == null) { 382 _service = (MBMailingListLocalService)PortalBeanLocatorUtil.locate(MBMailingListLocalService.class.getName()); 383 384 ReferenceRegistry.registerReference(MBMailingListLocalServiceUtil.class, 385 "_service"); 386 } 387 388 return _service; 389 } 390 391 private static MBMailingListLocalService _service; 392 }