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