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