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 * @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 * Returns the Spring bean ID for this bean. 252 * 253 * @return the Spring bean ID for this bean 254 */ 255 public java.lang.String getBeanIdentifier() { 256 return _socialRequestLocalService.getBeanIdentifier(); 257 } 258 259 /** 260 * Sets the Spring bean ID for this bean. 261 * 262 * @param beanIdentifier the Spring bean ID for this bean 263 */ 264 public void setBeanIdentifier(java.lang.String beanIdentifier) { 265 _socialRequestLocalService.setBeanIdentifier(beanIdentifier); 266 } 267 268 /** 269 * Adds a social request to the database. 270 * 271 * <p> 272 * In order to add a social request, both the requesting user and the 273 * receiving user must be from the same company and neither of them can be 274 * the default user. 275 * </p> 276 * 277 * @param userId the primary key of the requesting user 278 * @param groupId the primary key of the group 279 * @param className the class name of the asset that is the subject of the 280 request 281 * @param classPK the primary key of the asset that is the subject of the 282 request 283 * @param type the request's type 284 * @param extraData the extra data regarding the request 285 * @param receiverUserId the primary key of the user receiving the request 286 * @return the social request 287 * @throws PortalException if the users could not be found, if the users 288 were not from the same company, or if either of the users was the 289 default user 290 * @throws SystemException if a system exception occurred 291 */ 292 public com.liferay.portlet.social.model.SocialRequest addRequest( 293 long userId, long groupId, java.lang.String className, long classPK, 294 int type, java.lang.String extraData, long receiverUserId) 295 throws com.liferay.portal.kernel.exception.PortalException, 296 com.liferay.portal.kernel.exception.SystemException { 297 return _socialRequestLocalService.addRequest(userId, groupId, 298 className, classPK, type, extraData, receiverUserId); 299 } 300 301 /** 302 * Removes all the social requests for the receiving user. 303 * 304 * @param receiverUserId the primary key of the receiving user 305 * @throws SystemException if a system exception occurred 306 */ 307 public void deleteReceiverUserRequests(long receiverUserId) 308 throws com.liferay.portal.kernel.exception.SystemException { 309 _socialRequestLocalService.deleteReceiverUserRequests(receiverUserId); 310 } 311 312 /** 313 * Removes the social request identified by its primary key from the 314 * database. 315 * 316 * @param requestId the primary key of the social request 317 * @throws PortalException if the social request could not be found 318 * @throws SystemException if a system exception occurred 319 */ 320 public void deleteRequest(long requestId) 321 throws com.liferay.portal.kernel.exception.PortalException, 322 com.liferay.portal.kernel.exception.SystemException { 323 _socialRequestLocalService.deleteRequest(requestId); 324 } 325 326 /** 327 * Removes the social request from the database. 328 * 329 * @param request the social request to be removed 330 * @throws SystemException if a system exception occurred 331 */ 332 public void deleteRequest( 333 com.liferay.portlet.social.model.SocialRequest request) 334 throws com.liferay.portal.kernel.exception.SystemException { 335 _socialRequestLocalService.deleteRequest(request); 336 } 337 338 /** 339 * Removes all the social requests for the requesting user. 340 * 341 * @param userId the primary key of the requesting user 342 * @throws SystemException if a system exception occurred 343 */ 344 public void deleteUserRequests(long userId) 345 throws com.liferay.portal.kernel.exception.SystemException { 346 _socialRequestLocalService.deleteUserRequests(userId); 347 } 348 349 /** 350 * Returns a range of all the social requests for the receiving user. 351 * 352 * <p> 353 * Useful when paginating results. Returns a maximum of <code>end - 354 * start</code> instances. <code>start</code> and <code>end</code> are not 355 * primary keys, they are indexes in the result set. Thus, <code>0</code> 356 * refers to the first result in the set. Setting both <code>start</code> 357 * and <code>end</code> to {@link 358 * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full 359 * result set. 360 * </p> 361 * 362 * @param receiverUserId the primary key of the receiving user 363 * @param start the lower bound of the range of results 364 * @param end the upper bound of the range of results (not inclusive) 365 * @return the range of matching social requests 366 * @throws SystemException if a system exception occurred 367 */ 368 public java.util.List<com.liferay.portlet.social.model.SocialRequest> getReceiverUserRequests( 369 long receiverUserId, int start, int end) 370 throws com.liferay.portal.kernel.exception.SystemException { 371 return _socialRequestLocalService.getReceiverUserRequests(receiverUserId, 372 start, end); 373 } 374 375 /** 376 * Returns a range of all the social requests with the given status for the 377 * receiving user. 378 * 379 * <p> 380 * Useful when paginating results. Returns a maximum of <code>end - 381 * start</code> instances. <code>start</code> and <code>end</code> are not 382 * primary keys, they are indexes in the result set. Thus, <code>0</code> 383 * refers to the first result in the set. Setting both <code>start</code> 384 * and <code>end</code> to {@link 385 * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full 386 * result set. 387 * </p> 388 * 389 * @param receiverUserId the primary key of the receiving user 390 * @param status the social request's status 391 * @param start the lower bound of the range of results 392 * @param end the upper bound of the range of results (not inclusive) 393 * @return the range of matching social requests 394 * @throws SystemException if a system exception occurred 395 */ 396 public java.util.List<com.liferay.portlet.social.model.SocialRequest> getReceiverUserRequests( 397 long receiverUserId, int status, int start, int end) 398 throws com.liferay.portal.kernel.exception.SystemException { 399 return _socialRequestLocalService.getReceiverUserRequests(receiverUserId, 400 status, start, end); 401 } 402 403 /** 404 * Returns the number of social requests for the receiving user. 405 * 406 * @param receiverUserId the primary key of the receiving user 407 * @return the number of matching social requests 408 * @throws SystemException if a system exception occurred 409 */ 410 public int getReceiverUserRequestsCount(long receiverUserId) 411 throws com.liferay.portal.kernel.exception.SystemException { 412 return _socialRequestLocalService.getReceiverUserRequestsCount(receiverUserId); 413 } 414 415 /** 416 * Returns the number of social requests with the given status for the 417 * receiving user. 418 * 419 * @param receiverUserId the primary key of the receiving user 420 * @param status the social request's status 421 * @return the number of matching social requests 422 * @throws SystemException if a system exception occurred 423 */ 424 public int getReceiverUserRequestsCount(long receiverUserId, int status) 425 throws com.liferay.portal.kernel.exception.SystemException { 426 return _socialRequestLocalService.getReceiverUserRequestsCount(receiverUserId, 427 status); 428 } 429 430 /** 431 * Returns a range of all the social requests for the requesting user. 432 * 433 * <p> 434 * Useful when paginating results. Returns a maximum of <code>end - 435 * start</code> instances. <code>start</code> and <code>end</code> are not 436 * primary keys, they are indexes in the result set. Thus, <code>0</code> 437 * refers to the first result in the set. Setting both <code>start</code> 438 * and <code>end</code> to {@link 439 * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full 440 * result set. 441 * </p> 442 * 443 * @param userId the primary key of the requesting user 444 * @param start the lower bound of the range of results 445 * @param end the upper bound of the range of results (not inclusive) 446 * @return the range of matching social requests 447 * @throws SystemException if a system exception occurred 448 */ 449 public java.util.List<com.liferay.portlet.social.model.SocialRequest> getUserRequests( 450 long userId, int start, int end) 451 throws com.liferay.portal.kernel.exception.SystemException { 452 return _socialRequestLocalService.getUserRequests(userId, start, end); 453 } 454 455 /** 456 * Returns a range of all the social requests with the given status for the 457 * requesting user. 458 * 459 * <p> 460 * Useful when paginating results. Returns a maximum of <code>end - 461 * start</code> instances. <code>start</code> and <code>end</code> are not 462 * primary keys, they are indexes in the result set. Thus, <code>0</code> 463 * refers to the first result in the set. Setting both <code>start</code> 464 * and <code>end</code> to {@link 465 * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full 466 * result set. 467 * </p> 468 * 469 * @param userId the primary key of the requesting user 470 * @param status the social request's status 471 * @param start the lower bound of the range of results 472 * @param end the upper bound of the range of results (not inclusive) 473 * @return the range of matching social requests 474 * @throws SystemException if a system exception occurred 475 */ 476 public java.util.List<com.liferay.portlet.social.model.SocialRequest> getUserRequests( 477 long userId, int status, int start, int end) 478 throws com.liferay.portal.kernel.exception.SystemException { 479 return _socialRequestLocalService.getUserRequests(userId, status, 480 start, end); 481 } 482 483 /** 484 * Returns the number of social requests for the requesting user. 485 * 486 * @param userId the primary key of the requesting user 487 * @return the number of matching social requests 488 * @throws SystemException if a system exception occurred 489 */ 490 public int getUserRequestsCount(long userId) 491 throws com.liferay.portal.kernel.exception.SystemException { 492 return _socialRequestLocalService.getUserRequestsCount(userId); 493 } 494 495 /** 496 * Returns the number of social requests with the given status for the 497 * requesting user. 498 * 499 * @param userId the primary key of the requesting user 500 * @param status the social request's status 501 * @return the number of matching social request 502 * @throws SystemException if a system exception occurred 503 */ 504 public int getUserRequestsCount(long userId, int status) 505 throws com.liferay.portal.kernel.exception.SystemException { 506 return _socialRequestLocalService.getUserRequestsCount(userId, status); 507 } 508 509 /** 510 * Returns <code>true</code> if a matching social requests exists in the 511 * database. 512 * 513 * @param userId the primary key of the requesting user 514 * @param className the class name of the asset that is the subject of the 515 request 516 * @param classPK the primary key of the asset that is the subject of the 517 request 518 * @param type the request's type 519 * @param status the social request's status 520 * @return <code>true</code> if the request exists; <code>false</code> 521 otherwise 522 * @throws SystemException if a system exception occurred 523 */ 524 public boolean hasRequest(long userId, java.lang.String className, 525 long classPK, int type, int status) 526 throws com.liferay.portal.kernel.exception.SystemException { 527 return _socialRequestLocalService.hasRequest(userId, className, 528 classPK, type, status); 529 } 530 531 /** 532 * Returns <code>true</code> if a matching social request exists in the 533 * database. 534 * 535 * @param userId the primary key of the requesting user 536 * @param className the class name of the asset that is the subject of the 537 request 538 * @param classPK the primary key of the asset that is the subject of the 539 request 540 * @param type the request's type 541 * @param receiverUserId the primary key of the receiving user 542 * @param status the social request's status 543 * @return <code>true</code> if the social request exists; 544 <code>false</code> otherwise 545 * @throws SystemException if a system exception occurred 546 */ 547 public boolean hasRequest(long userId, java.lang.String className, 548 long classPK, int type, long receiverUserId, int status) 549 throws com.liferay.portal.kernel.exception.SystemException { 550 return _socialRequestLocalService.hasRequest(userId, className, 551 classPK, type, receiverUserId, status); 552 } 553 554 /** 555 * Updates the social request replacing its status. 556 * 557 * <p> 558 * If the status is updated to {@link 559 * com.liferay.portlet.social.model.SocialRequestConstants#STATUS_CONFIRM} 560 * then {@link 561 * com.liferay.portlet.social.service.SocialRequestInterpreterLocalService#processConfirmation( 562 * SocialRequest, ThemeDisplay)} is called. If the status is updated to 563 * {@link 564 * com.liferay.portlet.social.model.SocialRequestConstants#STATUS_IGNORE} 565 * then {@link 566 * com.liferay.portlet.social.service.SocialRequestInterpreterLocalService#processRejection( 567 * SocialRequest, ThemeDisplay)} is called. 568 * </p> 569 * 570 * @param requestId the primary key of the social request 571 * @param status the new status 572 * @param themeDisplay the theme display 573 * @return the updated social request 574 * @throws PortalException if the social request could not be found 575 * @throws SystemException if a system exception occurred 576 */ 577 public com.liferay.portlet.social.model.SocialRequest updateRequest( 578 long requestId, int status, 579 com.liferay.portal.theme.ThemeDisplay themeDisplay) 580 throws com.liferay.portal.kernel.exception.PortalException, 581 com.liferay.portal.kernel.exception.SystemException { 582 return _socialRequestLocalService.updateRequest(requestId, status, 583 themeDisplay); 584 } 585 586 /** 587 * @deprecated Renamed to {@link #getWrappedService} 588 */ 589 public SocialRequestLocalService getWrappedSocialRequestLocalService() { 590 return _socialRequestLocalService; 591 } 592 593 /** 594 * @deprecated Renamed to {@link #setWrappedService} 595 */ 596 public void setWrappedSocialRequestLocalService( 597 SocialRequestLocalService socialRequestLocalService) { 598 _socialRequestLocalService = socialRequestLocalService; 599 } 600 601 public SocialRequestLocalService getWrappedService() { 602 return _socialRequestLocalService; 603 } 604 605 public void setWrappedService( 606 SocialRequestLocalService socialRequestLocalService) { 607 _socialRequestLocalService = socialRequestLocalService; 608 } 609 610 private SocialRequestLocalService _socialRequestLocalService; 611 }