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