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.portlet.social.service; 016 017 import com.liferay.portal.service.ServiceWrapper; 018 019 /** 020 * <p> 021 * This class is a wrapper for {@link SocialRequestLocalService}. 022 * </p> 023 * 024 * @author Brian Wing Shun Chan 025 * @see SocialRequestLocalService 026 * @generated 027 */ 028 public class SocialRequestLocalServiceWrapper 029 implements SocialRequestLocalService, 030 ServiceWrapper<SocialRequestLocalService> { 031 public SocialRequestLocalServiceWrapper( 032 SocialRequestLocalService socialRequestLocalService) { 033 _socialRequestLocalService = socialRequestLocalService; 034 } 035 036 /** 037 * Adds the social request to the database. Also notifies the appropriate model listeners. 038 * 039 * @param socialRequest the social request 040 * @return the social request that was added 041 * @throws SystemException if a system exception occurred 042 */ 043 public com.liferay.portlet.social.model.SocialRequest addSocialRequest( 044 com.liferay.portlet.social.model.SocialRequest socialRequest) 045 throws com.liferay.portal.kernel.exception.SystemException { 046 return _socialRequestLocalService.addSocialRequest(socialRequest); 047 } 048 049 /** 050 * Creates a new social request with the primary key. Does not add the social request to the database. 051 * 052 * @param requestId the primary key for the new social request 053 * @return the new social request 054 */ 055 public com.liferay.portlet.social.model.SocialRequest createSocialRequest( 056 long requestId) { 057 return _socialRequestLocalService.createSocialRequest(requestId); 058 } 059 060 /** 061 * Deletes the social request with the primary key from the database. Also notifies the appropriate model listeners. 062 * 063 * @param requestId the primary key of the social request 064 * @return the social request that was removed 065 * @throws PortalException if a social request with the primary key could not be found 066 * @throws SystemException if a system exception occurred 067 */ 068 public com.liferay.portlet.social.model.SocialRequest deleteSocialRequest( 069 long requestId) 070 throws com.liferay.portal.kernel.exception.PortalException, 071 com.liferay.portal.kernel.exception.SystemException { 072 return _socialRequestLocalService.deleteSocialRequest(requestId); 073 } 074 075 /** 076 * Deletes the social request from the database. Also notifies the appropriate model listeners. 077 * 078 * @param socialRequest the social request 079 * @return the social request that was removed 080 * @throws SystemException if a system exception occurred 081 */ 082 public com.liferay.portlet.social.model.SocialRequest deleteSocialRequest( 083 com.liferay.portlet.social.model.SocialRequest socialRequest) 084 throws com.liferay.portal.kernel.exception.SystemException { 085 return _socialRequestLocalService.deleteSocialRequest(socialRequest); 086 } 087 088 public com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery() { 089 return _socialRequestLocalService.dynamicQuery(); 090 } 091 092 /** 093 * Performs a dynamic query on the database and returns the matching rows. 094 * 095 * @param dynamicQuery the dynamic query 096 * @return the matching rows 097 * @throws SystemException if a system exception occurred 098 */ 099 @SuppressWarnings("rawtypes") 100 public java.util.List dynamicQuery( 101 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) 102 throws com.liferay.portal.kernel.exception.SystemException { 103 return _socialRequestLocalService.dynamicQuery(dynamicQuery); 104 } 105 106 /** 107 * Performs a dynamic query on the database and returns a range of the matching rows. 108 * 109 * <p> 110 * 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. 111 * </p> 112 * 113 * @param dynamicQuery the dynamic query 114 * @param start the lower bound of the range of model instances 115 * @param end the upper bound of the range of model instances (not inclusive) 116 * @return the range of matching rows 117 * @throws SystemException if a system exception occurred 118 */ 119 @SuppressWarnings("rawtypes") 120 public java.util.List dynamicQuery( 121 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start, 122 int end) throws com.liferay.portal.kernel.exception.SystemException { 123 return _socialRequestLocalService.dynamicQuery(dynamicQuery, start, end); 124 } 125 126 /** 127 * Performs a dynamic query on the database and returns an ordered range of the matching rows. 128 * 129 * <p> 130 * 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. 131 * </p> 132 * 133 * @param dynamicQuery the dynamic query 134 * @param start the lower bound of the range of model instances 135 * @param end the upper bound of the range of model instances (not inclusive) 136 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 137 * @return the ordered range of matching rows 138 * @throws SystemException if a system exception occurred 139 */ 140 @SuppressWarnings("rawtypes") 141 public java.util.List dynamicQuery( 142 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start, 143 int end, 144 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 145 throws com.liferay.portal.kernel.exception.SystemException { 146 return _socialRequestLocalService.dynamicQuery(dynamicQuery, start, 147 end, orderByComparator); 148 } 149 150 /** 151 * Returns the number of rows that match the dynamic query. 152 * 153 * @param dynamicQuery the dynamic query 154 * @return the number of rows that match the dynamic query 155 * @throws SystemException if a system exception occurred 156 */ 157 public long dynamicQueryCount( 158 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) 159 throws com.liferay.portal.kernel.exception.SystemException { 160 return _socialRequestLocalService.dynamicQueryCount(dynamicQuery); 161 } 162 163 public com.liferay.portlet.social.model.SocialRequest fetchSocialRequest( 164 long requestId) 165 throws com.liferay.portal.kernel.exception.SystemException { 166 return _socialRequestLocalService.fetchSocialRequest(requestId); 167 } 168 169 /** 170 * Returns the social request with the primary key. 171 * 172 * @param requestId the primary key of the social request 173 * @return the social request 174 * @throws PortalException if a social request with the primary key could not be found 175 * @throws SystemException if a system exception occurred 176 */ 177 public com.liferay.portlet.social.model.SocialRequest getSocialRequest( 178 long requestId) 179 throws com.liferay.portal.kernel.exception.PortalException, 180 com.liferay.portal.kernel.exception.SystemException { 181 return _socialRequestLocalService.getSocialRequest(requestId); 182 } 183 184 public com.liferay.portal.model.PersistedModel getPersistedModel( 185 java.io.Serializable primaryKeyObj) 186 throws com.liferay.portal.kernel.exception.PortalException, 187 com.liferay.portal.kernel.exception.SystemException { 188 return _socialRequestLocalService.getPersistedModel(primaryKeyObj); 189 } 190 191 /** 192 * Returns the social request with the UUID in the group. 193 * 194 * @param uuid the UUID of social request 195 * @param groupId the group id of the social request 196 * @return the social request 197 * @throws PortalException if a social request with the UUID in the group could not be found 198 * @throws SystemException if a system exception occurred 199 */ 200 public com.liferay.portlet.social.model.SocialRequest getSocialRequestByUuidAndGroupId( 201 java.lang.String uuid, long groupId) 202 throws com.liferay.portal.kernel.exception.PortalException, 203 com.liferay.portal.kernel.exception.SystemException { 204 return _socialRequestLocalService.getSocialRequestByUuidAndGroupId(uuid, 205 groupId); 206 } 207 208 /** 209 * Returns a range of all the social requests. 210 * 211 * <p> 212 * 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. 213 * </p> 214 * 215 * @param start the lower bound of the range of social requests 216 * @param end the upper bound of the range of social requests (not inclusive) 217 * @return the range of social requests 218 * @throws SystemException if a system exception occurred 219 */ 220 public java.util.List<com.liferay.portlet.social.model.SocialRequest> getSocialRequests( 221 int start, int end) 222 throws com.liferay.portal.kernel.exception.SystemException { 223 return _socialRequestLocalService.getSocialRequests(start, end); 224 } 225 226 /** 227 * Returns the number of social requests. 228 * 229 * @return the number of social requests 230 * @throws SystemException if a system exception occurred 231 */ 232 public int getSocialRequestsCount() 233 throws com.liferay.portal.kernel.exception.SystemException { 234 return _socialRequestLocalService.getSocialRequestsCount(); 235 } 236 237 /** 238 * Updates the social request in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners. 239 * 240 * @param socialRequest the social request 241 * @return the social request that was updated 242 * @throws SystemException if a system exception occurred 243 */ 244 public com.liferay.portlet.social.model.SocialRequest updateSocialRequest( 245 com.liferay.portlet.social.model.SocialRequest socialRequest) 246 throws com.liferay.portal.kernel.exception.SystemException { 247 return _socialRequestLocalService.updateSocialRequest(socialRequest); 248 } 249 250 /** 251 * Updates the social request in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners. 252 * 253 * @param socialRequest the social request 254 * @param merge whether to merge the social request with the current session. See {@link com.liferay.portal.service.persistence.BatchSession#update(com.liferay.portal.kernel.dao.orm.Session, com.liferay.portal.model.BaseModel, boolean)} for an explanation. 255 * @return the social request that was updated 256 * @throws SystemException if a system exception occurred 257 */ 258 public com.liferay.portlet.social.model.SocialRequest updateSocialRequest( 259 com.liferay.portlet.social.model.SocialRequest socialRequest, 260 boolean merge) 261 throws com.liferay.portal.kernel.exception.SystemException { 262 return _socialRequestLocalService.updateSocialRequest(socialRequest, 263 merge); 264 } 265 266 /** 267 * Returns the Spring bean ID for this bean. 268 * 269 * @return the Spring bean ID for this bean 270 */ 271 public java.lang.String getBeanIdentifier() { 272 return _socialRequestLocalService.getBeanIdentifier(); 273 } 274 275 /** 276 * Sets the Spring bean ID for this bean. 277 * 278 * @param beanIdentifier the Spring bean ID for this bean 279 */ 280 public void setBeanIdentifier(java.lang.String beanIdentifier) { 281 _socialRequestLocalService.setBeanIdentifier(beanIdentifier); 282 } 283 284 /** 285 * Adds a social request to the database. 286 * 287 * <p> 288 * In order to add a social request, both the requesting user and the 289 * receiving user must be from the same company and neither of them can be 290 * the default user. 291 * </p> 292 * 293 * @param userId the primary key of the requesting user 294 * @param groupId the primary key of the group 295 * @param className the class name of the asset that is the subject of the 296 request 297 * @param classPK the primary key of the asset that is the subject of the 298 request 299 * @param type the request's type 300 * @param extraData the extra data regarding the request 301 * @param receiverUserId the primary key of the user receiving the request 302 * @return the social request 303 * @throws PortalException if the users could not be found, if the users 304 were not from the same company, or if either of the users was the 305 default user 306 * @throws SystemException if a system exception occurred 307 */ 308 public com.liferay.portlet.social.model.SocialRequest addRequest( 309 long userId, long groupId, java.lang.String className, long classPK, 310 int type, java.lang.String extraData, long receiverUserId) 311 throws com.liferay.portal.kernel.exception.PortalException, 312 com.liferay.portal.kernel.exception.SystemException { 313 return _socialRequestLocalService.addRequest(userId, groupId, 314 className, classPK, type, extraData, receiverUserId); 315 } 316 317 /** 318 * Removes all the social requests for the receiving user. 319 * 320 * @param receiverUserId the primary key of the receiving user 321 * @throws SystemException if a system exception occurred 322 */ 323 public void deleteReceiverUserRequests(long receiverUserId) 324 throws com.liferay.portal.kernel.exception.SystemException { 325 _socialRequestLocalService.deleteReceiverUserRequests(receiverUserId); 326 } 327 328 /** 329 * Removes the social request identified by its primary key from the 330 * database. 331 * 332 * @param requestId the primary key of the social request 333 * @throws PortalException if the social request could not be found 334 * @throws SystemException if a system exception occurred 335 */ 336 public void deleteRequest(long requestId) 337 throws com.liferay.portal.kernel.exception.PortalException, 338 com.liferay.portal.kernel.exception.SystemException { 339 _socialRequestLocalService.deleteRequest(requestId); 340 } 341 342 /** 343 * Removes the social request from the database. 344 * 345 * @param request the social request to be removed 346 * @throws SystemException if a system exception occurred 347 */ 348 public void deleteRequest( 349 com.liferay.portlet.social.model.SocialRequest request) 350 throws com.liferay.portal.kernel.exception.SystemException { 351 _socialRequestLocalService.deleteRequest(request); 352 } 353 354 /** 355 * Removes all the social requests for the requesting user. 356 * 357 * @param userId the primary key of the requesting user 358 * @throws SystemException if a system exception occurred 359 */ 360 public void deleteUserRequests(long userId) 361 throws com.liferay.portal.kernel.exception.SystemException { 362 _socialRequestLocalService.deleteUserRequests(userId); 363 } 364 365 /** 366 * Returns a range of all the social requests for the receiving user. 367 * 368 * <p> 369 * Useful when paginating results. Returns a maximum of <code>end - 370 * start</code> instances. <code>start</code> and <code>end</code> are not 371 * primary keys, they are indexes in the result set. Thus, <code>0</code> 372 * refers to the first result in the set. Setting both <code>start</code> 373 * and <code>end</code> to {@link 374 * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full 375 * result set. 376 * </p> 377 * 378 * @param receiverUserId the primary key of the receiving user 379 * @param start the lower bound of the range of results 380 * @param end the upper bound of the range of results (not inclusive) 381 * @return the range of matching social requests 382 * @throws SystemException if a system exception occurred 383 */ 384 public java.util.List<com.liferay.portlet.social.model.SocialRequest> getReceiverUserRequests( 385 long receiverUserId, int start, int end) 386 throws com.liferay.portal.kernel.exception.SystemException { 387 return _socialRequestLocalService.getReceiverUserRequests(receiverUserId, 388 start, end); 389 } 390 391 /** 392 * Returns a range of all the social requests with the given status for the 393 * receiving user. 394 * 395 * <p> 396 * Useful when paginating results. Returns a maximum of <code>end - 397 * start</code> instances. <code>start</code> and <code>end</code> are not 398 * primary keys, they are indexes in the result set. Thus, <code>0</code> 399 * refers to the first result in the set. Setting both <code>start</code> 400 * and <code>end</code> to {@link 401 * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full 402 * result set. 403 * </p> 404 * 405 * @param receiverUserId the primary key of the receiving user 406 * @param status the social request's status 407 * @param start the lower bound of the range of results 408 * @param end the upper bound of the range of results (not inclusive) 409 * @return the range of matching social requests 410 * @throws SystemException if a system exception occurred 411 */ 412 public java.util.List<com.liferay.portlet.social.model.SocialRequest> getReceiverUserRequests( 413 long receiverUserId, int status, int start, int end) 414 throws com.liferay.portal.kernel.exception.SystemException { 415 return _socialRequestLocalService.getReceiverUserRequests(receiverUserId, 416 status, start, end); 417 } 418 419 /** 420 * Returns the number of social requests for the receiving user. 421 * 422 * @param receiverUserId the primary key of the receiving user 423 * @return the number of matching social requests 424 * @throws SystemException if a system exception occurred 425 */ 426 public int getReceiverUserRequestsCount(long receiverUserId) 427 throws com.liferay.portal.kernel.exception.SystemException { 428 return _socialRequestLocalService.getReceiverUserRequestsCount(receiverUserId); 429 } 430 431 /** 432 * Returns the number of social requests with the given status for the 433 * receiving user. 434 * 435 * @param receiverUserId the primary key of the receiving user 436 * @param status the social request's status 437 * @return the number of matching social requests 438 * @throws SystemException if a system exception occurred 439 */ 440 public int getReceiverUserRequestsCount(long receiverUserId, int status) 441 throws com.liferay.portal.kernel.exception.SystemException { 442 return _socialRequestLocalService.getReceiverUserRequestsCount(receiverUserId, 443 status); 444 } 445 446 /** 447 * Returns a range of all the social requests for the requesting user. 448 * 449 * <p> 450 * Useful when paginating results. Returns a maximum of <code>end - 451 * start</code> instances. <code>start</code> and <code>end</code> are not 452 * primary keys, they are indexes in the result set. Thus, <code>0</code> 453 * refers to the first result in the set. Setting both <code>start</code> 454 * and <code>end</code> to {@link 455 * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full 456 * result set. 457 * </p> 458 * 459 * @param userId the primary key of the requesting user 460 * @param start the lower bound of the range of results 461 * @param end the upper bound of the range of results (not inclusive) 462 * @return the range of matching social requests 463 * @throws SystemException if a system exception occurred 464 */ 465 public java.util.List<com.liferay.portlet.social.model.SocialRequest> getUserRequests( 466 long userId, int start, int end) 467 throws com.liferay.portal.kernel.exception.SystemException { 468 return _socialRequestLocalService.getUserRequests(userId, start, end); 469 } 470 471 /** 472 * Returns a range of all the social requests with the given status for the 473 * requesting user. 474 * 475 * <p> 476 * Useful when paginating results. Returns a maximum of <code>end - 477 * start</code> instances. <code>start</code> and <code>end</code> are not 478 * primary keys, they are indexes in the result set. Thus, <code>0</code> 479 * refers to the first result in the set. Setting both <code>start</code> 480 * and <code>end</code> to {@link 481 * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full 482 * result set. 483 * </p> 484 * 485 * @param userId the primary key of the requesting user 486 * @param status the social request's status 487 * @param start the lower bound of the range of results 488 * @param end the upper bound of the range of results (not inclusive) 489 * @return the range of matching social requests 490 * @throws SystemException if a system exception occurred 491 */ 492 public java.util.List<com.liferay.portlet.social.model.SocialRequest> getUserRequests( 493 long userId, int status, int start, int end) 494 throws com.liferay.portal.kernel.exception.SystemException { 495 return _socialRequestLocalService.getUserRequests(userId, status, 496 start, end); 497 } 498 499 /** 500 * Returns the number of social requests for the requesting user. 501 * 502 * @param userId the primary key of the requesting user 503 * @return the number of matching social requests 504 * @throws SystemException if a system exception occurred 505 */ 506 public int getUserRequestsCount(long userId) 507 throws com.liferay.portal.kernel.exception.SystemException { 508 return _socialRequestLocalService.getUserRequestsCount(userId); 509 } 510 511 /** 512 * Returns the number of social requests with the given status for the 513 * requesting user. 514 * 515 * @param userId the primary key of the requesting user 516 * @param status the social request's status 517 * @return the number of matching social request 518 * @throws SystemException if a system exception occurred 519 */ 520 public int getUserRequestsCount(long userId, int status) 521 throws com.liferay.portal.kernel.exception.SystemException { 522 return _socialRequestLocalService.getUserRequestsCount(userId, status); 523 } 524 525 /** 526 * Returns <code>true</code> if a matching social requests exists in the 527 * database. 528 * 529 * @param userId the primary key of the requesting user 530 * @param className the class name of the asset that is the subject of the 531 request 532 * @param classPK the primary key of the asset that is the subject of the 533 request 534 * @param type the request's type 535 * @param status the social request's status 536 * @return <code>true</code> if the request exists; <code>false</code> 537 otherwise 538 * @throws SystemException if a system exception occurred 539 */ 540 public boolean hasRequest(long userId, java.lang.String className, 541 long classPK, int type, int status) 542 throws com.liferay.portal.kernel.exception.SystemException { 543 return _socialRequestLocalService.hasRequest(userId, className, 544 classPK, type, status); 545 } 546 547 /** 548 * Returns <code>true</code> if a matching social request exists in the 549 * database. 550 * 551 * @param userId the primary key of the requesting user 552 * @param className the class name of the asset that is the subject of the 553 request 554 * @param classPK the primary key of the asset that is the subject of the 555 request 556 * @param type the request's type 557 * @param receiverUserId the primary key of the receiving user 558 * @param status the social request's status 559 * @return <code>true</code> if the social request exists; 560 <code>false</code> otherwise 561 * @throws SystemException if a system exception occurred 562 */ 563 public boolean hasRequest(long userId, java.lang.String className, 564 long classPK, int type, long receiverUserId, int status) 565 throws com.liferay.portal.kernel.exception.SystemException { 566 return _socialRequestLocalService.hasRequest(userId, className, 567 classPK, type, receiverUserId, status); 568 } 569 570 /** 571 * Updates the social request replacing its status. 572 * 573 * <p> 574 * If the status is updated to {@link 575 * com.liferay.portlet.social.model.SocialRequestConstants#STATUS_CONFIRM} 576 * then {@link 577 * com.liferay.portlet.social.service.SocialRequestInterpreterLocalService#processConfirmation( 578 * SocialRequest, ThemeDisplay)} is called. If the status is updated to 579 * {@link 580 * com.liferay.portlet.social.model.SocialRequestConstants#STATUS_IGNORE} 581 * then {@link 582 * com.liferay.portlet.social.service.SocialRequestInterpreterLocalService#processRejection( 583 * SocialRequest, ThemeDisplay)} is called. 584 * </p> 585 * 586 * @param requestId the primary key of the social request 587 * @param status the new status 588 * @param themeDisplay the theme display 589 * @return the updated social request 590 * @throws PortalException if the social request could not be found 591 * @throws SystemException if a system exception occurred 592 */ 593 public com.liferay.portlet.social.model.SocialRequest updateRequest( 594 long requestId, int status, 595 com.liferay.portal.theme.ThemeDisplay themeDisplay) 596 throws com.liferay.portal.kernel.exception.PortalException, 597 com.liferay.portal.kernel.exception.SystemException { 598 return _socialRequestLocalService.updateRequest(requestId, status, 599 themeDisplay); 600 } 601 602 /** 603 * @deprecated Renamed to {@link #getWrappedService} 604 */ 605 public SocialRequestLocalService getWrappedSocialRequestLocalService() { 606 return _socialRequestLocalService; 607 } 608 609 /** 610 * @deprecated Renamed to {@link #setWrappedService} 611 */ 612 public void setWrappedSocialRequestLocalService( 613 SocialRequestLocalService socialRequestLocalService) { 614 _socialRequestLocalService = socialRequestLocalService; 615 } 616 617 public SocialRequestLocalService getWrappedService() { 618 return _socialRequestLocalService; 619 } 620 621 public void setWrappedService( 622 SocialRequestLocalService socialRequestLocalService) { 623 _socialRequestLocalService = socialRequestLocalService; 624 } 625 626 private SocialRequestLocalService _socialRequestLocalService; 627 }