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