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