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