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.portal.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 UserNotificationDelivery. This utility wraps 024 * {@link com.liferay.portal.service.impl.UserNotificationDeliveryLocalServiceImpl} 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 UserNotificationDeliveryLocalService 032 * @see com.liferay.portal.service.base.UserNotificationDeliveryLocalServiceBaseImpl 033 * @see com.liferay.portal.service.impl.UserNotificationDeliveryLocalServiceImpl 034 * @generated 035 */ 036 @ProviderType 037 public class UserNotificationDeliveryLocalServiceUtil { 038 /* 039 * NOTE FOR DEVELOPERS: 040 * 041 * Never modify this class directly. Add custom service methods to {@link com.liferay.portal.service.impl.UserNotificationDeliveryLocalServiceImpl} and rerun ServiceBuilder to regenerate this class. 042 */ 043 044 /** 045 * Adds the user notification delivery to the database. Also notifies the appropriate model listeners. 046 * 047 * @param userNotificationDelivery the user notification delivery 048 * @return the user notification delivery that was added 049 * @throws SystemException if a system exception occurred 050 */ 051 public static com.liferay.portal.model.UserNotificationDelivery addUserNotificationDelivery( 052 com.liferay.portal.model.UserNotificationDelivery userNotificationDelivery) 053 throws com.liferay.portal.kernel.exception.SystemException { 054 return getService().addUserNotificationDelivery(userNotificationDelivery); 055 } 056 057 /** 058 * Creates a new user notification delivery with the primary key. Does not add the user notification delivery to the database. 059 * 060 * @param userNotificationDeliveryId the primary key for the new user notification delivery 061 * @return the new user notification delivery 062 */ 063 public static com.liferay.portal.model.UserNotificationDelivery createUserNotificationDelivery( 064 long userNotificationDeliveryId) { 065 return getService() 066 .createUserNotificationDelivery(userNotificationDeliveryId); 067 } 068 069 /** 070 * Deletes the user notification delivery with the primary key from the database. Also notifies the appropriate model listeners. 071 * 072 * @param userNotificationDeliveryId the primary key of the user notification delivery 073 * @return the user notification delivery that was removed 074 * @throws PortalException if a user notification delivery with the primary key could not be found 075 * @throws SystemException if a system exception occurred 076 */ 077 public static com.liferay.portal.model.UserNotificationDelivery deleteUserNotificationDelivery( 078 long userNotificationDeliveryId) 079 throws com.liferay.portal.kernel.exception.PortalException, 080 com.liferay.portal.kernel.exception.SystemException { 081 return getService() 082 .deleteUserNotificationDelivery(userNotificationDeliveryId); 083 } 084 085 /** 086 * Deletes the user notification delivery from the database. Also notifies the appropriate model listeners. 087 * 088 * @param userNotificationDelivery the user notification delivery 089 * @return the user notification delivery that was removed 090 * @throws SystemException if a system exception occurred 091 */ 092 public static com.liferay.portal.model.UserNotificationDelivery deleteUserNotificationDelivery( 093 com.liferay.portal.model.UserNotificationDelivery userNotificationDelivery) 094 throws com.liferay.portal.kernel.exception.SystemException { 095 return getService() 096 .deleteUserNotificationDelivery(userNotificationDelivery); 097 } 098 099 public static com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery() { 100 return getService().dynamicQuery(); 101 } 102 103 /** 104 * Performs a dynamic query on the database and returns the matching rows. 105 * 106 * @param dynamicQuery the dynamic query 107 * @return the matching rows 108 * @throws SystemException if a system exception occurred 109 */ 110 @SuppressWarnings("rawtypes") 111 public static java.util.List dynamicQuery( 112 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) 113 throws com.liferay.portal.kernel.exception.SystemException { 114 return getService().dynamicQuery(dynamicQuery); 115 } 116 117 /** 118 * Performs a dynamic query on the database and returns a range of the matching rows. 119 * 120 * <p> 121 * 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.portal.model.impl.UserNotificationDeliveryModelImpl}. 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. 122 * </p> 123 * 124 * @param dynamicQuery the dynamic query 125 * @param start the lower bound of the range of model instances 126 * @param end the upper bound of the range of model instances (not inclusive) 127 * @return the range of matching rows 128 * @throws SystemException if a system exception occurred 129 */ 130 @SuppressWarnings("rawtypes") 131 public static java.util.List dynamicQuery( 132 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start, 133 int end) throws com.liferay.portal.kernel.exception.SystemException { 134 return getService().dynamicQuery(dynamicQuery, start, end); 135 } 136 137 /** 138 * Performs a dynamic query on the database and returns an ordered range of the matching rows. 139 * 140 * <p> 141 * 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.portal.model.impl.UserNotificationDeliveryModelImpl}. 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. 142 * </p> 143 * 144 * @param dynamicQuery the dynamic query 145 * @param start the lower bound of the range of model instances 146 * @param end the upper bound of the range of model instances (not inclusive) 147 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 148 * @return the ordered range of matching rows 149 * @throws SystemException if a system exception occurred 150 */ 151 @SuppressWarnings("rawtypes") 152 public static java.util.List dynamicQuery( 153 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start, 154 int end, 155 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 156 throws com.liferay.portal.kernel.exception.SystemException { 157 return getService() 158 .dynamicQuery(dynamicQuery, start, end, orderByComparator); 159 } 160 161 /** 162 * Returns the number of rows that match the dynamic query. 163 * 164 * @param dynamicQuery the dynamic query 165 * @return the number of rows that match the dynamic query 166 * @throws SystemException if a system exception occurred 167 */ 168 public static long dynamicQueryCount( 169 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) 170 throws com.liferay.portal.kernel.exception.SystemException { 171 return getService().dynamicQueryCount(dynamicQuery); 172 } 173 174 /** 175 * Returns the number of rows that match the dynamic query. 176 * 177 * @param dynamicQuery the dynamic query 178 * @param projection the projection to apply to the query 179 * @return the number of rows that match the dynamic query 180 * @throws SystemException if a system exception occurred 181 */ 182 public static long dynamicQueryCount( 183 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, 184 com.liferay.portal.kernel.dao.orm.Projection projection) 185 throws com.liferay.portal.kernel.exception.SystemException { 186 return getService().dynamicQueryCount(dynamicQuery, projection); 187 } 188 189 public static com.liferay.portal.model.UserNotificationDelivery fetchUserNotificationDelivery( 190 long userNotificationDeliveryId) 191 throws com.liferay.portal.kernel.exception.SystemException { 192 return getService() 193 .fetchUserNotificationDelivery(userNotificationDeliveryId); 194 } 195 196 /** 197 * Returns the user notification delivery with the primary key. 198 * 199 * @param userNotificationDeliveryId the primary key of the user notification delivery 200 * @return the user notification delivery 201 * @throws PortalException if a user notification delivery with the primary key could not be found 202 * @throws SystemException if a system exception occurred 203 */ 204 public static com.liferay.portal.model.UserNotificationDelivery getUserNotificationDelivery( 205 long userNotificationDeliveryId) 206 throws com.liferay.portal.kernel.exception.PortalException, 207 com.liferay.portal.kernel.exception.SystemException { 208 return getService() 209 .getUserNotificationDelivery(userNotificationDeliveryId); 210 } 211 212 public static com.liferay.portal.model.PersistedModel getPersistedModel( 213 java.io.Serializable primaryKeyObj) 214 throws com.liferay.portal.kernel.exception.PortalException, 215 com.liferay.portal.kernel.exception.SystemException { 216 return getService().getPersistedModel(primaryKeyObj); 217 } 218 219 /** 220 * Returns a range of all the user notification deliveries. 221 * 222 * <p> 223 * 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.portal.model.impl.UserNotificationDeliveryModelImpl}. 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. 224 * </p> 225 * 226 * @param start the lower bound of the range of user notification deliveries 227 * @param end the upper bound of the range of user notification deliveries (not inclusive) 228 * @return the range of user notification deliveries 229 * @throws SystemException if a system exception occurred 230 */ 231 public static java.util.List<com.liferay.portal.model.UserNotificationDelivery> getUserNotificationDeliveries( 232 int start, int end) 233 throws com.liferay.portal.kernel.exception.SystemException { 234 return getService().getUserNotificationDeliveries(start, end); 235 } 236 237 /** 238 * Returns the number of user notification deliveries. 239 * 240 * @return the number of user notification deliveries 241 * @throws SystemException if a system exception occurred 242 */ 243 public static int getUserNotificationDeliveriesCount() 244 throws com.liferay.portal.kernel.exception.SystemException { 245 return getService().getUserNotificationDeliveriesCount(); 246 } 247 248 /** 249 * Updates the user notification delivery in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners. 250 * 251 * @param userNotificationDelivery the user notification delivery 252 * @return the user notification delivery that was updated 253 * @throws SystemException if a system exception occurred 254 */ 255 public static com.liferay.portal.model.UserNotificationDelivery updateUserNotificationDelivery( 256 com.liferay.portal.model.UserNotificationDelivery userNotificationDelivery) 257 throws com.liferay.portal.kernel.exception.SystemException { 258 return getService() 259 .updateUserNotificationDelivery(userNotificationDelivery); 260 } 261 262 /** 263 * Returns the Spring bean ID for this bean. 264 * 265 * @return the Spring bean ID for this bean 266 */ 267 public static java.lang.String getBeanIdentifier() { 268 return getService().getBeanIdentifier(); 269 } 270 271 /** 272 * Sets the Spring bean ID for this bean. 273 * 274 * @param beanIdentifier the Spring bean ID for this bean 275 */ 276 public static void setBeanIdentifier(java.lang.String beanIdentifier) { 277 getService().setBeanIdentifier(beanIdentifier); 278 } 279 280 public static com.liferay.portal.model.UserNotificationDelivery addUserNotificationDelivery( 281 long userId, java.lang.String portletId, long classNameId, 282 int notificationType, int deliveryType, boolean deliver) 283 throws com.liferay.portal.kernel.exception.PortalException, 284 com.liferay.portal.kernel.exception.SystemException { 285 return getService() 286 .addUserNotificationDelivery(userId, portletId, classNameId, 287 notificationType, deliveryType, deliver); 288 } 289 290 public static void deleteUserNotificationDeliveries(long userId) 291 throws com.liferay.portal.kernel.exception.SystemException { 292 getService().deleteUserNotificationDeliveries(userId); 293 } 294 295 public static void deleteUserNotificationDelivery(long userId, 296 java.lang.String portletId, long classNameId, int notificationType, 297 int deliveryType) 298 throws com.liferay.portal.kernel.exception.SystemException { 299 getService() 300 .deleteUserNotificationDelivery(userId, portletId, classNameId, 301 notificationType, deliveryType); 302 } 303 304 public static com.liferay.portal.model.UserNotificationDelivery fetchUserNotificationDelivery( 305 long userId, java.lang.String portletId, long classNameId, 306 int notificationType, int deliveryType) 307 throws com.liferay.portal.kernel.exception.SystemException { 308 return getService() 309 .fetchUserNotificationDelivery(userId, portletId, 310 classNameId, notificationType, deliveryType); 311 } 312 313 public static com.liferay.portal.model.UserNotificationDelivery getUserNotificationDelivery( 314 long userId, java.lang.String portletId, long classNameId, 315 int notificationType, int deliveryType, boolean deliver) 316 throws com.liferay.portal.kernel.exception.PortalException, 317 com.liferay.portal.kernel.exception.SystemException { 318 return getService() 319 .getUserNotificationDelivery(userId, portletId, classNameId, 320 notificationType, deliveryType, deliver); 321 } 322 323 public static com.liferay.portal.model.UserNotificationDelivery updateUserNotificationDelivery( 324 long userNotificationDeliveryId, boolean deliver) 325 throws com.liferay.portal.kernel.exception.SystemException { 326 return getService() 327 .updateUserNotificationDelivery(userNotificationDeliveryId, 328 deliver); 329 } 330 331 public static UserNotificationDeliveryLocalService getService() { 332 if (_service == null) { 333 _service = (UserNotificationDeliveryLocalService)PortalBeanLocatorUtil.locate(UserNotificationDeliveryLocalService.class.getName()); 334 335 ReferenceRegistry.registerReference(UserNotificationDeliveryLocalServiceUtil.class, 336 "_service"); 337 } 338 339 return _service; 340 } 341 342 /** 343 * @deprecated As of 6.2.0 344 */ 345 public void setService(UserNotificationDeliveryLocalService service) { 346 } 347 348 private static UserNotificationDeliveryLocalService _service; 349 }