001 /** 002 * Copyright (c) 2000-present 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.persistence; 016 017 import aQute.bnd.annotation.ProviderType; 018 019 import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil; 020 import com.liferay.portal.kernel.dao.orm.DynamicQuery; 021 import com.liferay.portal.kernel.util.OrderByComparator; 022 import com.liferay.portal.kernel.util.ReferenceRegistry; 023 import com.liferay.portal.service.ServiceContext; 024 025 import com.liferay.portlet.social.model.SocialRelation; 026 027 import java.util.List; 028 029 /** 030 * The persistence utility for the social relation service. This utility wraps {@link com.liferay.portlet.social.service.persistence.impl.SocialRelationPersistenceImpl} and provides direct access to the database for CRUD operations. This utility should only be used by the service layer, as it must operate within a transaction. Never access this utility in a JSP, controller, model, or other front-end class. 031 * 032 * <p> 033 * Caching information and settings can be found in <code>portal.properties</code> 034 * </p> 035 * 036 * @author Brian Wing Shun Chan 037 * @see SocialRelationPersistence 038 * @see com.liferay.portlet.social.service.persistence.impl.SocialRelationPersistenceImpl 039 * @generated 040 */ 041 @ProviderType 042 public class SocialRelationUtil { 043 /* 044 * NOTE FOR DEVELOPERS: 045 * 046 * Never modify this class directly. Modify <code>service.xml</code> and rerun ServiceBuilder to regenerate this class. 047 */ 048 049 /** 050 * @see com.liferay.portal.service.persistence.BasePersistence#clearCache() 051 */ 052 public static void clearCache() { 053 getPersistence().clearCache(); 054 } 055 056 /** 057 * @see com.liferay.portal.service.persistence.BasePersistence#clearCache(com.liferay.portal.model.BaseModel) 058 */ 059 public static void clearCache(SocialRelation socialRelation) { 060 getPersistence().clearCache(socialRelation); 061 } 062 063 /** 064 * @see com.liferay.portal.service.persistence.BasePersistence#countWithDynamicQuery(DynamicQuery) 065 */ 066 public static long countWithDynamicQuery(DynamicQuery dynamicQuery) { 067 return getPersistence().countWithDynamicQuery(dynamicQuery); 068 } 069 070 /** 071 * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery) 072 */ 073 public static List<SocialRelation> findWithDynamicQuery( 074 DynamicQuery dynamicQuery) { 075 return getPersistence().findWithDynamicQuery(dynamicQuery); 076 } 077 078 /** 079 * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery, int, int) 080 */ 081 public static List<SocialRelation> findWithDynamicQuery( 082 DynamicQuery dynamicQuery, int start, int end) { 083 return getPersistence().findWithDynamicQuery(dynamicQuery, start, end); 084 } 085 086 /** 087 * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery, int, int, OrderByComparator) 088 */ 089 public static List<SocialRelation> findWithDynamicQuery( 090 DynamicQuery dynamicQuery, int start, int end, 091 OrderByComparator<SocialRelation> orderByComparator) { 092 return getPersistence() 093 .findWithDynamicQuery(dynamicQuery, start, end, 094 orderByComparator); 095 } 096 097 /** 098 * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel) 099 */ 100 public static SocialRelation update(SocialRelation socialRelation) { 101 return getPersistence().update(socialRelation); 102 } 103 104 /** 105 * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, ServiceContext) 106 */ 107 public static SocialRelation update(SocialRelation socialRelation, 108 ServiceContext serviceContext) { 109 return getPersistence().update(socialRelation, serviceContext); 110 } 111 112 /** 113 * Returns all the social relations where uuid = ?. 114 * 115 * @param uuid the uuid 116 * @return the matching social relations 117 */ 118 public static List<SocialRelation> findByUuid(java.lang.String uuid) { 119 return getPersistence().findByUuid(uuid); 120 } 121 122 /** 123 * Returns a range of all the social relations where uuid = ?. 124 * 125 * <p> 126 * 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 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 QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link SocialRelationModelImpl}. 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. 127 * </p> 128 * 129 * @param uuid the uuid 130 * @param start the lower bound of the range of social relations 131 * @param end the upper bound of the range of social relations (not inclusive) 132 * @return the range of matching social relations 133 */ 134 public static List<SocialRelation> findByUuid(java.lang.String uuid, 135 int start, int end) { 136 return getPersistence().findByUuid(uuid, start, end); 137 } 138 139 /** 140 * Returns an ordered range of all the social relations where uuid = ?. 141 * 142 * <p> 143 * 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 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 QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link SocialRelationModelImpl}. 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. 144 * </p> 145 * 146 * @param uuid the uuid 147 * @param start the lower bound of the range of social relations 148 * @param end the upper bound of the range of social relations (not inclusive) 149 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 150 * @return the ordered range of matching social relations 151 */ 152 public static List<SocialRelation> findByUuid(java.lang.String uuid, 153 int start, int end, OrderByComparator<SocialRelation> orderByComparator) { 154 return getPersistence().findByUuid(uuid, start, end, orderByComparator); 155 } 156 157 /** 158 * Returns the first social relation in the ordered set where uuid = ?. 159 * 160 * @param uuid the uuid 161 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 162 * @return the first matching social relation 163 * @throws NoSuchRelationException if a matching social relation could not be found 164 */ 165 public static SocialRelation findByUuid_First(java.lang.String uuid, 166 OrderByComparator<SocialRelation> orderByComparator) 167 throws com.liferay.portlet.social.NoSuchRelationException { 168 return getPersistence().findByUuid_First(uuid, orderByComparator); 169 } 170 171 /** 172 * Returns the first social relation in the ordered set where uuid = ?. 173 * 174 * @param uuid the uuid 175 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 176 * @return the first matching social relation, or <code>null</code> if a matching social relation could not be found 177 */ 178 public static SocialRelation fetchByUuid_First(java.lang.String uuid, 179 OrderByComparator<SocialRelation> orderByComparator) { 180 return getPersistence().fetchByUuid_First(uuid, orderByComparator); 181 } 182 183 /** 184 * Returns the last social relation in the ordered set where uuid = ?. 185 * 186 * @param uuid the uuid 187 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 188 * @return the last matching social relation 189 * @throws NoSuchRelationException if a matching social relation could not be found 190 */ 191 public static SocialRelation findByUuid_Last(java.lang.String uuid, 192 OrderByComparator<SocialRelation> orderByComparator) 193 throws com.liferay.portlet.social.NoSuchRelationException { 194 return getPersistence().findByUuid_Last(uuid, orderByComparator); 195 } 196 197 /** 198 * Returns the last social relation in the ordered set where uuid = ?. 199 * 200 * @param uuid the uuid 201 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 202 * @return the last matching social relation, or <code>null</code> if a matching social relation could not be found 203 */ 204 public static SocialRelation fetchByUuid_Last(java.lang.String uuid, 205 OrderByComparator<SocialRelation> orderByComparator) { 206 return getPersistence().fetchByUuid_Last(uuid, orderByComparator); 207 } 208 209 /** 210 * Returns the social relations before and after the current social relation in the ordered set where uuid = ?. 211 * 212 * @param relationId the primary key of the current social relation 213 * @param uuid the uuid 214 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 215 * @return the previous, current, and next social relation 216 * @throws NoSuchRelationException if a social relation with the primary key could not be found 217 */ 218 public static SocialRelation[] findByUuid_PrevAndNext(long relationId, 219 java.lang.String uuid, 220 OrderByComparator<SocialRelation> orderByComparator) 221 throws com.liferay.portlet.social.NoSuchRelationException { 222 return getPersistence() 223 .findByUuid_PrevAndNext(relationId, uuid, orderByComparator); 224 } 225 226 /** 227 * Removes all the social relations where uuid = ? from the database. 228 * 229 * @param uuid the uuid 230 */ 231 public static void removeByUuid(java.lang.String uuid) { 232 getPersistence().removeByUuid(uuid); 233 } 234 235 /** 236 * Returns the number of social relations where uuid = ?. 237 * 238 * @param uuid the uuid 239 * @return the number of matching social relations 240 */ 241 public static int countByUuid(java.lang.String uuid) { 242 return getPersistence().countByUuid(uuid); 243 } 244 245 /** 246 * Returns all the social relations where uuid = ? and companyId = ?. 247 * 248 * @param uuid the uuid 249 * @param companyId the company ID 250 * @return the matching social relations 251 */ 252 public static List<SocialRelation> findByUuid_C(java.lang.String uuid, 253 long companyId) { 254 return getPersistence().findByUuid_C(uuid, companyId); 255 } 256 257 /** 258 * Returns a range of all the social relations where uuid = ? and companyId = ?. 259 * 260 * <p> 261 * 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 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 QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link SocialRelationModelImpl}. 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. 262 * </p> 263 * 264 * @param uuid the uuid 265 * @param companyId the company ID 266 * @param start the lower bound of the range of social relations 267 * @param end the upper bound of the range of social relations (not inclusive) 268 * @return the range of matching social relations 269 */ 270 public static List<SocialRelation> findByUuid_C(java.lang.String uuid, 271 long companyId, int start, int end) { 272 return getPersistence().findByUuid_C(uuid, companyId, start, end); 273 } 274 275 /** 276 * Returns an ordered range of all the social relations where uuid = ? and companyId = ?. 277 * 278 * <p> 279 * 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 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 QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link SocialRelationModelImpl}. 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. 280 * </p> 281 * 282 * @param uuid the uuid 283 * @param companyId the company ID 284 * @param start the lower bound of the range of social relations 285 * @param end the upper bound of the range of social relations (not inclusive) 286 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 287 * @return the ordered range of matching social relations 288 */ 289 public static List<SocialRelation> findByUuid_C(java.lang.String uuid, 290 long companyId, int start, int end, 291 OrderByComparator<SocialRelation> orderByComparator) { 292 return getPersistence() 293 .findByUuid_C(uuid, companyId, start, end, orderByComparator); 294 } 295 296 /** 297 * Returns the first social relation in the ordered set where uuid = ? and companyId = ?. 298 * 299 * @param uuid the uuid 300 * @param companyId the company ID 301 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 302 * @return the first matching social relation 303 * @throws NoSuchRelationException if a matching social relation could not be found 304 */ 305 public static SocialRelation findByUuid_C_First(java.lang.String uuid, 306 long companyId, OrderByComparator<SocialRelation> orderByComparator) 307 throws com.liferay.portlet.social.NoSuchRelationException { 308 return getPersistence() 309 .findByUuid_C_First(uuid, companyId, orderByComparator); 310 } 311 312 /** 313 * Returns the first social relation in the ordered set where uuid = ? and companyId = ?. 314 * 315 * @param uuid the uuid 316 * @param companyId the company ID 317 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 318 * @return the first matching social relation, or <code>null</code> if a matching social relation could not be found 319 */ 320 public static SocialRelation fetchByUuid_C_First(java.lang.String uuid, 321 long companyId, OrderByComparator<SocialRelation> orderByComparator) { 322 return getPersistence() 323 .fetchByUuid_C_First(uuid, companyId, orderByComparator); 324 } 325 326 /** 327 * Returns the last social relation in the ordered set where uuid = ? and companyId = ?. 328 * 329 * @param uuid the uuid 330 * @param companyId the company ID 331 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 332 * @return the last matching social relation 333 * @throws NoSuchRelationException if a matching social relation could not be found 334 */ 335 public static SocialRelation findByUuid_C_Last(java.lang.String uuid, 336 long companyId, OrderByComparator<SocialRelation> orderByComparator) 337 throws com.liferay.portlet.social.NoSuchRelationException { 338 return getPersistence() 339 .findByUuid_C_Last(uuid, companyId, orderByComparator); 340 } 341 342 /** 343 * Returns the last social relation in the ordered set where uuid = ? and companyId = ?. 344 * 345 * @param uuid the uuid 346 * @param companyId the company ID 347 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 348 * @return the last matching social relation, or <code>null</code> if a matching social relation could not be found 349 */ 350 public static SocialRelation fetchByUuid_C_Last(java.lang.String uuid, 351 long companyId, OrderByComparator<SocialRelation> orderByComparator) { 352 return getPersistence() 353 .fetchByUuid_C_Last(uuid, companyId, orderByComparator); 354 } 355 356 /** 357 * Returns the social relations before and after the current social relation in the ordered set where uuid = ? and companyId = ?. 358 * 359 * @param relationId the primary key of the current social relation 360 * @param uuid the uuid 361 * @param companyId the company ID 362 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 363 * @return the previous, current, and next social relation 364 * @throws NoSuchRelationException if a social relation with the primary key could not be found 365 */ 366 public static SocialRelation[] findByUuid_C_PrevAndNext(long relationId, 367 java.lang.String uuid, long companyId, 368 OrderByComparator<SocialRelation> orderByComparator) 369 throws com.liferay.portlet.social.NoSuchRelationException { 370 return getPersistence() 371 .findByUuid_C_PrevAndNext(relationId, uuid, companyId, 372 orderByComparator); 373 } 374 375 /** 376 * Removes all the social relations where uuid = ? and companyId = ? from the database. 377 * 378 * @param uuid the uuid 379 * @param companyId the company ID 380 */ 381 public static void removeByUuid_C(java.lang.String uuid, long companyId) { 382 getPersistence().removeByUuid_C(uuid, companyId); 383 } 384 385 /** 386 * Returns the number of social relations where uuid = ? and companyId = ?. 387 * 388 * @param uuid the uuid 389 * @param companyId the company ID 390 * @return the number of matching social relations 391 */ 392 public static int countByUuid_C(java.lang.String uuid, long companyId) { 393 return getPersistence().countByUuid_C(uuid, companyId); 394 } 395 396 /** 397 * Returns all the social relations where companyId = ?. 398 * 399 * @param companyId the company ID 400 * @return the matching social relations 401 */ 402 public static List<SocialRelation> findByCompanyId(long companyId) { 403 return getPersistence().findByCompanyId(companyId); 404 } 405 406 /** 407 * Returns a range of all the social relations where companyId = ?. 408 * 409 * <p> 410 * 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 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 QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link SocialRelationModelImpl}. 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. 411 * </p> 412 * 413 * @param companyId the company ID 414 * @param start the lower bound of the range of social relations 415 * @param end the upper bound of the range of social relations (not inclusive) 416 * @return the range of matching social relations 417 */ 418 public static List<SocialRelation> findByCompanyId(long companyId, 419 int start, int end) { 420 return getPersistence().findByCompanyId(companyId, start, end); 421 } 422 423 /** 424 * Returns an ordered range of all the social relations where companyId = ?. 425 * 426 * <p> 427 * 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 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 QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link SocialRelationModelImpl}. 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. 428 * </p> 429 * 430 * @param companyId the company ID 431 * @param start the lower bound of the range of social relations 432 * @param end the upper bound of the range of social relations (not inclusive) 433 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 434 * @return the ordered range of matching social relations 435 */ 436 public static List<SocialRelation> findByCompanyId(long companyId, 437 int start, int end, OrderByComparator<SocialRelation> orderByComparator) { 438 return getPersistence() 439 .findByCompanyId(companyId, start, end, orderByComparator); 440 } 441 442 /** 443 * Returns the first social relation in the ordered set where companyId = ?. 444 * 445 * @param companyId the company ID 446 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 447 * @return the first matching social relation 448 * @throws NoSuchRelationException if a matching social relation could not be found 449 */ 450 public static SocialRelation findByCompanyId_First(long companyId, 451 OrderByComparator<SocialRelation> orderByComparator) 452 throws com.liferay.portlet.social.NoSuchRelationException { 453 return getPersistence() 454 .findByCompanyId_First(companyId, orderByComparator); 455 } 456 457 /** 458 * Returns the first social relation in the ordered set where companyId = ?. 459 * 460 * @param companyId the company ID 461 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 462 * @return the first matching social relation, or <code>null</code> if a matching social relation could not be found 463 */ 464 public static SocialRelation fetchByCompanyId_First(long companyId, 465 OrderByComparator<SocialRelation> orderByComparator) { 466 return getPersistence() 467 .fetchByCompanyId_First(companyId, orderByComparator); 468 } 469 470 /** 471 * Returns the last social relation in the ordered set where companyId = ?. 472 * 473 * @param companyId the company ID 474 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 475 * @return the last matching social relation 476 * @throws NoSuchRelationException if a matching social relation could not be found 477 */ 478 public static SocialRelation findByCompanyId_Last(long companyId, 479 OrderByComparator<SocialRelation> orderByComparator) 480 throws com.liferay.portlet.social.NoSuchRelationException { 481 return getPersistence() 482 .findByCompanyId_Last(companyId, orderByComparator); 483 } 484 485 /** 486 * Returns the last social relation in the ordered set where companyId = ?. 487 * 488 * @param companyId the company ID 489 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 490 * @return the last matching social relation, or <code>null</code> if a matching social relation could not be found 491 */ 492 public static SocialRelation fetchByCompanyId_Last(long companyId, 493 OrderByComparator<SocialRelation> orderByComparator) { 494 return getPersistence() 495 .fetchByCompanyId_Last(companyId, orderByComparator); 496 } 497 498 /** 499 * Returns the social relations before and after the current social relation in the ordered set where companyId = ?. 500 * 501 * @param relationId the primary key of the current social relation 502 * @param companyId the company ID 503 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 504 * @return the previous, current, and next social relation 505 * @throws NoSuchRelationException if a social relation with the primary key could not be found 506 */ 507 public static SocialRelation[] findByCompanyId_PrevAndNext( 508 long relationId, long companyId, 509 OrderByComparator<SocialRelation> orderByComparator) 510 throws com.liferay.portlet.social.NoSuchRelationException { 511 return getPersistence() 512 .findByCompanyId_PrevAndNext(relationId, companyId, 513 orderByComparator); 514 } 515 516 /** 517 * Removes all the social relations where companyId = ? from the database. 518 * 519 * @param companyId the company ID 520 */ 521 public static void removeByCompanyId(long companyId) { 522 getPersistence().removeByCompanyId(companyId); 523 } 524 525 /** 526 * Returns the number of social relations where companyId = ?. 527 * 528 * @param companyId the company ID 529 * @return the number of matching social relations 530 */ 531 public static int countByCompanyId(long companyId) { 532 return getPersistence().countByCompanyId(companyId); 533 } 534 535 /** 536 * Returns all the social relations where userId1 = ?. 537 * 538 * @param userId1 the user id1 539 * @return the matching social relations 540 */ 541 public static List<SocialRelation> findByUserId1(long userId1) { 542 return getPersistence().findByUserId1(userId1); 543 } 544 545 /** 546 * Returns a range of all the social relations where userId1 = ?. 547 * 548 * <p> 549 * 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 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 QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link SocialRelationModelImpl}. 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. 550 * </p> 551 * 552 * @param userId1 the user id1 553 * @param start the lower bound of the range of social relations 554 * @param end the upper bound of the range of social relations (not inclusive) 555 * @return the range of matching social relations 556 */ 557 public static List<SocialRelation> findByUserId1(long userId1, int start, 558 int end) { 559 return getPersistence().findByUserId1(userId1, start, end); 560 } 561 562 /** 563 * Returns an ordered range of all the social relations where userId1 = ?. 564 * 565 * <p> 566 * 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 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 QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link SocialRelationModelImpl}. 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. 567 * </p> 568 * 569 * @param userId1 the user id1 570 * @param start the lower bound of the range of social relations 571 * @param end the upper bound of the range of social relations (not inclusive) 572 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 573 * @return the ordered range of matching social relations 574 */ 575 public static List<SocialRelation> findByUserId1(long userId1, int start, 576 int end, OrderByComparator<SocialRelation> orderByComparator) { 577 return getPersistence() 578 .findByUserId1(userId1, start, end, orderByComparator); 579 } 580 581 /** 582 * Returns the first social relation in the ordered set where userId1 = ?. 583 * 584 * @param userId1 the user id1 585 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 586 * @return the first matching social relation 587 * @throws NoSuchRelationException if a matching social relation could not be found 588 */ 589 public static SocialRelation findByUserId1_First(long userId1, 590 OrderByComparator<SocialRelation> orderByComparator) 591 throws com.liferay.portlet.social.NoSuchRelationException { 592 return getPersistence().findByUserId1_First(userId1, orderByComparator); 593 } 594 595 /** 596 * Returns the first social relation in the ordered set where userId1 = ?. 597 * 598 * @param userId1 the user id1 599 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 600 * @return the first matching social relation, or <code>null</code> if a matching social relation could not be found 601 */ 602 public static SocialRelation fetchByUserId1_First(long userId1, 603 OrderByComparator<SocialRelation> orderByComparator) { 604 return getPersistence().fetchByUserId1_First(userId1, orderByComparator); 605 } 606 607 /** 608 * Returns the last social relation in the ordered set where userId1 = ?. 609 * 610 * @param userId1 the user id1 611 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 612 * @return the last matching social relation 613 * @throws NoSuchRelationException if a matching social relation could not be found 614 */ 615 public static SocialRelation findByUserId1_Last(long userId1, 616 OrderByComparator<SocialRelation> orderByComparator) 617 throws com.liferay.portlet.social.NoSuchRelationException { 618 return getPersistence().findByUserId1_Last(userId1, orderByComparator); 619 } 620 621 /** 622 * Returns the last social relation in the ordered set where userId1 = ?. 623 * 624 * @param userId1 the user id1 625 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 626 * @return the last matching social relation, or <code>null</code> if a matching social relation could not be found 627 */ 628 public static SocialRelation fetchByUserId1_Last(long userId1, 629 OrderByComparator<SocialRelation> orderByComparator) { 630 return getPersistence().fetchByUserId1_Last(userId1, orderByComparator); 631 } 632 633 /** 634 * Returns the social relations before and after the current social relation in the ordered set where userId1 = ?. 635 * 636 * @param relationId the primary key of the current social relation 637 * @param userId1 the user id1 638 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 639 * @return the previous, current, and next social relation 640 * @throws NoSuchRelationException if a social relation with the primary key could not be found 641 */ 642 public static SocialRelation[] findByUserId1_PrevAndNext(long relationId, 643 long userId1, OrderByComparator<SocialRelation> orderByComparator) 644 throws com.liferay.portlet.social.NoSuchRelationException { 645 return getPersistence() 646 .findByUserId1_PrevAndNext(relationId, userId1, 647 orderByComparator); 648 } 649 650 /** 651 * Removes all the social relations where userId1 = ? from the database. 652 * 653 * @param userId1 the user id1 654 */ 655 public static void removeByUserId1(long userId1) { 656 getPersistence().removeByUserId1(userId1); 657 } 658 659 /** 660 * Returns the number of social relations where userId1 = ?. 661 * 662 * @param userId1 the user id1 663 * @return the number of matching social relations 664 */ 665 public static int countByUserId1(long userId1) { 666 return getPersistence().countByUserId1(userId1); 667 } 668 669 /** 670 * Returns all the social relations where userId2 = ?. 671 * 672 * @param userId2 the user id2 673 * @return the matching social relations 674 */ 675 public static List<SocialRelation> findByUserId2(long userId2) { 676 return getPersistence().findByUserId2(userId2); 677 } 678 679 /** 680 * Returns a range of all the social relations where userId2 = ?. 681 * 682 * <p> 683 * 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 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 QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link SocialRelationModelImpl}. 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. 684 * </p> 685 * 686 * @param userId2 the user id2 687 * @param start the lower bound of the range of social relations 688 * @param end the upper bound of the range of social relations (not inclusive) 689 * @return the range of matching social relations 690 */ 691 public static List<SocialRelation> findByUserId2(long userId2, int start, 692 int end) { 693 return getPersistence().findByUserId2(userId2, start, end); 694 } 695 696 /** 697 * Returns an ordered range of all the social relations where userId2 = ?. 698 * 699 * <p> 700 * 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 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 QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link SocialRelationModelImpl}. 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. 701 * </p> 702 * 703 * @param userId2 the user id2 704 * @param start the lower bound of the range of social relations 705 * @param end the upper bound of the range of social relations (not inclusive) 706 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 707 * @return the ordered range of matching social relations 708 */ 709 public static List<SocialRelation> findByUserId2(long userId2, int start, 710 int end, OrderByComparator<SocialRelation> orderByComparator) { 711 return getPersistence() 712 .findByUserId2(userId2, start, end, orderByComparator); 713 } 714 715 /** 716 * Returns the first social relation in the ordered set where userId2 = ?. 717 * 718 * @param userId2 the user id2 719 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 720 * @return the first matching social relation 721 * @throws NoSuchRelationException if a matching social relation could not be found 722 */ 723 public static SocialRelation findByUserId2_First(long userId2, 724 OrderByComparator<SocialRelation> orderByComparator) 725 throws com.liferay.portlet.social.NoSuchRelationException { 726 return getPersistence().findByUserId2_First(userId2, orderByComparator); 727 } 728 729 /** 730 * Returns the first social relation in the ordered set where userId2 = ?. 731 * 732 * @param userId2 the user id2 733 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 734 * @return the first matching social relation, or <code>null</code> if a matching social relation could not be found 735 */ 736 public static SocialRelation fetchByUserId2_First(long userId2, 737 OrderByComparator<SocialRelation> orderByComparator) { 738 return getPersistence().fetchByUserId2_First(userId2, orderByComparator); 739 } 740 741 /** 742 * Returns the last social relation in the ordered set where userId2 = ?. 743 * 744 * @param userId2 the user id2 745 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 746 * @return the last matching social relation 747 * @throws NoSuchRelationException if a matching social relation could not be found 748 */ 749 public static SocialRelation findByUserId2_Last(long userId2, 750 OrderByComparator<SocialRelation> orderByComparator) 751 throws com.liferay.portlet.social.NoSuchRelationException { 752 return getPersistence().findByUserId2_Last(userId2, orderByComparator); 753 } 754 755 /** 756 * Returns the last social relation in the ordered set where userId2 = ?. 757 * 758 * @param userId2 the user id2 759 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 760 * @return the last matching social relation, or <code>null</code> if a matching social relation could not be found 761 */ 762 public static SocialRelation fetchByUserId2_Last(long userId2, 763 OrderByComparator<SocialRelation> orderByComparator) { 764 return getPersistence().fetchByUserId2_Last(userId2, orderByComparator); 765 } 766 767 /** 768 * Returns the social relations before and after the current social relation in the ordered set where userId2 = ?. 769 * 770 * @param relationId the primary key of the current social relation 771 * @param userId2 the user id2 772 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 773 * @return the previous, current, and next social relation 774 * @throws NoSuchRelationException if a social relation with the primary key could not be found 775 */ 776 public static SocialRelation[] findByUserId2_PrevAndNext(long relationId, 777 long userId2, OrderByComparator<SocialRelation> orderByComparator) 778 throws com.liferay.portlet.social.NoSuchRelationException { 779 return getPersistence() 780 .findByUserId2_PrevAndNext(relationId, userId2, 781 orderByComparator); 782 } 783 784 /** 785 * Removes all the social relations where userId2 = ? from the database. 786 * 787 * @param userId2 the user id2 788 */ 789 public static void removeByUserId2(long userId2) { 790 getPersistence().removeByUserId2(userId2); 791 } 792 793 /** 794 * Returns the number of social relations where userId2 = ?. 795 * 796 * @param userId2 the user id2 797 * @return the number of matching social relations 798 */ 799 public static int countByUserId2(long userId2) { 800 return getPersistence().countByUserId2(userId2); 801 } 802 803 /** 804 * Returns all the social relations where type = ?. 805 * 806 * @param type the type 807 * @return the matching social relations 808 */ 809 public static List<SocialRelation> findByType(int type) { 810 return getPersistence().findByType(type); 811 } 812 813 /** 814 * Returns a range of all the social relations where type = ?. 815 * 816 * <p> 817 * 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 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 QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link SocialRelationModelImpl}. 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. 818 * </p> 819 * 820 * @param type the type 821 * @param start the lower bound of the range of social relations 822 * @param end the upper bound of the range of social relations (not inclusive) 823 * @return the range of matching social relations 824 */ 825 public static List<SocialRelation> findByType(int type, int start, int end) { 826 return getPersistence().findByType(type, start, end); 827 } 828 829 /** 830 * Returns an ordered range of all the social relations where type = ?. 831 * 832 * <p> 833 * 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 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 QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link SocialRelationModelImpl}. 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. 834 * </p> 835 * 836 * @param type the type 837 * @param start the lower bound of the range of social relations 838 * @param end the upper bound of the range of social relations (not inclusive) 839 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 840 * @return the ordered range of matching social relations 841 */ 842 public static List<SocialRelation> findByType(int type, int start, int end, 843 OrderByComparator<SocialRelation> orderByComparator) { 844 return getPersistence().findByType(type, start, end, orderByComparator); 845 } 846 847 /** 848 * Returns the first social relation in the ordered set where type = ?. 849 * 850 * @param type the type 851 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 852 * @return the first matching social relation 853 * @throws NoSuchRelationException if a matching social relation could not be found 854 */ 855 public static SocialRelation findByType_First(int type, 856 OrderByComparator<SocialRelation> orderByComparator) 857 throws com.liferay.portlet.social.NoSuchRelationException { 858 return getPersistence().findByType_First(type, orderByComparator); 859 } 860 861 /** 862 * Returns the first social relation in the ordered set where type = ?. 863 * 864 * @param type the type 865 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 866 * @return the first matching social relation, or <code>null</code> if a matching social relation could not be found 867 */ 868 public static SocialRelation fetchByType_First(int type, 869 OrderByComparator<SocialRelation> orderByComparator) { 870 return getPersistence().fetchByType_First(type, orderByComparator); 871 } 872 873 /** 874 * Returns the last social relation in the ordered set where type = ?. 875 * 876 * @param type the type 877 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 878 * @return the last matching social relation 879 * @throws NoSuchRelationException if a matching social relation could not be found 880 */ 881 public static SocialRelation findByType_Last(int type, 882 OrderByComparator<SocialRelation> orderByComparator) 883 throws com.liferay.portlet.social.NoSuchRelationException { 884 return getPersistence().findByType_Last(type, orderByComparator); 885 } 886 887 /** 888 * Returns the last social relation in the ordered set where type = ?. 889 * 890 * @param type the type 891 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 892 * @return the last matching social relation, or <code>null</code> if a matching social relation could not be found 893 */ 894 public static SocialRelation fetchByType_Last(int type, 895 OrderByComparator<SocialRelation> orderByComparator) { 896 return getPersistence().fetchByType_Last(type, orderByComparator); 897 } 898 899 /** 900 * Returns the social relations before and after the current social relation in the ordered set where type = ?. 901 * 902 * @param relationId the primary key of the current social relation 903 * @param type the type 904 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 905 * @return the previous, current, and next social relation 906 * @throws NoSuchRelationException if a social relation with the primary key could not be found 907 */ 908 public static SocialRelation[] findByType_PrevAndNext(long relationId, 909 int type, OrderByComparator<SocialRelation> orderByComparator) 910 throws com.liferay.portlet.social.NoSuchRelationException { 911 return getPersistence() 912 .findByType_PrevAndNext(relationId, type, orderByComparator); 913 } 914 915 /** 916 * Removes all the social relations where type = ? from the database. 917 * 918 * @param type the type 919 */ 920 public static void removeByType(int type) { 921 getPersistence().removeByType(type); 922 } 923 924 /** 925 * Returns the number of social relations where type = ?. 926 * 927 * @param type the type 928 * @return the number of matching social relations 929 */ 930 public static int countByType(int type) { 931 return getPersistence().countByType(type); 932 } 933 934 /** 935 * Returns all the social relations where companyId = ? and type = ?. 936 * 937 * @param companyId the company ID 938 * @param type the type 939 * @return the matching social relations 940 */ 941 public static List<SocialRelation> findByC_T(long companyId, int type) { 942 return getPersistence().findByC_T(companyId, type); 943 } 944 945 /** 946 * Returns a range of all the social relations where companyId = ? and type = ?. 947 * 948 * <p> 949 * 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 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 QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link SocialRelationModelImpl}. 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. 950 * </p> 951 * 952 * @param companyId the company ID 953 * @param type the type 954 * @param start the lower bound of the range of social relations 955 * @param end the upper bound of the range of social relations (not inclusive) 956 * @return the range of matching social relations 957 */ 958 public static List<SocialRelation> findByC_T(long companyId, int type, 959 int start, int end) { 960 return getPersistence().findByC_T(companyId, type, start, end); 961 } 962 963 /** 964 * Returns an ordered range of all the social relations where companyId = ? and type = ?. 965 * 966 * <p> 967 * 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 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 QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link SocialRelationModelImpl}. 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. 968 * </p> 969 * 970 * @param companyId the company ID 971 * @param type the type 972 * @param start the lower bound of the range of social relations 973 * @param end the upper bound of the range of social relations (not inclusive) 974 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 975 * @return the ordered range of matching social relations 976 */ 977 public static List<SocialRelation> findByC_T(long companyId, int type, 978 int start, int end, OrderByComparator<SocialRelation> orderByComparator) { 979 return getPersistence() 980 .findByC_T(companyId, type, start, end, orderByComparator); 981 } 982 983 /** 984 * Returns the first social relation in the ordered set where companyId = ? and type = ?. 985 * 986 * @param companyId the company ID 987 * @param type the type 988 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 989 * @return the first matching social relation 990 * @throws NoSuchRelationException if a matching social relation could not be found 991 */ 992 public static SocialRelation findByC_T_First(long companyId, int type, 993 OrderByComparator<SocialRelation> orderByComparator) 994 throws com.liferay.portlet.social.NoSuchRelationException { 995 return getPersistence() 996 .findByC_T_First(companyId, type, orderByComparator); 997 } 998 999 /** 1000 * Returns the first social relation in the ordered set where companyId = ? and type = ?. 1001 * 1002 * @param companyId the company ID 1003 * @param type the type 1004 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 1005 * @return the first matching social relation, or <code>null</code> if a matching social relation could not be found 1006 */ 1007 public static SocialRelation fetchByC_T_First(long companyId, int type, 1008 OrderByComparator<SocialRelation> orderByComparator) { 1009 return getPersistence() 1010 .fetchByC_T_First(companyId, type, orderByComparator); 1011 } 1012 1013 /** 1014 * Returns the last social relation in the ordered set where companyId = ? and type = ?. 1015 * 1016 * @param companyId the company ID 1017 * @param type the type 1018 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 1019 * @return the last matching social relation 1020 * @throws NoSuchRelationException if a matching social relation could not be found 1021 */ 1022 public static SocialRelation findByC_T_Last(long companyId, int type, 1023 OrderByComparator<SocialRelation> orderByComparator) 1024 throws com.liferay.portlet.social.NoSuchRelationException { 1025 return getPersistence() 1026 .findByC_T_Last(companyId, type, orderByComparator); 1027 } 1028 1029 /** 1030 * Returns the last social relation in the ordered set where companyId = ? and type = ?. 1031 * 1032 * @param companyId the company ID 1033 * @param type the type 1034 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 1035 * @return the last matching social relation, or <code>null</code> if a matching social relation could not be found 1036 */ 1037 public static SocialRelation fetchByC_T_Last(long companyId, int type, 1038 OrderByComparator<SocialRelation> orderByComparator) { 1039 return getPersistence() 1040 .fetchByC_T_Last(companyId, type, orderByComparator); 1041 } 1042 1043 /** 1044 * Returns the social relations before and after the current social relation in the ordered set where companyId = ? and type = ?. 1045 * 1046 * @param relationId the primary key of the current social relation 1047 * @param companyId the company ID 1048 * @param type the type 1049 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 1050 * @return the previous, current, and next social relation 1051 * @throws NoSuchRelationException if a social relation with the primary key could not be found 1052 */ 1053 public static SocialRelation[] findByC_T_PrevAndNext(long relationId, 1054 long companyId, int type, 1055 OrderByComparator<SocialRelation> orderByComparator) 1056 throws com.liferay.portlet.social.NoSuchRelationException { 1057 return getPersistence() 1058 .findByC_T_PrevAndNext(relationId, companyId, type, 1059 orderByComparator); 1060 } 1061 1062 /** 1063 * Removes all the social relations where companyId = ? and type = ? from the database. 1064 * 1065 * @param companyId the company ID 1066 * @param type the type 1067 */ 1068 public static void removeByC_T(long companyId, int type) { 1069 getPersistence().removeByC_T(companyId, type); 1070 } 1071 1072 /** 1073 * Returns the number of social relations where companyId = ? and type = ?. 1074 * 1075 * @param companyId the company ID 1076 * @param type the type 1077 * @return the number of matching social relations 1078 */ 1079 public static int countByC_T(long companyId, int type) { 1080 return getPersistence().countByC_T(companyId, type); 1081 } 1082 1083 /** 1084 * Returns all the social relations where userId1 = ? and userId2 = ?. 1085 * 1086 * @param userId1 the user id1 1087 * @param userId2 the user id2 1088 * @return the matching social relations 1089 */ 1090 public static List<SocialRelation> findByU1_U2(long userId1, long userId2) { 1091 return getPersistence().findByU1_U2(userId1, userId2); 1092 } 1093 1094 /** 1095 * Returns a range of all the social relations where userId1 = ? and userId2 = ?. 1096 * 1097 * <p> 1098 * 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 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 QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link SocialRelationModelImpl}. 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. 1099 * </p> 1100 * 1101 * @param userId1 the user id1 1102 * @param userId2 the user id2 1103 * @param start the lower bound of the range of social relations 1104 * @param end the upper bound of the range of social relations (not inclusive) 1105 * @return the range of matching social relations 1106 */ 1107 public static List<SocialRelation> findByU1_U2(long userId1, long userId2, 1108 int start, int end) { 1109 return getPersistence().findByU1_U2(userId1, userId2, start, end); 1110 } 1111 1112 /** 1113 * Returns an ordered range of all the social relations where userId1 = ? and userId2 = ?. 1114 * 1115 * <p> 1116 * 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 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 QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link SocialRelationModelImpl}. 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. 1117 * </p> 1118 * 1119 * @param userId1 the user id1 1120 * @param userId2 the user id2 1121 * @param start the lower bound of the range of social relations 1122 * @param end the upper bound of the range of social relations (not inclusive) 1123 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 1124 * @return the ordered range of matching social relations 1125 */ 1126 public static List<SocialRelation> findByU1_U2(long userId1, long userId2, 1127 int start, int end, OrderByComparator<SocialRelation> orderByComparator) { 1128 return getPersistence() 1129 .findByU1_U2(userId1, userId2, start, end, orderByComparator); 1130 } 1131 1132 /** 1133 * Returns the first social relation in the ordered set where userId1 = ? and userId2 = ?. 1134 * 1135 * @param userId1 the user id1 1136 * @param userId2 the user id2 1137 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 1138 * @return the first matching social relation 1139 * @throws NoSuchRelationException if a matching social relation could not be found 1140 */ 1141 public static SocialRelation findByU1_U2_First(long userId1, long userId2, 1142 OrderByComparator<SocialRelation> orderByComparator) 1143 throws com.liferay.portlet.social.NoSuchRelationException { 1144 return getPersistence() 1145 .findByU1_U2_First(userId1, userId2, orderByComparator); 1146 } 1147 1148 /** 1149 * Returns the first social relation in the ordered set where userId1 = ? and userId2 = ?. 1150 * 1151 * @param userId1 the user id1 1152 * @param userId2 the user id2 1153 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 1154 * @return the first matching social relation, or <code>null</code> if a matching social relation could not be found 1155 */ 1156 public static SocialRelation fetchByU1_U2_First(long userId1, long userId2, 1157 OrderByComparator<SocialRelation> orderByComparator) { 1158 return getPersistence() 1159 .fetchByU1_U2_First(userId1, userId2, orderByComparator); 1160 } 1161 1162 /** 1163 * Returns the last social relation in the ordered set where userId1 = ? and userId2 = ?. 1164 * 1165 * @param userId1 the user id1 1166 * @param userId2 the user id2 1167 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 1168 * @return the last matching social relation 1169 * @throws NoSuchRelationException if a matching social relation could not be found 1170 */ 1171 public static SocialRelation findByU1_U2_Last(long userId1, long userId2, 1172 OrderByComparator<SocialRelation> orderByComparator) 1173 throws com.liferay.portlet.social.NoSuchRelationException { 1174 return getPersistence() 1175 .findByU1_U2_Last(userId1, userId2, orderByComparator); 1176 } 1177 1178 /** 1179 * Returns the last social relation in the ordered set where userId1 = ? and userId2 = ?. 1180 * 1181 * @param userId1 the user id1 1182 * @param userId2 the user id2 1183 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 1184 * @return the last matching social relation, or <code>null</code> if a matching social relation could not be found 1185 */ 1186 public static SocialRelation fetchByU1_U2_Last(long userId1, long userId2, 1187 OrderByComparator<SocialRelation> orderByComparator) { 1188 return getPersistence() 1189 .fetchByU1_U2_Last(userId1, userId2, orderByComparator); 1190 } 1191 1192 /** 1193 * Returns the social relations before and after the current social relation in the ordered set where userId1 = ? and userId2 = ?. 1194 * 1195 * @param relationId the primary key of the current social relation 1196 * @param userId1 the user id1 1197 * @param userId2 the user id2 1198 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 1199 * @return the previous, current, and next social relation 1200 * @throws NoSuchRelationException if a social relation with the primary key could not be found 1201 */ 1202 public static SocialRelation[] findByU1_U2_PrevAndNext(long relationId, 1203 long userId1, long userId2, 1204 OrderByComparator<SocialRelation> orderByComparator) 1205 throws com.liferay.portlet.social.NoSuchRelationException { 1206 return getPersistence() 1207 .findByU1_U2_PrevAndNext(relationId, userId1, userId2, 1208 orderByComparator); 1209 } 1210 1211 /** 1212 * Removes all the social relations where userId1 = ? and userId2 = ? from the database. 1213 * 1214 * @param userId1 the user id1 1215 * @param userId2 the user id2 1216 */ 1217 public static void removeByU1_U2(long userId1, long userId2) { 1218 getPersistence().removeByU1_U2(userId1, userId2); 1219 } 1220 1221 /** 1222 * Returns the number of social relations where userId1 = ? and userId2 = ?. 1223 * 1224 * @param userId1 the user id1 1225 * @param userId2 the user id2 1226 * @return the number of matching social relations 1227 */ 1228 public static int countByU1_U2(long userId1, long userId2) { 1229 return getPersistence().countByU1_U2(userId1, userId2); 1230 } 1231 1232 /** 1233 * Returns all the social relations where userId1 = ? and type = ?. 1234 * 1235 * @param userId1 the user id1 1236 * @param type the type 1237 * @return the matching social relations 1238 */ 1239 public static List<SocialRelation> findByU1_T(long userId1, int type) { 1240 return getPersistence().findByU1_T(userId1, type); 1241 } 1242 1243 /** 1244 * Returns a range of all the social relations where userId1 = ? and type = ?. 1245 * 1246 * <p> 1247 * 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 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 QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link SocialRelationModelImpl}. 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. 1248 * </p> 1249 * 1250 * @param userId1 the user id1 1251 * @param type the type 1252 * @param start the lower bound of the range of social relations 1253 * @param end the upper bound of the range of social relations (not inclusive) 1254 * @return the range of matching social relations 1255 */ 1256 public static List<SocialRelation> findByU1_T(long userId1, int type, 1257 int start, int end) { 1258 return getPersistence().findByU1_T(userId1, type, start, end); 1259 } 1260 1261 /** 1262 * Returns an ordered range of all the social relations where userId1 = ? and type = ?. 1263 * 1264 * <p> 1265 * 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 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 QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link SocialRelationModelImpl}. 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. 1266 * </p> 1267 * 1268 * @param userId1 the user id1 1269 * @param type the type 1270 * @param start the lower bound of the range of social relations 1271 * @param end the upper bound of the range of social relations (not inclusive) 1272 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 1273 * @return the ordered range of matching social relations 1274 */ 1275 public static List<SocialRelation> findByU1_T(long userId1, int type, 1276 int start, int end, OrderByComparator<SocialRelation> orderByComparator) { 1277 return getPersistence() 1278 .findByU1_T(userId1, type, start, end, orderByComparator); 1279 } 1280 1281 /** 1282 * Returns the first social relation in the ordered set where userId1 = ? and type = ?. 1283 * 1284 * @param userId1 the user id1 1285 * @param type the type 1286 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 1287 * @return the first matching social relation 1288 * @throws NoSuchRelationException if a matching social relation could not be found 1289 */ 1290 public static SocialRelation findByU1_T_First(long userId1, int type, 1291 OrderByComparator<SocialRelation> orderByComparator) 1292 throws com.liferay.portlet.social.NoSuchRelationException { 1293 return getPersistence() 1294 .findByU1_T_First(userId1, type, orderByComparator); 1295 } 1296 1297 /** 1298 * Returns the first social relation in the ordered set where userId1 = ? and type = ?. 1299 * 1300 * @param userId1 the user id1 1301 * @param type the type 1302 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 1303 * @return the first matching social relation, or <code>null</code> if a matching social relation could not be found 1304 */ 1305 public static SocialRelation fetchByU1_T_First(long userId1, int type, 1306 OrderByComparator<SocialRelation> orderByComparator) { 1307 return getPersistence() 1308 .fetchByU1_T_First(userId1, type, orderByComparator); 1309 } 1310 1311 /** 1312 * Returns the last social relation in the ordered set where userId1 = ? and type = ?. 1313 * 1314 * @param userId1 the user id1 1315 * @param type the type 1316 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 1317 * @return the last matching social relation 1318 * @throws NoSuchRelationException if a matching social relation could not be found 1319 */ 1320 public static SocialRelation findByU1_T_Last(long userId1, int type, 1321 OrderByComparator<SocialRelation> orderByComparator) 1322 throws com.liferay.portlet.social.NoSuchRelationException { 1323 return getPersistence().findByU1_T_Last(userId1, type, orderByComparator); 1324 } 1325 1326 /** 1327 * Returns the last social relation in the ordered set where userId1 = ? and type = ?. 1328 * 1329 * @param userId1 the user id1 1330 * @param type the type 1331 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 1332 * @return the last matching social relation, or <code>null</code> if a matching social relation could not be found 1333 */ 1334 public static SocialRelation fetchByU1_T_Last(long userId1, int type, 1335 OrderByComparator<SocialRelation> orderByComparator) { 1336 return getPersistence() 1337 .fetchByU1_T_Last(userId1, type, orderByComparator); 1338 } 1339 1340 /** 1341 * Returns the social relations before and after the current social relation in the ordered set where userId1 = ? and type = ?. 1342 * 1343 * @param relationId the primary key of the current social relation 1344 * @param userId1 the user id1 1345 * @param type the type 1346 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 1347 * @return the previous, current, and next social relation 1348 * @throws NoSuchRelationException if a social relation with the primary key could not be found 1349 */ 1350 public static SocialRelation[] findByU1_T_PrevAndNext(long relationId, 1351 long userId1, int type, 1352 OrderByComparator<SocialRelation> orderByComparator) 1353 throws com.liferay.portlet.social.NoSuchRelationException { 1354 return getPersistence() 1355 .findByU1_T_PrevAndNext(relationId, userId1, type, 1356 orderByComparator); 1357 } 1358 1359 /** 1360 * Removes all the social relations where userId1 = ? and type = ? from the database. 1361 * 1362 * @param userId1 the user id1 1363 * @param type the type 1364 */ 1365 public static void removeByU1_T(long userId1, int type) { 1366 getPersistence().removeByU1_T(userId1, type); 1367 } 1368 1369 /** 1370 * Returns the number of social relations where userId1 = ? and type = ?. 1371 * 1372 * @param userId1 the user id1 1373 * @param type the type 1374 * @return the number of matching social relations 1375 */ 1376 public static int countByU1_T(long userId1, int type) { 1377 return getPersistence().countByU1_T(userId1, type); 1378 } 1379 1380 /** 1381 * Returns all the social relations where userId2 = ? and type = ?. 1382 * 1383 * @param userId2 the user id2 1384 * @param type the type 1385 * @return the matching social relations 1386 */ 1387 public static List<SocialRelation> findByU2_T(long userId2, int type) { 1388 return getPersistence().findByU2_T(userId2, type); 1389 } 1390 1391 /** 1392 * Returns a range of all the social relations where userId2 = ? and type = ?. 1393 * 1394 * <p> 1395 * 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 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 QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link SocialRelationModelImpl}. 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. 1396 * </p> 1397 * 1398 * @param userId2 the user id2 1399 * @param type the type 1400 * @param start the lower bound of the range of social relations 1401 * @param end the upper bound of the range of social relations (not inclusive) 1402 * @return the range of matching social relations 1403 */ 1404 public static List<SocialRelation> findByU2_T(long userId2, int type, 1405 int start, int end) { 1406 return getPersistence().findByU2_T(userId2, type, start, end); 1407 } 1408 1409 /** 1410 * Returns an ordered range of all the social relations where userId2 = ? and type = ?. 1411 * 1412 * <p> 1413 * 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 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 QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link SocialRelationModelImpl}. 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. 1414 * </p> 1415 * 1416 * @param userId2 the user id2 1417 * @param type the type 1418 * @param start the lower bound of the range of social relations 1419 * @param end the upper bound of the range of social relations (not inclusive) 1420 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 1421 * @return the ordered range of matching social relations 1422 */ 1423 public static List<SocialRelation> findByU2_T(long userId2, int type, 1424 int start, int end, OrderByComparator<SocialRelation> orderByComparator) { 1425 return getPersistence() 1426 .findByU2_T(userId2, type, start, end, orderByComparator); 1427 } 1428 1429 /** 1430 * Returns the first social relation in the ordered set where userId2 = ? and type = ?. 1431 * 1432 * @param userId2 the user id2 1433 * @param type the type 1434 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 1435 * @return the first matching social relation 1436 * @throws NoSuchRelationException if a matching social relation could not be found 1437 */ 1438 public static SocialRelation findByU2_T_First(long userId2, int type, 1439 OrderByComparator<SocialRelation> orderByComparator) 1440 throws com.liferay.portlet.social.NoSuchRelationException { 1441 return getPersistence() 1442 .findByU2_T_First(userId2, type, orderByComparator); 1443 } 1444 1445 /** 1446 * Returns the first social relation in the ordered set where userId2 = ? and type = ?. 1447 * 1448 * @param userId2 the user id2 1449 * @param type the type 1450 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 1451 * @return the first matching social relation, or <code>null</code> if a matching social relation could not be found 1452 */ 1453 public static SocialRelation fetchByU2_T_First(long userId2, int type, 1454 OrderByComparator<SocialRelation> orderByComparator) { 1455 return getPersistence() 1456 .fetchByU2_T_First(userId2, type, orderByComparator); 1457 } 1458 1459 /** 1460 * Returns the last social relation in the ordered set where userId2 = ? and type = ?. 1461 * 1462 * @param userId2 the user id2 1463 * @param type the type 1464 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 1465 * @return the last matching social relation 1466 * @throws NoSuchRelationException if a matching social relation could not be found 1467 */ 1468 public static SocialRelation findByU2_T_Last(long userId2, int type, 1469 OrderByComparator<SocialRelation> orderByComparator) 1470 throws com.liferay.portlet.social.NoSuchRelationException { 1471 return getPersistence().findByU2_T_Last(userId2, type, orderByComparator); 1472 } 1473 1474 /** 1475 * Returns the last social relation in the ordered set where userId2 = ? and type = ?. 1476 * 1477 * @param userId2 the user id2 1478 * @param type the type 1479 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 1480 * @return the last matching social relation, or <code>null</code> if a matching social relation could not be found 1481 */ 1482 public static SocialRelation fetchByU2_T_Last(long userId2, int type, 1483 OrderByComparator<SocialRelation> orderByComparator) { 1484 return getPersistence() 1485 .fetchByU2_T_Last(userId2, type, orderByComparator); 1486 } 1487 1488 /** 1489 * Returns the social relations before and after the current social relation in the ordered set where userId2 = ? and type = ?. 1490 * 1491 * @param relationId the primary key of the current social relation 1492 * @param userId2 the user id2 1493 * @param type the type 1494 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 1495 * @return the previous, current, and next social relation 1496 * @throws NoSuchRelationException if a social relation with the primary key could not be found 1497 */ 1498 public static SocialRelation[] findByU2_T_PrevAndNext(long relationId, 1499 long userId2, int type, 1500 OrderByComparator<SocialRelation> orderByComparator) 1501 throws com.liferay.portlet.social.NoSuchRelationException { 1502 return getPersistence() 1503 .findByU2_T_PrevAndNext(relationId, userId2, type, 1504 orderByComparator); 1505 } 1506 1507 /** 1508 * Removes all the social relations where userId2 = ? and type = ? from the database. 1509 * 1510 * @param userId2 the user id2 1511 * @param type the type 1512 */ 1513 public static void removeByU2_T(long userId2, int type) { 1514 getPersistence().removeByU2_T(userId2, type); 1515 } 1516 1517 /** 1518 * Returns the number of social relations where userId2 = ? and type = ?. 1519 * 1520 * @param userId2 the user id2 1521 * @param type the type 1522 * @return the number of matching social relations 1523 */ 1524 public static int countByU2_T(long userId2, int type) { 1525 return getPersistence().countByU2_T(userId2, type); 1526 } 1527 1528 /** 1529 * Returns the social relation where userId1 = ? and userId2 = ? and type = ? or throws a {@link NoSuchRelationException} if it could not be found. 1530 * 1531 * @param userId1 the user id1 1532 * @param userId2 the user id2 1533 * @param type the type 1534 * @return the matching social relation 1535 * @throws NoSuchRelationException if a matching social relation could not be found 1536 */ 1537 public static SocialRelation findByU1_U2_T(long userId1, long userId2, 1538 int type) throws com.liferay.portlet.social.NoSuchRelationException { 1539 return getPersistence().findByU1_U2_T(userId1, userId2, type); 1540 } 1541 1542 /** 1543 * Returns the social relation where userId1 = ? and userId2 = ? and type = ? or returns <code>null</code> if it could not be found. Uses the finder cache. 1544 * 1545 * @param userId1 the user id1 1546 * @param userId2 the user id2 1547 * @param type the type 1548 * @return the matching social relation, or <code>null</code> if a matching social relation could not be found 1549 */ 1550 public static SocialRelation fetchByU1_U2_T(long userId1, long userId2, 1551 int type) { 1552 return getPersistence().fetchByU1_U2_T(userId1, userId2, type); 1553 } 1554 1555 /** 1556 * Returns the social relation where userId1 = ? and userId2 = ? and type = ? or returns <code>null</code> if it could not be found, optionally using the finder cache. 1557 * 1558 * @param userId1 the user id1 1559 * @param userId2 the user id2 1560 * @param type the type 1561 * @param retrieveFromCache whether to use the finder cache 1562 * @return the matching social relation, or <code>null</code> if a matching social relation could not be found 1563 */ 1564 public static SocialRelation fetchByU1_U2_T(long userId1, long userId2, 1565 int type, boolean retrieveFromCache) { 1566 return getPersistence() 1567 .fetchByU1_U2_T(userId1, userId2, type, retrieveFromCache); 1568 } 1569 1570 /** 1571 * Removes the social relation where userId1 = ? and userId2 = ? and type = ? from the database. 1572 * 1573 * @param userId1 the user id1 1574 * @param userId2 the user id2 1575 * @param type the type 1576 * @return the social relation that was removed 1577 */ 1578 public static SocialRelation removeByU1_U2_T(long userId1, long userId2, 1579 int type) throws com.liferay.portlet.social.NoSuchRelationException { 1580 return getPersistence().removeByU1_U2_T(userId1, userId2, type); 1581 } 1582 1583 /** 1584 * Returns the number of social relations where userId1 = ? and userId2 = ? and type = ?. 1585 * 1586 * @param userId1 the user id1 1587 * @param userId2 the user id2 1588 * @param type the type 1589 * @return the number of matching social relations 1590 */ 1591 public static int countByU1_U2_T(long userId1, long userId2, int type) { 1592 return getPersistence().countByU1_U2_T(userId1, userId2, type); 1593 } 1594 1595 /** 1596 * Caches the social relation in the entity cache if it is enabled. 1597 * 1598 * @param socialRelation the social relation 1599 */ 1600 public static void cacheResult(SocialRelation socialRelation) { 1601 getPersistence().cacheResult(socialRelation); 1602 } 1603 1604 /** 1605 * Caches the social relations in the entity cache if it is enabled. 1606 * 1607 * @param socialRelations the social relations 1608 */ 1609 public static void cacheResult(List<SocialRelation> socialRelations) { 1610 getPersistence().cacheResult(socialRelations); 1611 } 1612 1613 /** 1614 * Creates a new social relation with the primary key. Does not add the social relation to the database. 1615 * 1616 * @param relationId the primary key for the new social relation 1617 * @return the new social relation 1618 */ 1619 public static SocialRelation create(long relationId) { 1620 return getPersistence().create(relationId); 1621 } 1622 1623 /** 1624 * Removes the social relation with the primary key from the database. Also notifies the appropriate model listeners. 1625 * 1626 * @param relationId the primary key of the social relation 1627 * @return the social relation that was removed 1628 * @throws NoSuchRelationException if a social relation with the primary key could not be found 1629 */ 1630 public static SocialRelation remove(long relationId) 1631 throws com.liferay.portlet.social.NoSuchRelationException { 1632 return getPersistence().remove(relationId); 1633 } 1634 1635 public static SocialRelation updateImpl(SocialRelation socialRelation) { 1636 return getPersistence().updateImpl(socialRelation); 1637 } 1638 1639 /** 1640 * Returns the social relation with the primary key or throws a {@link NoSuchRelationException} if it could not be found. 1641 * 1642 * @param relationId the primary key of the social relation 1643 * @return the social relation 1644 * @throws NoSuchRelationException if a social relation with the primary key could not be found 1645 */ 1646 public static SocialRelation findByPrimaryKey(long relationId) 1647 throws com.liferay.portlet.social.NoSuchRelationException { 1648 return getPersistence().findByPrimaryKey(relationId); 1649 } 1650 1651 /** 1652 * Returns the social relation with the primary key or returns <code>null</code> if it could not be found. 1653 * 1654 * @param relationId the primary key of the social relation 1655 * @return the social relation, or <code>null</code> if a social relation with the primary key could not be found 1656 */ 1657 public static SocialRelation fetchByPrimaryKey(long relationId) { 1658 return getPersistence().fetchByPrimaryKey(relationId); 1659 } 1660 1661 public static java.util.Map<java.io.Serializable, SocialRelation> fetchByPrimaryKeys( 1662 java.util.Set<java.io.Serializable> primaryKeys) { 1663 return getPersistence().fetchByPrimaryKeys(primaryKeys); 1664 } 1665 1666 /** 1667 * Returns all the social relations. 1668 * 1669 * @return the social relations 1670 */ 1671 public static List<SocialRelation> findAll() { 1672 return getPersistence().findAll(); 1673 } 1674 1675 /** 1676 * Returns a range of all the social relations. 1677 * 1678 * <p> 1679 * 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 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 QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link SocialRelationModelImpl}. 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. 1680 * </p> 1681 * 1682 * @param start the lower bound of the range of social relations 1683 * @param end the upper bound of the range of social relations (not inclusive) 1684 * @return the range of social relations 1685 */ 1686 public static List<SocialRelation> findAll(int start, int end) { 1687 return getPersistence().findAll(start, end); 1688 } 1689 1690 /** 1691 * Returns an ordered range of all the social relations. 1692 * 1693 * <p> 1694 * 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 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 QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link SocialRelationModelImpl}. 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. 1695 * </p> 1696 * 1697 * @param start the lower bound of the range of social relations 1698 * @param end the upper bound of the range of social relations (not inclusive) 1699 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 1700 * @return the ordered range of social relations 1701 */ 1702 public static List<SocialRelation> findAll(int start, int end, 1703 OrderByComparator<SocialRelation> orderByComparator) { 1704 return getPersistence().findAll(start, end, orderByComparator); 1705 } 1706 1707 /** 1708 * Removes all the social relations from the database. 1709 */ 1710 public static void removeAll() { 1711 getPersistence().removeAll(); 1712 } 1713 1714 /** 1715 * Returns the number of social relations. 1716 * 1717 * @return the number of social relations 1718 */ 1719 public static int countAll() { 1720 return getPersistence().countAll(); 1721 } 1722 1723 public static SocialRelationPersistence getPersistence() { 1724 if (_persistence == null) { 1725 _persistence = (SocialRelationPersistence)PortalBeanLocatorUtil.locate(SocialRelationPersistence.class.getName()); 1726 1727 ReferenceRegistry.registerReference(SocialRelationUtil.class, 1728 "_persistence"); 1729 } 1730 1731 return _persistence; 1732 } 1733 1734 /** 1735 * @deprecated As of 6.2.0 1736 */ 1737 @Deprecated 1738 public void setPersistence(SocialRelationPersistence persistence) { 1739 } 1740 1741 private static SocialRelationPersistence _persistence; 1742 }