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