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