001 /** 002 * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved. 003 * 004 * This library is free software; you can redistribute it and/or modify it under 005 * the terms of the GNU Lesser General Public License as published by the Free 006 * Software Foundation; either version 2.1 of the License, or (at your option) 007 * any later version. 008 * 009 * This library is distributed in the hope that it will be useful, but WITHOUT 010 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 011 * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more 012 * details. 013 */ 014 015 package com.liferay.portlet.documentlibrary.service.persistence; 016 017 import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil; 018 import com.liferay.portal.kernel.dao.orm.DynamicQuery; 019 import com.liferay.portal.kernel.exception.SystemException; 020 import com.liferay.portal.kernel.util.OrderByComparator; 021 import com.liferay.portal.kernel.util.ReferenceRegistry; 022 import com.liferay.portal.service.ServiceContext; 023 024 import com.liferay.portlet.documentlibrary.model.DLFileRank; 025 026 import java.util.List; 027 028 /** 029 * The persistence utility for the document library file rank service. This utility wraps {@link 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. 030 * 031 * <p> 032 * Caching information and settings can be found in <code>portal.properties</code> 033 * </p> 034 * 035 * @author Brian Wing Shun Chan 036 * @see DLFileRankPersistence 037 * @see DLFileRankPersistenceImpl 038 * @generated 039 */ 040 public class DLFileRankUtil { 041 /* 042 * NOTE FOR DEVELOPERS: 043 * 044 * Never modify this class directly. Modify <code>service.xml</code> and rerun ServiceBuilder to regenerate this class. 045 */ 046 047 /** 048 * @see com.liferay.portal.service.persistence.BasePersistence#clearCache() 049 */ 050 public static void clearCache() { 051 getPersistence().clearCache(); 052 } 053 054 /** 055 * @see com.liferay.portal.service.persistence.BasePersistence#clearCache(com.liferay.portal.model.BaseModel) 056 */ 057 public static void clearCache(DLFileRank dlFileRank) { 058 getPersistence().clearCache(dlFileRank); 059 } 060 061 /** 062 * @see com.liferay.portal.service.persistence.BasePersistence#countWithDynamicQuery(DynamicQuery) 063 */ 064 public long countWithDynamicQuery(DynamicQuery dynamicQuery) 065 throws SystemException { 066 return getPersistence().countWithDynamicQuery(dynamicQuery); 067 } 068 069 /** 070 * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery) 071 */ 072 public static List<DLFileRank> findWithDynamicQuery( 073 DynamicQuery dynamicQuery) throws SystemException { 074 return getPersistence().findWithDynamicQuery(dynamicQuery); 075 } 076 077 /** 078 * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery, int, int) 079 */ 080 public static List<DLFileRank> findWithDynamicQuery( 081 DynamicQuery dynamicQuery, int start, int end) 082 throws SystemException { 083 return getPersistence().findWithDynamicQuery(dynamicQuery, start, end); 084 } 085 086 /** 087 * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery, int, int, OrderByComparator) 088 */ 089 public static List<DLFileRank> findWithDynamicQuery( 090 DynamicQuery dynamicQuery, int start, int end, 091 OrderByComparator orderByComparator) throws SystemException { 092 return getPersistence() 093 .findWithDynamicQuery(dynamicQuery, start, end, 094 orderByComparator); 095 } 096 097 /** 098 * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, boolean) 099 */ 100 public static DLFileRank update(DLFileRank dlFileRank, boolean merge) 101 throws SystemException { 102 return getPersistence().update(dlFileRank, merge); 103 } 104 105 /** 106 * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, boolean, ServiceContext) 107 */ 108 public static DLFileRank update(DLFileRank dlFileRank, boolean merge, 109 ServiceContext serviceContext) throws SystemException { 110 return getPersistence().update(dlFileRank, merge, serviceContext); 111 } 112 113 /** 114 * Caches the document library file rank in the entity cache if it is enabled. 115 * 116 * @param dlFileRank the document library file rank 117 */ 118 public static void cacheResult( 119 com.liferay.portlet.documentlibrary.model.DLFileRank dlFileRank) { 120 getPersistence().cacheResult(dlFileRank); 121 } 122 123 /** 124 * Caches the document library file ranks in the entity cache if it is enabled. 125 * 126 * @param dlFileRanks the document library file ranks 127 */ 128 public static void cacheResult( 129 java.util.List<com.liferay.portlet.documentlibrary.model.DLFileRank> dlFileRanks) { 130 getPersistence().cacheResult(dlFileRanks); 131 } 132 133 /** 134 * Creates a new document library file rank with the primary key. Does not add the document library file rank to the database. 135 * 136 * @param fileRankId the primary key for the new document library file rank 137 * @return the new document library file rank 138 */ 139 public static com.liferay.portlet.documentlibrary.model.DLFileRank create( 140 long fileRankId) { 141 return getPersistence().create(fileRankId); 142 } 143 144 /** 145 * Removes the document library file rank with the primary key from the database. Also notifies the appropriate model listeners. 146 * 147 * @param fileRankId the primary key of the document library file rank 148 * @return the document library file rank that was removed 149 * @throws com.liferay.portlet.documentlibrary.NoSuchFileRankException if a document library file rank with the primary key could not be found 150 * @throws SystemException if a system exception occurred 151 */ 152 public static com.liferay.portlet.documentlibrary.model.DLFileRank remove( 153 long fileRankId) 154 throws com.liferay.portal.kernel.exception.SystemException, 155 com.liferay.portlet.documentlibrary.NoSuchFileRankException { 156 return getPersistence().remove(fileRankId); 157 } 158 159 public static com.liferay.portlet.documentlibrary.model.DLFileRank updateImpl( 160 com.liferay.portlet.documentlibrary.model.DLFileRank dlFileRank, 161 boolean merge) 162 throws com.liferay.portal.kernel.exception.SystemException { 163 return getPersistence().updateImpl(dlFileRank, merge); 164 } 165 166 /** 167 * Returns the document library file rank with the primary key or throws a {@link com.liferay.portlet.documentlibrary.NoSuchFileRankException} if it could not be found. 168 * 169 * @param fileRankId the primary key of the document library file rank 170 * @return the document library file rank 171 * @throws com.liferay.portlet.documentlibrary.NoSuchFileRankException if a document library file rank with the primary key could not be found 172 * @throws SystemException if a system exception occurred 173 */ 174 public static com.liferay.portlet.documentlibrary.model.DLFileRank findByPrimaryKey( 175 long fileRankId) 176 throws com.liferay.portal.kernel.exception.SystemException, 177 com.liferay.portlet.documentlibrary.NoSuchFileRankException { 178 return getPersistence().findByPrimaryKey(fileRankId); 179 } 180 181 /** 182 * Returns the document library file rank with the primary key or returns <code>null</code> if it could not be found. 183 * 184 * @param fileRankId the primary key of the document library file rank 185 * @return the document library file rank, or <code>null</code> if a document library file rank with the primary key could not be found 186 * @throws SystemException if a system exception occurred 187 */ 188 public static com.liferay.portlet.documentlibrary.model.DLFileRank fetchByPrimaryKey( 189 long fileRankId) 190 throws com.liferay.portal.kernel.exception.SystemException { 191 return getPersistence().fetchByPrimaryKey(fileRankId); 192 } 193 194 /** 195 * Returns all the document library file ranks where userId = ?. 196 * 197 * @param userId the user ID 198 * @return the matching document library file ranks 199 * @throws SystemException if a system exception occurred 200 */ 201 public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileRank> findByUserId( 202 long userId) throws com.liferay.portal.kernel.exception.SystemException { 203 return getPersistence().findByUserId(userId); 204 } 205 206 /** 207 * Returns a range of all the document library file ranks where userId = ?. 208 * 209 * <p> 210 * 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. 211 * </p> 212 * 213 * @param userId the user ID 214 * @param start the lower bound of the range of document library file ranks 215 * @param end the upper bound of the range of document library file ranks (not inclusive) 216 * @return the range of matching document library file ranks 217 * @throws SystemException if a system exception occurred 218 */ 219 public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileRank> findByUserId( 220 long userId, int start, int end) 221 throws com.liferay.portal.kernel.exception.SystemException { 222 return getPersistence().findByUserId(userId, start, end); 223 } 224 225 /** 226 * Returns an ordered range of all the document library file ranks where userId = ?. 227 * 228 * <p> 229 * 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. 230 * </p> 231 * 232 * @param userId the user ID 233 * @param start the lower bound of the range of document library file ranks 234 * @param end the upper bound of the range of document library file ranks (not inclusive) 235 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 236 * @return the ordered range of matching document library file ranks 237 * @throws SystemException if a system exception occurred 238 */ 239 public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileRank> findByUserId( 240 long userId, int start, int end, 241 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 242 throws com.liferay.portal.kernel.exception.SystemException { 243 return getPersistence() 244 .findByUserId(userId, start, end, orderByComparator); 245 } 246 247 /** 248 * Returns the first document library file rank in the ordered set where userId = ?. 249 * 250 * @param userId the user ID 251 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 252 * @return the first matching document library file rank 253 * @throws com.liferay.portlet.documentlibrary.NoSuchFileRankException if a matching document library file rank could not be found 254 * @throws SystemException if a system exception occurred 255 */ 256 public static com.liferay.portlet.documentlibrary.model.DLFileRank findByUserId_First( 257 long userId, 258 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 259 throws com.liferay.portal.kernel.exception.SystemException, 260 com.liferay.portlet.documentlibrary.NoSuchFileRankException { 261 return getPersistence().findByUserId_First(userId, orderByComparator); 262 } 263 264 /** 265 * Returns the first document library file rank in the ordered set where userId = ?. 266 * 267 * @param userId the user ID 268 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 269 * @return the first matching document library file rank, or <code>null</code> if a matching document library file rank could not be found 270 * @throws SystemException if a system exception occurred 271 */ 272 public static com.liferay.portlet.documentlibrary.model.DLFileRank fetchByUserId_First( 273 long userId, 274 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 275 throws com.liferay.portal.kernel.exception.SystemException { 276 return getPersistence().fetchByUserId_First(userId, orderByComparator); 277 } 278 279 /** 280 * Returns the last document library file rank in the ordered set where userId = ?. 281 * 282 * @param userId the user ID 283 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 284 * @return the last matching document library file rank 285 * @throws com.liferay.portlet.documentlibrary.NoSuchFileRankException if a matching document library file rank could not be found 286 * @throws SystemException if a system exception occurred 287 */ 288 public static com.liferay.portlet.documentlibrary.model.DLFileRank findByUserId_Last( 289 long userId, 290 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 291 throws com.liferay.portal.kernel.exception.SystemException, 292 com.liferay.portlet.documentlibrary.NoSuchFileRankException { 293 return getPersistence().findByUserId_Last(userId, orderByComparator); 294 } 295 296 /** 297 * Returns the last document library file rank in the ordered set where userId = ?. 298 * 299 * @param userId the user ID 300 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 301 * @return the last matching document library file rank, or <code>null</code> if a matching document library file rank could not be found 302 * @throws SystemException if a system exception occurred 303 */ 304 public static com.liferay.portlet.documentlibrary.model.DLFileRank fetchByUserId_Last( 305 long userId, 306 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 307 throws com.liferay.portal.kernel.exception.SystemException { 308 return getPersistence().fetchByUserId_Last(userId, orderByComparator); 309 } 310 311 /** 312 * Returns the document library file ranks before and after the current document library file rank in the ordered set where userId = ?. 313 * 314 * @param fileRankId the primary key of the current document library file rank 315 * @param userId the user ID 316 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 317 * @return the previous, current, and next document library file rank 318 * @throws com.liferay.portlet.documentlibrary.NoSuchFileRankException if a document library file rank with the primary key could not be found 319 * @throws SystemException if a system exception occurred 320 */ 321 public static com.liferay.portlet.documentlibrary.model.DLFileRank[] findByUserId_PrevAndNext( 322 long fileRankId, long userId, 323 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 324 throws com.liferay.portal.kernel.exception.SystemException, 325 com.liferay.portlet.documentlibrary.NoSuchFileRankException { 326 return getPersistence() 327 .findByUserId_PrevAndNext(fileRankId, userId, 328 orderByComparator); 329 } 330 331 /** 332 * Returns all the document library file ranks where fileEntryId = ?. 333 * 334 * @param fileEntryId the file entry ID 335 * @return the matching document library file ranks 336 * @throws SystemException if a system exception occurred 337 */ 338 public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileRank> findByFileEntryId( 339 long fileEntryId) 340 throws com.liferay.portal.kernel.exception.SystemException { 341 return getPersistence().findByFileEntryId(fileEntryId); 342 } 343 344 /** 345 * Returns a range of all the document library file ranks where fileEntryId = ?. 346 * 347 * <p> 348 * 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. 349 * </p> 350 * 351 * @param fileEntryId the file entry ID 352 * @param start the lower bound of the range of document library file ranks 353 * @param end the upper bound of the range of document library file ranks (not inclusive) 354 * @return the range of matching document library file ranks 355 * @throws SystemException if a system exception occurred 356 */ 357 public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileRank> findByFileEntryId( 358 long fileEntryId, int start, int end) 359 throws com.liferay.portal.kernel.exception.SystemException { 360 return getPersistence().findByFileEntryId(fileEntryId, start, end); 361 } 362 363 /** 364 * Returns an ordered range of all the document library file ranks where fileEntryId = ?. 365 * 366 * <p> 367 * 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. 368 * </p> 369 * 370 * @param fileEntryId the file entry ID 371 * @param start the lower bound of the range of document library file ranks 372 * @param end the upper bound of the range of document library file ranks (not inclusive) 373 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 374 * @return the ordered range of matching document library file ranks 375 * @throws SystemException if a system exception occurred 376 */ 377 public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileRank> findByFileEntryId( 378 long fileEntryId, int start, int end, 379 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 380 throws com.liferay.portal.kernel.exception.SystemException { 381 return getPersistence() 382 .findByFileEntryId(fileEntryId, start, end, orderByComparator); 383 } 384 385 /** 386 * Returns the first document library file rank in the ordered set where fileEntryId = ?. 387 * 388 * @param fileEntryId the file entry ID 389 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 390 * @return the first matching document library file rank 391 * @throws com.liferay.portlet.documentlibrary.NoSuchFileRankException if a matching document library file rank could not be found 392 * @throws SystemException if a system exception occurred 393 */ 394 public static com.liferay.portlet.documentlibrary.model.DLFileRank findByFileEntryId_First( 395 long fileEntryId, 396 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 397 throws com.liferay.portal.kernel.exception.SystemException, 398 com.liferay.portlet.documentlibrary.NoSuchFileRankException { 399 return getPersistence() 400 .findByFileEntryId_First(fileEntryId, orderByComparator); 401 } 402 403 /** 404 * Returns the first document library file rank in the ordered set where fileEntryId = ?. 405 * 406 * @param fileEntryId the file entry ID 407 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 408 * @return the first matching document library file rank, or <code>null</code> if a matching document library file rank could not be found 409 * @throws SystemException if a system exception occurred 410 */ 411 public static com.liferay.portlet.documentlibrary.model.DLFileRank fetchByFileEntryId_First( 412 long fileEntryId, 413 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 414 throws com.liferay.portal.kernel.exception.SystemException { 415 return getPersistence() 416 .fetchByFileEntryId_First(fileEntryId, orderByComparator); 417 } 418 419 /** 420 * Returns the last document library file rank in the ordered set where fileEntryId = ?. 421 * 422 * @param fileEntryId the file entry ID 423 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 424 * @return the last matching document library file rank 425 * @throws com.liferay.portlet.documentlibrary.NoSuchFileRankException if a matching document library file rank could not be found 426 * @throws SystemException if a system exception occurred 427 */ 428 public static com.liferay.portlet.documentlibrary.model.DLFileRank findByFileEntryId_Last( 429 long fileEntryId, 430 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 431 throws com.liferay.portal.kernel.exception.SystemException, 432 com.liferay.portlet.documentlibrary.NoSuchFileRankException { 433 return getPersistence() 434 .findByFileEntryId_Last(fileEntryId, orderByComparator); 435 } 436 437 /** 438 * Returns the last document library file rank in the ordered set where fileEntryId = ?. 439 * 440 * @param fileEntryId the file entry ID 441 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 442 * @return the last matching document library file rank, or <code>null</code> if a matching document library file rank could not be found 443 * @throws SystemException if a system exception occurred 444 */ 445 public static com.liferay.portlet.documentlibrary.model.DLFileRank fetchByFileEntryId_Last( 446 long fileEntryId, 447 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 448 throws com.liferay.portal.kernel.exception.SystemException { 449 return getPersistence() 450 .fetchByFileEntryId_Last(fileEntryId, orderByComparator); 451 } 452 453 /** 454 * Returns the document library file ranks before and after the current document library file rank in the ordered set where fileEntryId = ?. 455 * 456 * @param fileRankId the primary key of the current document library file rank 457 * @param fileEntryId the file entry ID 458 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 459 * @return the previous, current, and next document library file rank 460 * @throws com.liferay.portlet.documentlibrary.NoSuchFileRankException if a document library file rank with the primary key could not be found 461 * @throws SystemException if a system exception occurred 462 */ 463 public static com.liferay.portlet.documentlibrary.model.DLFileRank[] findByFileEntryId_PrevAndNext( 464 long fileRankId, long fileEntryId, 465 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 466 throws com.liferay.portal.kernel.exception.SystemException, 467 com.liferay.portlet.documentlibrary.NoSuchFileRankException { 468 return getPersistence() 469 .findByFileEntryId_PrevAndNext(fileRankId, fileEntryId, 470 orderByComparator); 471 } 472 473 /** 474 * Returns all the document library file ranks where groupId = ? and userId = ?. 475 * 476 * @param groupId the group ID 477 * @param userId the user ID 478 * @return the matching document library file ranks 479 * @throws SystemException if a system exception occurred 480 */ 481 public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileRank> findByG_U( 482 long groupId, long userId) 483 throws com.liferay.portal.kernel.exception.SystemException { 484 return getPersistence().findByG_U(groupId, userId); 485 } 486 487 /** 488 * Returns a range of all the document library file ranks where groupId = ? and userId = ?. 489 * 490 * <p> 491 * 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. 492 * </p> 493 * 494 * @param groupId the group ID 495 * @param userId the user ID 496 * @param start the lower bound of the range of document library file ranks 497 * @param end the upper bound of the range of document library file ranks (not inclusive) 498 * @return the range of matching document library file ranks 499 * @throws SystemException if a system exception occurred 500 */ 501 public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileRank> findByG_U( 502 long groupId, long userId, int start, int end) 503 throws com.liferay.portal.kernel.exception.SystemException { 504 return getPersistence().findByG_U(groupId, userId, start, end); 505 } 506 507 /** 508 * Returns an ordered range of all the document library file ranks where groupId = ? and userId = ?. 509 * 510 * <p> 511 * 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. 512 * </p> 513 * 514 * @param groupId the group ID 515 * @param userId the user ID 516 * @param start the lower bound of the range of document library file ranks 517 * @param end the upper bound of the range of document library file ranks (not inclusive) 518 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 519 * @return the ordered range of matching document library file ranks 520 * @throws SystemException if a system exception occurred 521 */ 522 public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileRank> findByG_U( 523 long groupId, long userId, int start, int end, 524 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 525 throws com.liferay.portal.kernel.exception.SystemException { 526 return getPersistence() 527 .findByG_U(groupId, userId, start, end, orderByComparator); 528 } 529 530 /** 531 * Returns the first document library file rank in the ordered set where groupId = ? and userId = ?. 532 * 533 * @param groupId the group ID 534 * @param userId the user ID 535 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 536 * @return the first matching document library file rank 537 * @throws com.liferay.portlet.documentlibrary.NoSuchFileRankException if a matching document library file rank could not be found 538 * @throws SystemException if a system exception occurred 539 */ 540 public static com.liferay.portlet.documentlibrary.model.DLFileRank findByG_U_First( 541 long groupId, long userId, 542 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 543 throws com.liferay.portal.kernel.exception.SystemException, 544 com.liferay.portlet.documentlibrary.NoSuchFileRankException { 545 return getPersistence() 546 .findByG_U_First(groupId, userId, orderByComparator); 547 } 548 549 /** 550 * Returns the first document library file rank in the ordered set where groupId = ? and userId = ?. 551 * 552 * @param groupId the group ID 553 * @param userId the user ID 554 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 555 * @return the first matching document library file rank, or <code>null</code> if a matching document library file rank could not be found 556 * @throws SystemException if a system exception occurred 557 */ 558 public static com.liferay.portlet.documentlibrary.model.DLFileRank fetchByG_U_First( 559 long groupId, long userId, 560 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 561 throws com.liferay.portal.kernel.exception.SystemException { 562 return getPersistence() 563 .fetchByG_U_First(groupId, userId, orderByComparator); 564 } 565 566 /** 567 * Returns the last document library file rank in the ordered set where groupId = ? and userId = ?. 568 * 569 * @param groupId the group ID 570 * @param userId the user ID 571 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 572 * @return the last matching document library file rank 573 * @throws com.liferay.portlet.documentlibrary.NoSuchFileRankException if a matching document library file rank could not be found 574 * @throws SystemException if a system exception occurred 575 */ 576 public static com.liferay.portlet.documentlibrary.model.DLFileRank findByG_U_Last( 577 long groupId, long userId, 578 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 579 throws com.liferay.portal.kernel.exception.SystemException, 580 com.liferay.portlet.documentlibrary.NoSuchFileRankException { 581 return getPersistence() 582 .findByG_U_Last(groupId, userId, orderByComparator); 583 } 584 585 /** 586 * Returns the last document library file rank in the ordered set where groupId = ? and userId = ?. 587 * 588 * @param groupId the group ID 589 * @param userId the user ID 590 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 591 * @return the last matching document library file rank, or <code>null</code> if a matching document library file rank could not be found 592 * @throws SystemException if a system exception occurred 593 */ 594 public static com.liferay.portlet.documentlibrary.model.DLFileRank fetchByG_U_Last( 595 long groupId, long userId, 596 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 597 throws com.liferay.portal.kernel.exception.SystemException { 598 return getPersistence() 599 .fetchByG_U_Last(groupId, userId, orderByComparator); 600 } 601 602 /** 603 * Returns the document library file ranks before and after the current document library file rank in the ordered set where groupId = ? and userId = ?. 604 * 605 * @param fileRankId the primary key of the current document library file rank 606 * @param groupId the group ID 607 * @param userId the user ID 608 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 609 * @return the previous, current, and next document library file rank 610 * @throws com.liferay.portlet.documentlibrary.NoSuchFileRankException if a document library file rank with the primary key could not be found 611 * @throws SystemException if a system exception occurred 612 */ 613 public static com.liferay.portlet.documentlibrary.model.DLFileRank[] findByG_U_PrevAndNext( 614 long fileRankId, long groupId, long userId, 615 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 616 throws com.liferay.portal.kernel.exception.SystemException, 617 com.liferay.portlet.documentlibrary.NoSuchFileRankException { 618 return getPersistence() 619 .findByG_U_PrevAndNext(fileRankId, groupId, userId, 620 orderByComparator); 621 } 622 623 /** 624 * Returns the document library file rank where companyId = ? and userId = ? and fileEntryId = ? or throws a {@link com.liferay.portlet.documentlibrary.NoSuchFileRankException} if it could not be found. 625 * 626 * @param companyId the company ID 627 * @param userId the user ID 628 * @param fileEntryId the file entry ID 629 * @return the matching document library file rank 630 * @throws com.liferay.portlet.documentlibrary.NoSuchFileRankException if a matching document library file rank could not be found 631 * @throws SystemException if a system exception occurred 632 */ 633 public static com.liferay.portlet.documentlibrary.model.DLFileRank findByC_U_F( 634 long companyId, long userId, long fileEntryId) 635 throws com.liferay.portal.kernel.exception.SystemException, 636 com.liferay.portlet.documentlibrary.NoSuchFileRankException { 637 return getPersistence().findByC_U_F(companyId, userId, fileEntryId); 638 } 639 640 /** 641 * 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. 642 * 643 * @param companyId the company ID 644 * @param userId the user ID 645 * @param fileEntryId the file entry ID 646 * @return the matching document library file rank, or <code>null</code> if a matching document library file rank could not be found 647 * @throws SystemException if a system exception occurred 648 */ 649 public static com.liferay.portlet.documentlibrary.model.DLFileRank fetchByC_U_F( 650 long companyId, long userId, long fileEntryId) 651 throws com.liferay.portal.kernel.exception.SystemException { 652 return getPersistence().fetchByC_U_F(companyId, userId, fileEntryId); 653 } 654 655 /** 656 * 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. 657 * 658 * @param companyId the company ID 659 * @param userId the user ID 660 * @param fileEntryId the file entry ID 661 * @param retrieveFromCache whether to use the finder cache 662 * @return the matching document library file rank, or <code>null</code> if a matching document library file rank could not be found 663 * @throws SystemException if a system exception occurred 664 */ 665 public static com.liferay.portlet.documentlibrary.model.DLFileRank fetchByC_U_F( 666 long companyId, long userId, long fileEntryId, boolean retrieveFromCache) 667 throws com.liferay.portal.kernel.exception.SystemException { 668 return getPersistence() 669 .fetchByC_U_F(companyId, userId, fileEntryId, 670 retrieveFromCache); 671 } 672 673 /** 674 * Returns all the document library file ranks. 675 * 676 * @return the document library file ranks 677 * @throws SystemException if a system exception occurred 678 */ 679 public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileRank> findAll() 680 throws com.liferay.portal.kernel.exception.SystemException { 681 return getPersistence().findAll(); 682 } 683 684 /** 685 * Returns a range of all the document library file ranks. 686 * 687 * <p> 688 * 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. 689 * </p> 690 * 691 * @param start the lower bound of the range of document library file ranks 692 * @param end the upper bound of the range of document library file ranks (not inclusive) 693 * @return the range of document library file ranks 694 * @throws SystemException if a system exception occurred 695 */ 696 public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileRank> findAll( 697 int start, int end) 698 throws com.liferay.portal.kernel.exception.SystemException { 699 return getPersistence().findAll(start, end); 700 } 701 702 /** 703 * Returns an ordered range of all the document library file ranks. 704 * 705 * <p> 706 * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. 707 * </p> 708 * 709 * @param start the lower bound of the range of document library file ranks 710 * @param end the upper bound of the range of document library file ranks (not inclusive) 711 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 712 * @return the ordered range of document library file ranks 713 * @throws SystemException if a system exception occurred 714 */ 715 public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileRank> findAll( 716 int start, int end, 717 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 718 throws com.liferay.portal.kernel.exception.SystemException { 719 return getPersistence().findAll(start, end, orderByComparator); 720 } 721 722 /** 723 * Removes all the document library file ranks where userId = ? from the database. 724 * 725 * @param userId the user ID 726 * @throws SystemException if a system exception occurred 727 */ 728 public static void removeByUserId(long userId) 729 throws com.liferay.portal.kernel.exception.SystemException { 730 getPersistence().removeByUserId(userId); 731 } 732 733 /** 734 * Removes all the document library file ranks where fileEntryId = ? from the database. 735 * 736 * @param fileEntryId the file entry ID 737 * @throws SystemException if a system exception occurred 738 */ 739 public static void removeByFileEntryId(long fileEntryId) 740 throws com.liferay.portal.kernel.exception.SystemException { 741 getPersistence().removeByFileEntryId(fileEntryId); 742 } 743 744 /** 745 * Removes all the document library file ranks where groupId = ? and userId = ? from the database. 746 * 747 * @param groupId the group ID 748 * @param userId the user ID 749 * @throws SystemException if a system exception occurred 750 */ 751 public static void removeByG_U(long groupId, long userId) 752 throws com.liferay.portal.kernel.exception.SystemException { 753 getPersistence().removeByG_U(groupId, userId); 754 } 755 756 /** 757 * Removes the document library file rank where companyId = ? and userId = ? and fileEntryId = ? from the database. 758 * 759 * @param companyId the company ID 760 * @param userId the user ID 761 * @param fileEntryId the file entry ID 762 * @return the document library file rank that was removed 763 * @throws SystemException if a system exception occurred 764 */ 765 public static com.liferay.portlet.documentlibrary.model.DLFileRank removeByC_U_F( 766 long companyId, long userId, long fileEntryId) 767 throws com.liferay.portal.kernel.exception.SystemException, 768 com.liferay.portlet.documentlibrary.NoSuchFileRankException { 769 return getPersistence().removeByC_U_F(companyId, userId, fileEntryId); 770 } 771 772 /** 773 * Removes all the document library file ranks from the database. 774 * 775 * @throws SystemException if a system exception occurred 776 */ 777 public static void removeAll() 778 throws com.liferay.portal.kernel.exception.SystemException { 779 getPersistence().removeAll(); 780 } 781 782 /** 783 * Returns the number of document library file ranks where userId = ?. 784 * 785 * @param userId the user ID 786 * @return the number of matching document library file ranks 787 * @throws SystemException if a system exception occurred 788 */ 789 public static int countByUserId(long userId) 790 throws com.liferay.portal.kernel.exception.SystemException { 791 return getPersistence().countByUserId(userId); 792 } 793 794 /** 795 * Returns the number of document library file ranks where fileEntryId = ?. 796 * 797 * @param fileEntryId the file entry ID 798 * @return the number of matching document library file ranks 799 * @throws SystemException if a system exception occurred 800 */ 801 public static int countByFileEntryId(long fileEntryId) 802 throws com.liferay.portal.kernel.exception.SystemException { 803 return getPersistence().countByFileEntryId(fileEntryId); 804 } 805 806 /** 807 * Returns the number of document library file ranks where groupId = ? and userId = ?. 808 * 809 * @param groupId the group ID 810 * @param userId the user ID 811 * @return the number of matching document library file ranks 812 * @throws SystemException if a system exception occurred 813 */ 814 public static int countByG_U(long groupId, long userId) 815 throws com.liferay.portal.kernel.exception.SystemException { 816 return getPersistence().countByG_U(groupId, userId); 817 } 818 819 /** 820 * Returns the number of document library file ranks where companyId = ? and userId = ? and fileEntryId = ?. 821 * 822 * @param companyId the company ID 823 * @param userId the user ID 824 * @param fileEntryId the file entry ID 825 * @return the number of matching document library file ranks 826 * @throws SystemException if a system exception occurred 827 */ 828 public static int countByC_U_F(long companyId, long userId, long fileEntryId) 829 throws com.liferay.portal.kernel.exception.SystemException { 830 return getPersistence().countByC_U_F(companyId, userId, fileEntryId); 831 } 832 833 /** 834 * Returns the number of document library file ranks. 835 * 836 * @return the number of document library file ranks 837 * @throws SystemException if a system exception occurred 838 */ 839 public static int countAll() 840 throws com.liferay.portal.kernel.exception.SystemException { 841 return getPersistence().countAll(); 842 } 843 844 public static DLFileRankPersistence getPersistence() { 845 if (_persistence == null) { 846 _persistence = (DLFileRankPersistence)PortalBeanLocatorUtil.locate(DLFileRankPersistence.class.getName()); 847 848 ReferenceRegistry.registerReference(DLFileRankUtil.class, 849 "_persistence"); 850 } 851 852 return _persistence; 853 } 854 855 /** 856 * @deprecated 857 */ 858 public void setPersistence(DLFileRankPersistence persistence) { 859 } 860 861 private static DLFileRankPersistence _persistence; 862 }