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