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 /** 020 * Provides a wrapper for {@link SubscriptionLocalService}. 021 * 022 * @author Brian Wing Shun Chan 023 * @see SubscriptionLocalService 024 * @generated 025 */ 026 @ProviderType 027 public class SubscriptionLocalServiceWrapper implements SubscriptionLocalService, 028 ServiceWrapper<SubscriptionLocalService> { 029 public SubscriptionLocalServiceWrapper( 030 SubscriptionLocalService subscriptionLocalService) { 031 _subscriptionLocalService = subscriptionLocalService; 032 } 033 034 /** 035 * Adds the subscription to the database. Also notifies the appropriate model listeners. 036 * 037 * @param subscription the subscription 038 * @return the subscription that was added 039 */ 040 @Override 041 public com.liferay.portal.model.Subscription addSubscription( 042 com.liferay.portal.model.Subscription subscription) { 043 return _subscriptionLocalService.addSubscription(subscription); 044 } 045 046 /** 047 * Subscribes the user to the entity, notifying him the instant the entity 048 * is created, deleted, or modified. 049 * 050 * <p> 051 * If there is no asset entry with the class name and class PK a new asset 052 * entry is created. 053 * </p> 054 * 055 * <p> 056 * A social activity for the subscription is created using the asset entry 057 * associated with the class name and class PK, or the newly created asset 058 * entry. 059 * </p> 060 * 061 * @param userId the primary key of the user 062 * @param groupId the primary key of the entity's group 063 * @param className the entity's class name 064 * @param classPK the primary key of the entity's instance 065 * @return the subscription 066 * @throws PortalException if a matching user or group could not be found 067 */ 068 @Override 069 public com.liferay.portal.model.Subscription addSubscription(long userId, 070 long groupId, java.lang.String className, long classPK) 071 throws com.liferay.portal.kernel.exception.PortalException { 072 return _subscriptionLocalService.addSubscription(userId, groupId, 073 className, classPK); 074 } 075 076 /** 077 * Subscribes the user to the entity, notifying him at the given frequency. 078 * 079 * <p> 080 * If there is no asset entry with the class name and class PK a new asset 081 * entry is created. 082 * </p> 083 * 084 * <p> 085 * A social activity for the subscription is created using the asset entry 086 * associated with the class name and class PK, or the newly created asset 087 * entry. 088 * </p> 089 * 090 * @param userId the primary key of the user 091 * @param groupId the primary key of the entity's group 092 * @param className the entity's class name 093 * @param classPK the primary key of the entity's instance 094 * @param frequency the frequency for notifications 095 * @return the subscription 096 * @throws PortalException if a matching user or group could not be found 097 */ 098 @Override 099 public com.liferay.portal.model.Subscription addSubscription(long userId, 100 long groupId, java.lang.String className, long classPK, 101 java.lang.String frequency) 102 throws com.liferay.portal.kernel.exception.PortalException { 103 return _subscriptionLocalService.addSubscription(userId, groupId, 104 className, classPK, frequency); 105 } 106 107 /** 108 * Creates a new subscription with the primary key. Does not add the subscription to the database. 109 * 110 * @param subscriptionId the primary key for the new subscription 111 * @return the new subscription 112 */ 113 @Override 114 public com.liferay.portal.model.Subscription createSubscription( 115 long subscriptionId) { 116 return _subscriptionLocalService.createSubscription(subscriptionId); 117 } 118 119 /** 120 * @throws PortalException 121 */ 122 @Override 123 public com.liferay.portal.model.PersistedModel deletePersistedModel( 124 com.liferay.portal.model.PersistedModel persistedModel) 125 throws com.liferay.portal.kernel.exception.PortalException { 126 return _subscriptionLocalService.deletePersistedModel(persistedModel); 127 } 128 129 /** 130 * Deletes the subscription from the database. Also notifies the appropriate model listeners. 131 * 132 * @param subscription the subscription 133 * @return the subscription that was removed 134 * @throws PortalException 135 */ 136 @Override 137 public com.liferay.portal.model.Subscription deleteSubscription( 138 com.liferay.portal.model.Subscription subscription) 139 throws com.liferay.portal.kernel.exception.PortalException { 140 return _subscriptionLocalService.deleteSubscription(subscription); 141 } 142 143 /** 144 * Deletes the subscription with the primary key from the database. Also notifies the appropriate model listeners. 145 * 146 * @param subscriptionId the primary key of the subscription 147 * @return the subscription that was removed 148 * @throws PortalException if a subscription with the primary key could not be found 149 */ 150 @Override 151 public com.liferay.portal.model.Subscription deleteSubscription( 152 long subscriptionId) 153 throws com.liferay.portal.kernel.exception.PortalException { 154 return _subscriptionLocalService.deleteSubscription(subscriptionId); 155 } 156 157 /** 158 * Deletes the user's subscription to the entity. A social activity with the 159 * unsubscribe action is created. 160 * 161 * @param userId the primary key of the user 162 * @param className the entity's class name 163 * @param classPK the primary key of the entity's instance 164 * @throws PortalException if a matching user or subscription could not be 165 found 166 */ 167 @Override 168 public void deleteSubscription(long userId, java.lang.String className, 169 long classPK) 170 throws com.liferay.portal.kernel.exception.PortalException { 171 _subscriptionLocalService.deleteSubscription(userId, className, classPK); 172 } 173 174 /** 175 * Deletes all the subscriptions to the entity. 176 * 177 * @param companyId the primary key of the company 178 * @param className the entity's class name 179 * @param classPK the primary key of the entity's instance 180 * @throws PortalException if a portal exception occurred 181 */ 182 @Override 183 public void deleteSubscriptions(long companyId, java.lang.String className, 184 long classPK) 185 throws com.liferay.portal.kernel.exception.PortalException { 186 _subscriptionLocalService.deleteSubscriptions(companyId, className, 187 classPK); 188 } 189 190 /** 191 * Deletes all the subscriptions of the user. 192 * 193 * @param userId the primary key of the user 194 * @throws PortalException if a portal exception occurred 195 */ 196 @Override 197 public void deleteSubscriptions(long userId) 198 throws com.liferay.portal.kernel.exception.PortalException { 199 _subscriptionLocalService.deleteSubscriptions(userId); 200 } 201 202 @Override 203 public com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery() { 204 return _subscriptionLocalService.dynamicQuery(); 205 } 206 207 /** 208 * Performs a dynamic query on the database and returns the matching rows. 209 * 210 * @param dynamicQuery the dynamic query 211 * @return the matching rows 212 */ 213 @Override 214 public <T> java.util.List<T> dynamicQuery( 215 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) { 216 return _subscriptionLocalService.dynamicQuery(dynamicQuery); 217 } 218 219 /** 220 * Performs a dynamic query on the database and returns a range of the matching rows. 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.SubscriptionModelImpl}. 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 dynamicQuery the dynamic query 227 * @param start the lower bound of the range of model instances 228 * @param end the upper bound of the range of model instances (not inclusive) 229 * @return the range of matching rows 230 */ 231 @Override 232 public <T> java.util.List<T> dynamicQuery( 233 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start, 234 int end) { 235 return _subscriptionLocalService.dynamicQuery(dynamicQuery, start, end); 236 } 237 238 /** 239 * Performs a dynamic query on the database and returns an ordered range of the matching rows. 240 * 241 * <p> 242 * 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.SubscriptionModelImpl}. 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. 243 * </p> 244 * 245 * @param dynamicQuery the dynamic query 246 * @param start the lower bound of the range of model instances 247 * @param end the upper bound of the range of model instances (not inclusive) 248 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 249 * @return the ordered range of matching rows 250 */ 251 @Override 252 public <T> java.util.List<T> dynamicQuery( 253 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start, 254 int end, 255 com.liferay.portal.kernel.util.OrderByComparator<T> orderByComparator) { 256 return _subscriptionLocalService.dynamicQuery(dynamicQuery, start, end, 257 orderByComparator); 258 } 259 260 /** 261 * Returns the number of rows matching the dynamic query. 262 * 263 * @param dynamicQuery the dynamic query 264 * @return the number of rows matching the dynamic query 265 */ 266 @Override 267 public long dynamicQueryCount( 268 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) { 269 return _subscriptionLocalService.dynamicQueryCount(dynamicQuery); 270 } 271 272 /** 273 * Returns the number of rows matching the dynamic query. 274 * 275 * @param dynamicQuery the dynamic query 276 * @param projection the projection to apply to the query 277 * @return the number of rows matching the dynamic query 278 */ 279 @Override 280 public long dynamicQueryCount( 281 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, 282 com.liferay.portal.kernel.dao.orm.Projection projection) { 283 return _subscriptionLocalService.dynamicQueryCount(dynamicQuery, 284 projection); 285 } 286 287 @Override 288 public com.liferay.portal.model.Subscription fetchSubscription( 289 long subscriptionId) { 290 return _subscriptionLocalService.fetchSubscription(subscriptionId); 291 } 292 293 @Override 294 public com.liferay.portal.kernel.dao.orm.ActionableDynamicQuery getActionableDynamicQuery() { 295 return _subscriptionLocalService.getActionableDynamicQuery(); 296 } 297 298 /** 299 * Returns the Spring bean ID for this bean. 300 * 301 * @return the Spring bean ID for this bean 302 */ 303 @Override 304 public java.lang.String getBeanIdentifier() { 305 return _subscriptionLocalService.getBeanIdentifier(); 306 } 307 308 @Override 309 public com.liferay.portal.model.PersistedModel getPersistedModel( 310 java.io.Serializable primaryKeyObj) 311 throws com.liferay.portal.kernel.exception.PortalException { 312 return _subscriptionLocalService.getPersistedModel(primaryKeyObj); 313 } 314 315 /** 316 * Returns the subscription of the user to the entity. 317 * 318 * @param companyId the primary key of the company 319 * @param userId the primary key of the user 320 * @param className the entity's class name 321 * @param classPK the primary key of the entity's instance 322 * @return the subscription of the user to the entity 323 * @throws PortalException if a matching subscription could not be found 324 */ 325 @Override 326 public com.liferay.portal.model.Subscription getSubscription( 327 long companyId, long userId, java.lang.String className, long classPK) 328 throws com.liferay.portal.kernel.exception.PortalException { 329 return _subscriptionLocalService.getSubscription(companyId, userId, 330 className, classPK); 331 } 332 333 /** 334 * Returns the subscription with the primary key. 335 * 336 * @param subscriptionId the primary key of the subscription 337 * @return the subscription 338 * @throws PortalException if a subscription with the primary key could not be found 339 */ 340 @Override 341 public com.liferay.portal.model.Subscription getSubscription( 342 long subscriptionId) 343 throws com.liferay.portal.kernel.exception.PortalException { 344 return _subscriptionLocalService.getSubscription(subscriptionId); 345 } 346 347 /** 348 * Returns all the subscriptions to the entity. 349 * 350 * @param companyId the primary key of the company 351 * @param className the entity's class name 352 * @param classPK the primary key of the entity's instance 353 * @return the subscriptions to the entity 354 */ 355 @Override 356 public java.util.List<com.liferay.portal.model.Subscription> getSubscriptions( 357 long companyId, java.lang.String className, long classPK) { 358 return _subscriptionLocalService.getSubscriptions(companyId, className, 359 classPK); 360 } 361 362 /** 363 * Returns all the subscriptions of the user to the entities. 364 * 365 * @param companyId the primary key of the company 366 * @param userId the primary key of the user 367 * @param className the entity's class name 368 * @param classPKs the primary key of the entities 369 * @return the subscriptions of the user to the entities 370 */ 371 @Override 372 public java.util.List<com.liferay.portal.model.Subscription> getSubscriptions( 373 long companyId, long userId, java.lang.String className, long[] classPKs) { 374 return _subscriptionLocalService.getSubscriptions(companyId, userId, 375 className, classPKs); 376 } 377 378 /** 379 * Returns a range of all the subscriptions. 380 * 381 * <p> 382 * 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.SubscriptionModelImpl}. 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. 383 * </p> 384 * 385 * @param start the lower bound of the range of subscriptions 386 * @param end the upper bound of the range of subscriptions (not inclusive) 387 * @return the range of subscriptions 388 */ 389 @Override 390 public java.util.List<com.liferay.portal.model.Subscription> getSubscriptions( 391 int start, int end) { 392 return _subscriptionLocalService.getSubscriptions(start, end); 393 } 394 395 /** 396 * Returns the number of subscriptions. 397 * 398 * @return the number of subscriptions 399 */ 400 @Override 401 public int getSubscriptionsCount() { 402 return _subscriptionLocalService.getSubscriptionsCount(); 403 } 404 405 /** 406 * Returns all the subscriptions of the user to the entities with the class 407 * name. 408 * 409 * @param userId the primary key of the user 410 * @param className the entity's class name 411 * @return the subscriptions of the user to the entities with the class name 412 */ 413 @Override 414 public java.util.List<com.liferay.portal.model.Subscription> getUserSubscriptions( 415 long userId, java.lang.String className) { 416 return _subscriptionLocalService.getUserSubscriptions(userId, className); 417 } 418 419 /** 420 * Returns an ordered range of all the subscriptions of the user. 421 * 422 * @param userId the primary key of the user 423 * @param start the lower bound of the range of results 424 * @param end the upper bound of the range of results (not inclusive) 425 * @param orderByComparator the comparator to order the subscriptions 426 * @return the range of subscriptions of the user 427 */ 428 @Override 429 public java.util.List<com.liferay.portal.model.Subscription> getUserSubscriptions( 430 long userId, int start, int end, 431 com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.model.Subscription> orderByComparator) { 432 return _subscriptionLocalService.getUserSubscriptions(userId, start, 433 end, orderByComparator); 434 } 435 436 /** 437 * Returns the number of subscriptions of the user. 438 * 439 * @param userId the primary key of the user 440 * @return the number of subscriptions of the user 441 */ 442 @Override 443 public int getUserSubscriptionsCount(long userId) { 444 return _subscriptionLocalService.getUserSubscriptionsCount(userId); 445 } 446 447 /** 448 * Returns <code>true</code> if the user is subscribed to the entity. 449 * 450 * @param companyId the primary key of the company 451 * @param userId the primary key of the user 452 * @param className the entity's class name 453 * @param classPK the primary key of the entity's instance 454 * @return <code>true</code> if the user is subscribed to the entity; 455 <code>false</code> otherwise 456 */ 457 @Override 458 public boolean isSubscribed(long companyId, long userId, 459 java.lang.String className, long classPK) { 460 return _subscriptionLocalService.isSubscribed(companyId, userId, 461 className, classPK); 462 } 463 464 /** 465 * Returns <code>true</code> if the user is subscribed to any of the 466 * entities. 467 * 468 * @param companyId the primary key of the company 469 * @param userId the primary key of the user 470 * @param className the entity's class name 471 * @param classPKs the primary key of the entities 472 * @return <code>true</code> if the user is subscribed to any of the 473 entities; <code>false</code> otherwise 474 */ 475 @Override 476 public boolean isSubscribed(long companyId, long userId, 477 java.lang.String className, long[] classPKs) { 478 return _subscriptionLocalService.isSubscribed(companyId, userId, 479 className, classPKs); 480 } 481 482 /** 483 * Sets the Spring bean ID for this bean. 484 * 485 * @param beanIdentifier the Spring bean ID for this bean 486 */ 487 @Override 488 public void setBeanIdentifier(java.lang.String beanIdentifier) { 489 _subscriptionLocalService.setBeanIdentifier(beanIdentifier); 490 } 491 492 /** 493 * Updates the subscription in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners. 494 * 495 * @param subscription the subscription 496 * @return the subscription that was updated 497 */ 498 @Override 499 public com.liferay.portal.model.Subscription updateSubscription( 500 com.liferay.portal.model.Subscription subscription) { 501 return _subscriptionLocalService.updateSubscription(subscription); 502 } 503 504 /** 505 * @deprecated As of 6.1.0, replaced by {@link #getWrappedService} 506 */ 507 @Deprecated 508 public SubscriptionLocalService getWrappedSubscriptionLocalService() { 509 return _subscriptionLocalService; 510 } 511 512 /** 513 * @deprecated As of 6.1.0, replaced by {@link #setWrappedService} 514 */ 515 @Deprecated 516 public void setWrappedSubscriptionLocalService( 517 SubscriptionLocalService subscriptionLocalService) { 518 _subscriptionLocalService = subscriptionLocalService; 519 } 520 521 @Override 522 public SubscriptionLocalService getWrappedService() { 523 return _subscriptionLocalService; 524 } 525 526 @Override 527 public void setWrappedService( 528 SubscriptionLocalService subscriptionLocalService) { 529 _subscriptionLocalService = subscriptionLocalService; 530 } 531 532 private SubscriptionLocalService _subscriptionLocalService; 533 }