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