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