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.documentlibrary.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.documentlibrary.model.DLFileRank; 026 027 import java.util.List; 028 029 /** 030 * The persistence utility for the document library file rank service. This utility wraps {@link com.liferay.portlet.documentlibrary.service.persistence.impl.DLFileRankPersistenceImpl} 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 DLFileRankPersistence 038 * @see com.liferay.portlet.documentlibrary.service.persistence.impl.DLFileRankPersistenceImpl 039 * @generated 040 */ 041 @ProviderType 042 public class DLFileRankUtil { 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(DLFileRank dlFileRank) { 060 getPersistence().clearCache(dlFileRank); 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<DLFileRank> 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<DLFileRank> 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<DLFileRank> findWithDynamicQuery( 090 DynamicQuery dynamicQuery, int start, int end, 091 OrderByComparator<DLFileRank> 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 DLFileRank update(DLFileRank dlFileRank) { 101 return getPersistence().update(dlFileRank); 102 } 103 104 /** 105 * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, ServiceContext) 106 */ 107 public static DLFileRank update(DLFileRank dlFileRank, 108 ServiceContext serviceContext) { 109 return getPersistence().update(dlFileRank, serviceContext); 110 } 111 112 /** 113 * Returns all the document library file ranks where userId = ?. 114 * 115 * @param userId the user ID 116 * @return the matching document library file ranks 117 */ 118 public static List<DLFileRank> findByUserId(long userId) { 119 return getPersistence().findByUserId(userId); 120 } 121 122 /** 123 * Returns a range of all the document library file ranks where userId = ?. 124 * 125 * <p> 126 * 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 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 QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link DLFileRankModelImpl}. 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. 127 * </p> 128 * 129 * @param userId the user ID 130 * @param start the lower bound of the range of document library file ranks 131 * @param end the upper bound of the range of document library file ranks (not inclusive) 132 * @return the range of matching document library file ranks 133 */ 134 public static List<DLFileRank> findByUserId(long userId, int start, int end) { 135 return getPersistence().findByUserId(userId, start, end); 136 } 137 138 /** 139 * Returns an ordered range of all the document library file ranks where userId = ?. 140 * 141 * <p> 142 * 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 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 QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link DLFileRankModelImpl}. 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. 143 * </p> 144 * 145 * @param userId the user ID 146 * @param start the lower bound of the range of document library file ranks 147 * @param end the upper bound of the range of document library file ranks (not inclusive) 148 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 149 * @return the ordered range of matching document library file ranks 150 */ 151 public static List<DLFileRank> findByUserId(long userId, int start, 152 int end, OrderByComparator<DLFileRank> orderByComparator) { 153 return getPersistence() 154 .findByUserId(userId, start, end, orderByComparator); 155 } 156 157 /** 158 * Returns the first document library file rank in the ordered set where userId = ?. 159 * 160 * @param userId the user ID 161 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 162 * @return the first matching document library file rank 163 * @throws NoSuchFileRankException if a matching document library file rank could not be found 164 */ 165 public static DLFileRank findByUserId_First(long userId, 166 OrderByComparator<DLFileRank> orderByComparator) 167 throws com.liferay.portlet.documentlibrary.NoSuchFileRankException { 168 return getPersistence().findByUserId_First(userId, orderByComparator); 169 } 170 171 /** 172 * Returns the first document library file rank in the ordered set where userId = ?. 173 * 174 * @param userId the user ID 175 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 176 * @return the first matching document library file rank, or <code>null</code> if a matching document library file rank could not be found 177 */ 178 public static DLFileRank fetchByUserId_First(long userId, 179 OrderByComparator<DLFileRank> orderByComparator) { 180 return getPersistence().fetchByUserId_First(userId, orderByComparator); 181 } 182 183 /** 184 * Returns the last document library file rank in the ordered set where userId = ?. 185 * 186 * @param userId the user ID 187 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 188 * @return the last matching document library file rank 189 * @throws NoSuchFileRankException if a matching document library file rank could not be found 190 */ 191 public static DLFileRank findByUserId_Last(long userId, 192 OrderByComparator<DLFileRank> orderByComparator) 193 throws com.liferay.portlet.documentlibrary.NoSuchFileRankException { 194 return getPersistence().findByUserId_Last(userId, orderByComparator); 195 } 196 197 /** 198 * Returns the last document library file rank in the ordered set where userId = ?. 199 * 200 * @param userId the user ID 201 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 202 * @return the last matching document library file rank, or <code>null</code> if a matching document library file rank could not be found 203 */ 204 public static DLFileRank fetchByUserId_Last(long userId, 205 OrderByComparator<DLFileRank> orderByComparator) { 206 return getPersistence().fetchByUserId_Last(userId, orderByComparator); 207 } 208 209 /** 210 * Returns the document library file ranks before and after the current document library file rank in the ordered set where userId = ?. 211 * 212 * @param fileRankId the primary key of the current document library file rank 213 * @param userId the user ID 214 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 215 * @return the previous, current, and next document library file rank 216 * @throws NoSuchFileRankException if a document library file rank with the primary key could not be found 217 */ 218 public static DLFileRank[] findByUserId_PrevAndNext(long fileRankId, 219 long userId, OrderByComparator<DLFileRank> orderByComparator) 220 throws com.liferay.portlet.documentlibrary.NoSuchFileRankException { 221 return getPersistence() 222 .findByUserId_PrevAndNext(fileRankId, userId, 223 orderByComparator); 224 } 225 226 /** 227 * Removes all the document library file ranks where userId = ? from the database. 228 * 229 * @param userId the user ID 230 */ 231 public static void removeByUserId(long userId) { 232 getPersistence().removeByUserId(userId); 233 } 234 235 /** 236 * Returns the number of document library file ranks where userId = ?. 237 * 238 * @param userId the user ID 239 * @return the number of matching document library file ranks 240 */ 241 public static int countByUserId(long userId) { 242 return getPersistence().countByUserId(userId); 243 } 244 245 /** 246 * Returns all the document library file ranks where fileEntryId = ?. 247 * 248 * @param fileEntryId the file entry ID 249 * @return the matching document library file ranks 250 */ 251 public static List<DLFileRank> findByFileEntryId(long fileEntryId) { 252 return getPersistence().findByFileEntryId(fileEntryId); 253 } 254 255 /** 256 * Returns a range of all the document library file ranks where fileEntryId = ?. 257 * 258 * <p> 259 * 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 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 QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link DLFileRankModelImpl}. 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. 260 * </p> 261 * 262 * @param fileEntryId the file entry ID 263 * @param start the lower bound of the range of document library file ranks 264 * @param end the upper bound of the range of document library file ranks (not inclusive) 265 * @return the range of matching document library file ranks 266 */ 267 public static List<DLFileRank> findByFileEntryId(long fileEntryId, 268 int start, int end) { 269 return getPersistence().findByFileEntryId(fileEntryId, start, end); 270 } 271 272 /** 273 * Returns an ordered range of all the document library file ranks where fileEntryId = ?. 274 * 275 * <p> 276 * 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 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 QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link DLFileRankModelImpl}. 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. 277 * </p> 278 * 279 * @param fileEntryId the file entry ID 280 * @param start the lower bound of the range of document library file ranks 281 * @param end the upper bound of the range of document library file ranks (not inclusive) 282 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 283 * @return the ordered range of matching document library file ranks 284 */ 285 public static List<DLFileRank> findByFileEntryId(long fileEntryId, 286 int start, int end, OrderByComparator<DLFileRank> orderByComparator) { 287 return getPersistence() 288 .findByFileEntryId(fileEntryId, start, end, orderByComparator); 289 } 290 291 /** 292 * Returns the first document library file rank in the ordered set where fileEntryId = ?. 293 * 294 * @param fileEntryId the file entry ID 295 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 296 * @return the first matching document library file rank 297 * @throws NoSuchFileRankException if a matching document library file rank could not be found 298 */ 299 public static DLFileRank findByFileEntryId_First(long fileEntryId, 300 OrderByComparator<DLFileRank> orderByComparator) 301 throws com.liferay.portlet.documentlibrary.NoSuchFileRankException { 302 return getPersistence() 303 .findByFileEntryId_First(fileEntryId, orderByComparator); 304 } 305 306 /** 307 * Returns the first document library file rank in the ordered set where fileEntryId = ?. 308 * 309 * @param fileEntryId the file entry ID 310 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 311 * @return the first matching document library file rank, or <code>null</code> if a matching document library file rank could not be found 312 */ 313 public static DLFileRank fetchByFileEntryId_First(long fileEntryId, 314 OrderByComparator<DLFileRank> orderByComparator) { 315 return getPersistence() 316 .fetchByFileEntryId_First(fileEntryId, orderByComparator); 317 } 318 319 /** 320 * Returns the last document library file rank in the ordered set where fileEntryId = ?. 321 * 322 * @param fileEntryId the file entry ID 323 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 324 * @return the last matching document library file rank 325 * @throws NoSuchFileRankException if a matching document library file rank could not be found 326 */ 327 public static DLFileRank findByFileEntryId_Last(long fileEntryId, 328 OrderByComparator<DLFileRank> orderByComparator) 329 throws com.liferay.portlet.documentlibrary.NoSuchFileRankException { 330 return getPersistence() 331 .findByFileEntryId_Last(fileEntryId, orderByComparator); 332 } 333 334 /** 335 * Returns the last document library file rank in the ordered set where fileEntryId = ?. 336 * 337 * @param fileEntryId the file entry ID 338 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 339 * @return the last matching document library file rank, or <code>null</code> if a matching document library file rank could not be found 340 */ 341 public static DLFileRank fetchByFileEntryId_Last(long fileEntryId, 342 OrderByComparator<DLFileRank> orderByComparator) { 343 return getPersistence() 344 .fetchByFileEntryId_Last(fileEntryId, orderByComparator); 345 } 346 347 /** 348 * Returns the document library file ranks before and after the current document library file rank in the ordered set where fileEntryId = ?. 349 * 350 * @param fileRankId the primary key of the current document library file rank 351 * @param fileEntryId the file entry ID 352 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 353 * @return the previous, current, and next document library file rank 354 * @throws NoSuchFileRankException if a document library file rank with the primary key could not be found 355 */ 356 public static DLFileRank[] findByFileEntryId_PrevAndNext(long fileRankId, 357 long fileEntryId, OrderByComparator<DLFileRank> orderByComparator) 358 throws com.liferay.portlet.documentlibrary.NoSuchFileRankException { 359 return getPersistence() 360 .findByFileEntryId_PrevAndNext(fileRankId, fileEntryId, 361 orderByComparator); 362 } 363 364 /** 365 * Removes all the document library file ranks where fileEntryId = ? from the database. 366 * 367 * @param fileEntryId the file entry ID 368 */ 369 public static void removeByFileEntryId(long fileEntryId) { 370 getPersistence().removeByFileEntryId(fileEntryId); 371 } 372 373 /** 374 * Returns the number of document library file ranks where fileEntryId = ?. 375 * 376 * @param fileEntryId the file entry ID 377 * @return the number of matching document library file ranks 378 */ 379 public static int countByFileEntryId(long fileEntryId) { 380 return getPersistence().countByFileEntryId(fileEntryId); 381 } 382 383 /** 384 * Returns all the document library file ranks where groupId = ? and userId = ?. 385 * 386 * @param groupId the group ID 387 * @param userId the user ID 388 * @return the matching document library file ranks 389 */ 390 public static List<DLFileRank> findByG_U(long groupId, long userId) { 391 return getPersistence().findByG_U(groupId, userId); 392 } 393 394 /** 395 * Returns a range of all the document library file ranks where groupId = ? and userId = ?. 396 * 397 * <p> 398 * 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 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 QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link DLFileRankModelImpl}. 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. 399 * </p> 400 * 401 * @param groupId the group ID 402 * @param userId the user ID 403 * @param start the lower bound of the range of document library file ranks 404 * @param end the upper bound of the range of document library file ranks (not inclusive) 405 * @return the range of matching document library file ranks 406 */ 407 public static List<DLFileRank> findByG_U(long groupId, long userId, 408 int start, int end) { 409 return getPersistence().findByG_U(groupId, userId, start, end); 410 } 411 412 /** 413 * Returns an ordered range of all the document library file ranks where groupId = ? and userId = ?. 414 * 415 * <p> 416 * 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 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 QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link DLFileRankModelImpl}. 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. 417 * </p> 418 * 419 * @param groupId the group ID 420 * @param userId the user ID 421 * @param start the lower bound of the range of document library file ranks 422 * @param end the upper bound of the range of document library file ranks (not inclusive) 423 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 424 * @return the ordered range of matching document library file ranks 425 */ 426 public static List<DLFileRank> findByG_U(long groupId, long userId, 427 int start, int end, OrderByComparator<DLFileRank> orderByComparator) { 428 return getPersistence() 429 .findByG_U(groupId, userId, start, end, orderByComparator); 430 } 431 432 /** 433 * Returns the first document library file rank in the ordered set where groupId = ? and userId = ?. 434 * 435 * @param groupId the group ID 436 * @param userId the user ID 437 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 438 * @return the first matching document library file rank 439 * @throws NoSuchFileRankException if a matching document library file rank could not be found 440 */ 441 public static DLFileRank findByG_U_First(long groupId, long userId, 442 OrderByComparator<DLFileRank> orderByComparator) 443 throws com.liferay.portlet.documentlibrary.NoSuchFileRankException { 444 return getPersistence() 445 .findByG_U_First(groupId, userId, orderByComparator); 446 } 447 448 /** 449 * Returns the first document library file rank in the ordered set where groupId = ? and userId = ?. 450 * 451 * @param groupId the group ID 452 * @param userId the user ID 453 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 454 * @return the first matching document library file rank, or <code>null</code> if a matching document library file rank could not be found 455 */ 456 public static DLFileRank fetchByG_U_First(long groupId, long userId, 457 OrderByComparator<DLFileRank> orderByComparator) { 458 return getPersistence() 459 .fetchByG_U_First(groupId, userId, orderByComparator); 460 } 461 462 /** 463 * Returns the last document library file rank in the ordered set where groupId = ? and userId = ?. 464 * 465 * @param groupId the group ID 466 * @param userId the user ID 467 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 468 * @return the last matching document library file rank 469 * @throws NoSuchFileRankException if a matching document library file rank could not be found 470 */ 471 public static DLFileRank findByG_U_Last(long groupId, long userId, 472 OrderByComparator<DLFileRank> orderByComparator) 473 throws com.liferay.portlet.documentlibrary.NoSuchFileRankException { 474 return getPersistence() 475 .findByG_U_Last(groupId, userId, orderByComparator); 476 } 477 478 /** 479 * Returns the last document library file rank in the ordered set where groupId = ? and userId = ?. 480 * 481 * @param groupId the group ID 482 * @param userId the user ID 483 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 484 * @return the last matching document library file rank, or <code>null</code> if a matching document library file rank could not be found 485 */ 486 public static DLFileRank fetchByG_U_Last(long groupId, long userId, 487 OrderByComparator<DLFileRank> orderByComparator) { 488 return getPersistence() 489 .fetchByG_U_Last(groupId, userId, orderByComparator); 490 } 491 492 /** 493 * Returns the document library file ranks before and after the current document library file rank in the ordered set where groupId = ? and userId = ?. 494 * 495 * @param fileRankId the primary key of the current document library file rank 496 * @param groupId the group ID 497 * @param userId the user ID 498 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 499 * @return the previous, current, and next document library file rank 500 * @throws NoSuchFileRankException if a document library file rank with the primary key could not be found 501 */ 502 public static DLFileRank[] findByG_U_PrevAndNext(long fileRankId, 503 long groupId, long userId, 504 OrderByComparator<DLFileRank> orderByComparator) 505 throws com.liferay.portlet.documentlibrary.NoSuchFileRankException { 506 return getPersistence() 507 .findByG_U_PrevAndNext(fileRankId, groupId, userId, 508 orderByComparator); 509 } 510 511 /** 512 * Removes all the document library file ranks where groupId = ? and userId = ? from the database. 513 * 514 * @param groupId the group ID 515 * @param userId the user ID 516 */ 517 public static void removeByG_U(long groupId, long userId) { 518 getPersistence().removeByG_U(groupId, userId); 519 } 520 521 /** 522 * Returns the number of document library file ranks where groupId = ? and userId = ?. 523 * 524 * @param groupId the group ID 525 * @param userId the user ID 526 * @return the number of matching document library file ranks 527 */ 528 public static int countByG_U(long groupId, long userId) { 529 return getPersistence().countByG_U(groupId, userId); 530 } 531 532 /** 533 * Returns all the document library file ranks where groupId = ? and userId = ? and active = ?. 534 * 535 * @param groupId the group ID 536 * @param userId the user ID 537 * @param active the active 538 * @return the matching document library file ranks 539 */ 540 public static List<DLFileRank> findByG_U_A(long groupId, long userId, 541 boolean active) { 542 return getPersistence().findByG_U_A(groupId, userId, active); 543 } 544 545 /** 546 * Returns a range of all the document library file ranks where groupId = ? and userId = ? and active = ?. 547 * 548 * <p> 549 * 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 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 QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link DLFileRankModelImpl}. 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. 550 * </p> 551 * 552 * @param groupId the group ID 553 * @param userId the user ID 554 * @param active the active 555 * @param start the lower bound of the range of document library file ranks 556 * @param end the upper bound of the range of document library file ranks (not inclusive) 557 * @return the range of matching document library file ranks 558 */ 559 public static List<DLFileRank> findByG_U_A(long groupId, long userId, 560 boolean active, int start, int end) { 561 return getPersistence().findByG_U_A(groupId, userId, active, start, end); 562 } 563 564 /** 565 * Returns an ordered range of all the document library file ranks where groupId = ? and userId = ? and active = ?. 566 * 567 * <p> 568 * 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 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 QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link DLFileRankModelImpl}. 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. 569 * </p> 570 * 571 * @param groupId the group ID 572 * @param userId the user ID 573 * @param active the active 574 * @param start the lower bound of the range of document library file ranks 575 * @param end the upper bound of the range of document library file ranks (not inclusive) 576 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 577 * @return the ordered range of matching document library file ranks 578 */ 579 public static List<DLFileRank> findByG_U_A(long groupId, long userId, 580 boolean active, int start, int end, 581 OrderByComparator<DLFileRank> orderByComparator) { 582 return getPersistence() 583 .findByG_U_A(groupId, userId, active, start, end, 584 orderByComparator); 585 } 586 587 /** 588 * Returns the first document library file rank in the ordered set where groupId = ? and userId = ? and active = ?. 589 * 590 * @param groupId the group ID 591 * @param userId the user ID 592 * @param active the active 593 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 594 * @return the first matching document library file rank 595 * @throws NoSuchFileRankException if a matching document library file rank could not be found 596 */ 597 public static DLFileRank findByG_U_A_First(long groupId, long userId, 598 boolean active, OrderByComparator<DLFileRank> orderByComparator) 599 throws com.liferay.portlet.documentlibrary.NoSuchFileRankException { 600 return getPersistence() 601 .findByG_U_A_First(groupId, userId, active, orderByComparator); 602 } 603 604 /** 605 * Returns the first document library file rank in the ordered set where groupId = ? and userId = ? and active = ?. 606 * 607 * @param groupId the group ID 608 * @param userId the user ID 609 * @param active the active 610 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 611 * @return the first matching document library file rank, or <code>null</code> if a matching document library file rank could not be found 612 */ 613 public static DLFileRank fetchByG_U_A_First(long groupId, long userId, 614 boolean active, OrderByComparator<DLFileRank> orderByComparator) { 615 return getPersistence() 616 .fetchByG_U_A_First(groupId, userId, active, 617 orderByComparator); 618 } 619 620 /** 621 * Returns the last document library file rank in the ordered set where groupId = ? and userId = ? and active = ?. 622 * 623 * @param groupId the group ID 624 * @param userId the user ID 625 * @param active the active 626 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 627 * @return the last matching document library file rank 628 * @throws NoSuchFileRankException if a matching document library file rank could not be found 629 */ 630 public static DLFileRank findByG_U_A_Last(long groupId, long userId, 631 boolean active, OrderByComparator<DLFileRank> orderByComparator) 632 throws com.liferay.portlet.documentlibrary.NoSuchFileRankException { 633 return getPersistence() 634 .findByG_U_A_Last(groupId, userId, active, orderByComparator); 635 } 636 637 /** 638 * Returns the last document library file rank in the ordered set where groupId = ? and userId = ? and active = ?. 639 * 640 * @param groupId the group ID 641 * @param userId the user ID 642 * @param active the active 643 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 644 * @return the last matching document library file rank, or <code>null</code> if a matching document library file rank could not be found 645 */ 646 public static DLFileRank fetchByG_U_A_Last(long groupId, long userId, 647 boolean active, OrderByComparator<DLFileRank> orderByComparator) { 648 return getPersistence() 649 .fetchByG_U_A_Last(groupId, userId, active, orderByComparator); 650 } 651 652 /** 653 * Returns the document library file ranks before and after the current document library file rank in the ordered set where groupId = ? and userId = ? and active = ?. 654 * 655 * @param fileRankId the primary key of the current document library file rank 656 * @param groupId the group ID 657 * @param userId the user ID 658 * @param active the active 659 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 660 * @return the previous, current, and next document library file rank 661 * @throws NoSuchFileRankException if a document library file rank with the primary key could not be found 662 */ 663 public static DLFileRank[] findByG_U_A_PrevAndNext(long fileRankId, 664 long groupId, long userId, boolean active, 665 OrderByComparator<DLFileRank> orderByComparator) 666 throws com.liferay.portlet.documentlibrary.NoSuchFileRankException { 667 return getPersistence() 668 .findByG_U_A_PrevAndNext(fileRankId, groupId, userId, 669 active, orderByComparator); 670 } 671 672 /** 673 * Removes all the document library file ranks where groupId = ? and userId = ? and active = ? from the database. 674 * 675 * @param groupId the group ID 676 * @param userId the user ID 677 * @param active the active 678 */ 679 public static void removeByG_U_A(long groupId, long userId, boolean active) { 680 getPersistence().removeByG_U_A(groupId, userId, active); 681 } 682 683 /** 684 * Returns the number of document library file ranks where groupId = ? and userId = ? and active = ?. 685 * 686 * @param groupId the group ID 687 * @param userId the user ID 688 * @param active the active 689 * @return the number of matching document library file ranks 690 */ 691 public static int countByG_U_A(long groupId, long userId, boolean active) { 692 return getPersistence().countByG_U_A(groupId, userId, active); 693 } 694 695 /** 696 * Returns the document library file rank where companyId = ? and userId = ? and fileEntryId = ? or throws a {@link NoSuchFileRankException} if it could not be found. 697 * 698 * @param companyId the company ID 699 * @param userId the user ID 700 * @param fileEntryId the file entry ID 701 * @return the matching document library file rank 702 * @throws NoSuchFileRankException if a matching document library file rank could not be found 703 */ 704 public static DLFileRank findByC_U_F(long companyId, long userId, 705 long fileEntryId) 706 throws com.liferay.portlet.documentlibrary.NoSuchFileRankException { 707 return getPersistence().findByC_U_F(companyId, userId, fileEntryId); 708 } 709 710 /** 711 * Returns the document library file rank where companyId = ? and userId = ? and fileEntryId = ? or returns <code>null</code> if it could not be found. Uses the finder cache. 712 * 713 * @param companyId the company ID 714 * @param userId the user ID 715 * @param fileEntryId the file entry ID 716 * @return the matching document library file rank, or <code>null</code> if a matching document library file rank could not be found 717 */ 718 public static DLFileRank fetchByC_U_F(long companyId, long userId, 719 long fileEntryId) { 720 return getPersistence().fetchByC_U_F(companyId, userId, fileEntryId); 721 } 722 723 /** 724 * Returns the document library file rank where companyId = ? and userId = ? and fileEntryId = ? or returns <code>null</code> if it could not be found, optionally using the finder cache. 725 * 726 * @param companyId the company ID 727 * @param userId the user ID 728 * @param fileEntryId the file entry ID 729 * @param retrieveFromCache whether to use the finder cache 730 * @return the matching document library file rank, or <code>null</code> if a matching document library file rank could not be found 731 */ 732 public static DLFileRank fetchByC_U_F(long companyId, long userId, 733 long fileEntryId, boolean retrieveFromCache) { 734 return getPersistence() 735 .fetchByC_U_F(companyId, userId, fileEntryId, 736 retrieveFromCache); 737 } 738 739 /** 740 * Removes the document library file rank where companyId = ? and userId = ? and fileEntryId = ? from the database. 741 * 742 * @param companyId the company ID 743 * @param userId the user ID 744 * @param fileEntryId the file entry ID 745 * @return the document library file rank that was removed 746 */ 747 public static DLFileRank removeByC_U_F(long companyId, long userId, 748 long fileEntryId) 749 throws com.liferay.portlet.documentlibrary.NoSuchFileRankException { 750 return getPersistence().removeByC_U_F(companyId, userId, fileEntryId); 751 } 752 753 /** 754 * Returns the number of document library file ranks where companyId = ? and userId = ? and fileEntryId = ?. 755 * 756 * @param companyId the company ID 757 * @param userId the user ID 758 * @param fileEntryId the file entry ID 759 * @return the number of matching document library file ranks 760 */ 761 public static int countByC_U_F(long companyId, long userId, long fileEntryId) { 762 return getPersistence().countByC_U_F(companyId, userId, fileEntryId); 763 } 764 765 /** 766 * Caches the document library file rank in the entity cache if it is enabled. 767 * 768 * @param dlFileRank the document library file rank 769 */ 770 public static void cacheResult(DLFileRank dlFileRank) { 771 getPersistence().cacheResult(dlFileRank); 772 } 773 774 /** 775 * Caches the document library file ranks in the entity cache if it is enabled. 776 * 777 * @param dlFileRanks the document library file ranks 778 */ 779 public static void cacheResult(List<DLFileRank> dlFileRanks) { 780 getPersistence().cacheResult(dlFileRanks); 781 } 782 783 /** 784 * Creates a new document library file rank with the primary key. Does not add the document library file rank to the database. 785 * 786 * @param fileRankId the primary key for the new document library file rank 787 * @return the new document library file rank 788 */ 789 public static DLFileRank create(long fileRankId) { 790 return getPersistence().create(fileRankId); 791 } 792 793 /** 794 * Removes the document library file rank with the primary key from the database. Also notifies the appropriate model listeners. 795 * 796 * @param fileRankId the primary key of the document library file rank 797 * @return the document library file rank that was removed 798 * @throws NoSuchFileRankException if a document library file rank with the primary key could not be found 799 */ 800 public static DLFileRank remove(long fileRankId) 801 throws com.liferay.portlet.documentlibrary.NoSuchFileRankException { 802 return getPersistence().remove(fileRankId); 803 } 804 805 public static DLFileRank updateImpl(DLFileRank dlFileRank) { 806 return getPersistence().updateImpl(dlFileRank); 807 } 808 809 /** 810 * Returns the document library file rank with the primary key or throws a {@link NoSuchFileRankException} if it could not be found. 811 * 812 * @param fileRankId the primary key of the document library file rank 813 * @return the document library file rank 814 * @throws NoSuchFileRankException if a document library file rank with the primary key could not be found 815 */ 816 public static DLFileRank findByPrimaryKey(long fileRankId) 817 throws com.liferay.portlet.documentlibrary.NoSuchFileRankException { 818 return getPersistence().findByPrimaryKey(fileRankId); 819 } 820 821 /** 822 * Returns the document library file rank with the primary key or returns <code>null</code> if it could not be found. 823 * 824 * @param fileRankId the primary key of the document library file rank 825 * @return the document library file rank, or <code>null</code> if a document library file rank with the primary key could not be found 826 */ 827 public static DLFileRank fetchByPrimaryKey(long fileRankId) { 828 return getPersistence().fetchByPrimaryKey(fileRankId); 829 } 830 831 public static java.util.Map<java.io.Serializable, DLFileRank> fetchByPrimaryKeys( 832 java.util.Set<java.io.Serializable> primaryKeys) { 833 return getPersistence().fetchByPrimaryKeys(primaryKeys); 834 } 835 836 /** 837 * Returns all the document library file ranks. 838 * 839 * @return the document library file ranks 840 */ 841 public static List<DLFileRank> findAll() { 842 return getPersistence().findAll(); 843 } 844 845 /** 846 * Returns a range of all the document library file ranks. 847 * 848 * <p> 849 * 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 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 QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link DLFileRankModelImpl}. 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. 850 * </p> 851 * 852 * @param start the lower bound of the range of document library file ranks 853 * @param end the upper bound of the range of document library file ranks (not inclusive) 854 * @return the range of document library file ranks 855 */ 856 public static List<DLFileRank> findAll(int start, int end) { 857 return getPersistence().findAll(start, end); 858 } 859 860 /** 861 * Returns an ordered range of all the document library file ranks. 862 * 863 * <p> 864 * 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 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 QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link DLFileRankModelImpl}. 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. 865 * </p> 866 * 867 * @param start the lower bound of the range of document library file ranks 868 * @param end the upper bound of the range of document library file ranks (not inclusive) 869 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 870 * @return the ordered range of document library file ranks 871 */ 872 public static List<DLFileRank> findAll(int start, int end, 873 OrderByComparator<DLFileRank> orderByComparator) { 874 return getPersistence().findAll(start, end, orderByComparator); 875 } 876 877 /** 878 * Removes all the document library file ranks from the database. 879 */ 880 public static void removeAll() { 881 getPersistence().removeAll(); 882 } 883 884 /** 885 * Returns the number of document library file ranks. 886 * 887 * @return the number of document library file ranks 888 */ 889 public static int countAll() { 890 return getPersistence().countAll(); 891 } 892 893 public static DLFileRankPersistence getPersistence() { 894 if (_persistence == null) { 895 _persistence = (DLFileRankPersistence)PortalBeanLocatorUtil.locate(DLFileRankPersistence.class.getName()); 896 897 ReferenceRegistry.registerReference(DLFileRankUtil.class, 898 "_persistence"); 899 } 900 901 return _persistence; 902 } 903 904 /** 905 * @deprecated As of 6.2.0 906 */ 907 @Deprecated 908 public void setPersistence(DLFileRankPersistence persistence) { 909 } 910 911 private static DLFileRankPersistence _persistence; 912 }