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