001 /** 002 * Copyright (c) 2000-2011 Liferay, Inc. All rights reserved. 003 * 004 * The contents of this file are subject to the terms of the Liferay Enterprise 005 * Subscription License ("License"). You may not use this file except in 006 * compliance with the License. You can obtain a copy of the License by 007 * contacting Liferay, Inc. See the License for the specific language governing 008 * permissions and limitations under the License, including but not limited to 009 * distribution rights of the Software. 010 * 011 * 012 * 013 */ 014 015 package com.liferay.portlet.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#remove(com.liferay.portal.model.BaseModel) 099 */ 100 public static DLFileRank remove(DLFileRank dlFileRank) 101 throws SystemException { 102 return getPersistence().remove(dlFileRank); 103 } 104 105 /** 106 * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, boolean) 107 */ 108 public static DLFileRank update(DLFileRank dlFileRank, boolean merge) 109 throws SystemException { 110 return getPersistence().update(dlFileRank, merge); 111 } 112 113 /** 114 * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, boolean, ServiceContext) 115 */ 116 public static DLFileRank update(DLFileRank dlFileRank, boolean merge, 117 ServiceContext serviceContext) throws SystemException { 118 return getPersistence().update(dlFileRank, merge, serviceContext); 119 } 120 121 /** 122 * Caches the document library file rank in the entity cache if it is enabled. 123 * 124 * @param dlFileRank the document library file rank 125 */ 126 public static void cacheResult( 127 com.liferay.portlet.documentlibrary.model.DLFileRank dlFileRank) { 128 getPersistence().cacheResult(dlFileRank); 129 } 130 131 /** 132 * Caches the document library file ranks in the entity cache if it is enabled. 133 * 134 * @param dlFileRanks the document library file ranks 135 */ 136 public static void cacheResult( 137 java.util.List<com.liferay.portlet.documentlibrary.model.DLFileRank> dlFileRanks) { 138 getPersistence().cacheResult(dlFileRanks); 139 } 140 141 /** 142 * Creates a new document library file rank with the primary key. Does not add the document library file rank to the database. 143 * 144 * @param fileRankId the primary key for the new document library file rank 145 * @return the new document library file rank 146 */ 147 public static com.liferay.portlet.documentlibrary.model.DLFileRank create( 148 long fileRankId) { 149 return getPersistence().create(fileRankId); 150 } 151 152 /** 153 * Removes the document library file rank with the primary key from the database. Also notifies the appropriate model listeners. 154 * 155 * @param fileRankId the primary key of the document library file rank 156 * @return the document library file rank that was removed 157 * @throws com.liferay.portlet.documentlibrary.NoSuchFileRankException if a document library file rank with the primary key could not be found 158 * @throws SystemException if a system exception occurred 159 */ 160 public static com.liferay.portlet.documentlibrary.model.DLFileRank remove( 161 long fileRankId) 162 throws com.liferay.portal.kernel.exception.SystemException, 163 com.liferay.portlet.documentlibrary.NoSuchFileRankException { 164 return getPersistence().remove(fileRankId); 165 } 166 167 public static com.liferay.portlet.documentlibrary.model.DLFileRank updateImpl( 168 com.liferay.portlet.documentlibrary.model.DLFileRank dlFileRank, 169 boolean merge) 170 throws com.liferay.portal.kernel.exception.SystemException { 171 return getPersistence().updateImpl(dlFileRank, merge); 172 } 173 174 /** 175 * 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. 176 * 177 * @param fileRankId the primary key of the document library file rank 178 * @return the document library file rank 179 * @throws com.liferay.portlet.documentlibrary.NoSuchFileRankException if a document library file rank with the primary key could not be found 180 * @throws SystemException if a system exception occurred 181 */ 182 public static com.liferay.portlet.documentlibrary.model.DLFileRank findByPrimaryKey( 183 long fileRankId) 184 throws com.liferay.portal.kernel.exception.SystemException, 185 com.liferay.portlet.documentlibrary.NoSuchFileRankException { 186 return getPersistence().findByPrimaryKey(fileRankId); 187 } 188 189 /** 190 * Returns the document library file rank with the primary key or returns <code>null</code> if it could not be found. 191 * 192 * @param fileRankId the primary key of the document library file rank 193 * @return the document library file rank, or <code>null</code> if a document library file rank with the primary key could not be found 194 * @throws SystemException if a system exception occurred 195 */ 196 public static com.liferay.portlet.documentlibrary.model.DLFileRank fetchByPrimaryKey( 197 long fileRankId) 198 throws com.liferay.portal.kernel.exception.SystemException { 199 return getPersistence().fetchByPrimaryKey(fileRankId); 200 } 201 202 /** 203 * Returns all the document library file ranks where userId = ?. 204 * 205 * @param userId the user ID 206 * @return the matching document library file ranks 207 * @throws SystemException if a system exception occurred 208 */ 209 public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileRank> findByUserId( 210 long userId) throws com.liferay.portal.kernel.exception.SystemException { 211 return getPersistence().findByUserId(userId); 212 } 213 214 /** 215 * Returns a range of all the document library file ranks where userId = ?. 216 * 217 * <p> 218 * 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. 219 * </p> 220 * 221 * @param userId the user ID 222 * @param start the lower bound of the range of document library file ranks 223 * @param end the upper bound of the range of document library file ranks (not inclusive) 224 * @return the range of matching document library file ranks 225 * @throws SystemException if a system exception occurred 226 */ 227 public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileRank> findByUserId( 228 long userId, int start, int end) 229 throws com.liferay.portal.kernel.exception.SystemException { 230 return getPersistence().findByUserId(userId, start, end); 231 } 232 233 /** 234 * Returns an ordered range of all the document library file ranks where userId = ?. 235 * 236 * <p> 237 * 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. 238 * </p> 239 * 240 * @param userId the user ID 241 * @param start the lower bound of the range of document library file ranks 242 * @param end the upper bound of the range of document library file ranks (not inclusive) 243 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 244 * @return the ordered range of matching document library file ranks 245 * @throws SystemException if a system exception occurred 246 */ 247 public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileRank> findByUserId( 248 long userId, int start, int end, 249 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 250 throws com.liferay.portal.kernel.exception.SystemException { 251 return getPersistence() 252 .findByUserId(userId, start, end, orderByComparator); 253 } 254 255 /** 256 * Returns the first document library file rank in the ordered set where userId = ?. 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 com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. 260 * </p> 261 * 262 * @param userId the user ID 263 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 264 * @return the first matching document library file rank 265 * @throws com.liferay.portlet.documentlibrary.NoSuchFileRankException if a matching document library file rank could not be found 266 * @throws SystemException if a system exception occurred 267 */ 268 public static com.liferay.portlet.documentlibrary.model.DLFileRank findByUserId_First( 269 long userId, 270 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 271 throws com.liferay.portal.kernel.exception.SystemException, 272 com.liferay.portlet.documentlibrary.NoSuchFileRankException { 273 return getPersistence().findByUserId_First(userId, orderByComparator); 274 } 275 276 /** 277 * Returns the last document library file rank in the ordered set where userId = ?. 278 * 279 * <p> 280 * 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. 281 * </p> 282 * 283 * @param userId the user ID 284 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 285 * @return the last matching document library file rank 286 * @throws com.liferay.portlet.documentlibrary.NoSuchFileRankException if a matching document library file rank could not be found 287 * @throws SystemException if a system exception occurred 288 */ 289 public static com.liferay.portlet.documentlibrary.model.DLFileRank findByUserId_Last( 290 long userId, 291 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 292 throws com.liferay.portal.kernel.exception.SystemException, 293 com.liferay.portlet.documentlibrary.NoSuchFileRankException { 294 return getPersistence().findByUserId_Last(userId, orderByComparator); 295 } 296 297 /** 298 * Returns the document library file ranks before and after the current document library file rank in the ordered set where userId = ?. 299 * 300 * <p> 301 * 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. 302 * </p> 303 * 304 * @param fileRankId the primary key of the current document library file rank 305 * @param userId the user ID 306 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 307 * @return the previous, current, and next document library file rank 308 * @throws com.liferay.portlet.documentlibrary.NoSuchFileRankException if a document library file rank with the primary key could not be found 309 * @throws SystemException if a system exception occurred 310 */ 311 public static com.liferay.portlet.documentlibrary.model.DLFileRank[] findByUserId_PrevAndNext( 312 long fileRankId, long userId, 313 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 314 throws com.liferay.portal.kernel.exception.SystemException, 315 com.liferay.portlet.documentlibrary.NoSuchFileRankException { 316 return getPersistence() 317 .findByUserId_PrevAndNext(fileRankId, userId, 318 orderByComparator); 319 } 320 321 /** 322 * Returns all the document library file ranks where fileEntryId = ?. 323 * 324 * @param fileEntryId the file entry ID 325 * @return the matching document library file ranks 326 * @throws SystemException if a system exception occurred 327 */ 328 public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileRank> findByFileEntryId( 329 long fileEntryId) 330 throws com.liferay.portal.kernel.exception.SystemException { 331 return getPersistence().findByFileEntryId(fileEntryId); 332 } 333 334 /** 335 * Returns a range of all the document library file ranks where fileEntryId = ?. 336 * 337 * <p> 338 * 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. 339 * </p> 340 * 341 * @param fileEntryId the file entry ID 342 * @param start the lower bound of the range of document library file ranks 343 * @param end the upper bound of the range of document library file ranks (not inclusive) 344 * @return the range of matching document library file ranks 345 * @throws SystemException if a system exception occurred 346 */ 347 public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileRank> findByFileEntryId( 348 long fileEntryId, int start, int end) 349 throws com.liferay.portal.kernel.exception.SystemException { 350 return getPersistence().findByFileEntryId(fileEntryId, start, end); 351 } 352 353 /** 354 * Returns an ordered range of all the document library file ranks where fileEntryId = ?. 355 * 356 * <p> 357 * 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. 358 * </p> 359 * 360 * @param fileEntryId the file entry ID 361 * @param start the lower bound of the range of document library file ranks 362 * @param end the upper bound of the range of document library file ranks (not inclusive) 363 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 364 * @return the ordered range of matching document library file ranks 365 * @throws SystemException if a system exception occurred 366 */ 367 public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileRank> findByFileEntryId( 368 long fileEntryId, int start, int end, 369 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 370 throws com.liferay.portal.kernel.exception.SystemException { 371 return getPersistence() 372 .findByFileEntryId(fileEntryId, start, end, orderByComparator); 373 } 374 375 /** 376 * Returns the first document library file rank in the ordered set where fileEntryId = ?. 377 * 378 * <p> 379 * 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. 380 * </p> 381 * 382 * @param fileEntryId the file entry ID 383 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 384 * @return the first matching document library file rank 385 * @throws com.liferay.portlet.documentlibrary.NoSuchFileRankException if a matching document library file rank could not be found 386 * @throws SystemException if a system exception occurred 387 */ 388 public static com.liferay.portlet.documentlibrary.model.DLFileRank findByFileEntryId_First( 389 long fileEntryId, 390 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 391 throws com.liferay.portal.kernel.exception.SystemException, 392 com.liferay.portlet.documentlibrary.NoSuchFileRankException { 393 return getPersistence() 394 .findByFileEntryId_First(fileEntryId, orderByComparator); 395 } 396 397 /** 398 * Returns the last document library file rank in the ordered set where fileEntryId = ?. 399 * 400 * <p> 401 * 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. 402 * </p> 403 * 404 * @param fileEntryId the file entry ID 405 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 406 * @return the last matching document library file rank 407 * @throws com.liferay.portlet.documentlibrary.NoSuchFileRankException if a matching document library file rank could not be found 408 * @throws SystemException if a system exception occurred 409 */ 410 public static com.liferay.portlet.documentlibrary.model.DLFileRank findByFileEntryId_Last( 411 long fileEntryId, 412 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 413 throws com.liferay.portal.kernel.exception.SystemException, 414 com.liferay.portlet.documentlibrary.NoSuchFileRankException { 415 return getPersistence() 416 .findByFileEntryId_Last(fileEntryId, orderByComparator); 417 } 418 419 /** 420 * Returns the document library file ranks before and after the current document library file rank in the ordered set where fileEntryId = ?. 421 * 422 * <p> 423 * 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. 424 * </p> 425 * 426 * @param fileRankId the primary key of the current document library file rank 427 * @param fileEntryId the file entry ID 428 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 429 * @return the previous, current, and next document library file rank 430 * @throws com.liferay.portlet.documentlibrary.NoSuchFileRankException if a document library file rank with the primary key could not be found 431 * @throws SystemException if a system exception occurred 432 */ 433 public static com.liferay.portlet.documentlibrary.model.DLFileRank[] findByFileEntryId_PrevAndNext( 434 long fileRankId, long fileEntryId, 435 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 436 throws com.liferay.portal.kernel.exception.SystemException, 437 com.liferay.portlet.documentlibrary.NoSuchFileRankException { 438 return getPersistence() 439 .findByFileEntryId_PrevAndNext(fileRankId, fileEntryId, 440 orderByComparator); 441 } 442 443 /** 444 * Returns all the document library file ranks where groupId = ? and userId = ?. 445 * 446 * @param groupId the group ID 447 * @param userId the user ID 448 * @return the matching document library file ranks 449 * @throws SystemException if a system exception occurred 450 */ 451 public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileRank> findByG_U( 452 long groupId, long userId) 453 throws com.liferay.portal.kernel.exception.SystemException { 454 return getPersistence().findByG_U(groupId, userId); 455 } 456 457 /** 458 * Returns a range of all the document library file ranks where groupId = ? and userId = ?. 459 * 460 * <p> 461 * 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. 462 * </p> 463 * 464 * @param groupId the group ID 465 * @param userId the user ID 466 * @param start the lower bound of the range of document library file ranks 467 * @param end the upper bound of the range of document library file ranks (not inclusive) 468 * @return the range of matching document library file ranks 469 * @throws SystemException if a system exception occurred 470 */ 471 public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileRank> findByG_U( 472 long groupId, long userId, int start, int end) 473 throws com.liferay.portal.kernel.exception.SystemException { 474 return getPersistence().findByG_U(groupId, userId, start, end); 475 } 476 477 /** 478 * Returns an ordered range of all the document library file ranks where groupId = ? and userId = ?. 479 * 480 * <p> 481 * 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. 482 * </p> 483 * 484 * @param groupId the group ID 485 * @param userId the user ID 486 * @param start the lower bound of the range of document library file ranks 487 * @param end the upper bound of the range of document library file ranks (not inclusive) 488 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 489 * @return the ordered range of matching document library file ranks 490 * @throws SystemException if a system exception occurred 491 */ 492 public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileRank> findByG_U( 493 long groupId, long userId, int start, int end, 494 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 495 throws com.liferay.portal.kernel.exception.SystemException { 496 return getPersistence() 497 .findByG_U(groupId, userId, start, end, orderByComparator); 498 } 499 500 /** 501 * Returns the first document library file rank in the ordered set where groupId = ? and userId = ?. 502 * 503 * <p> 504 * 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. 505 * </p> 506 * 507 * @param groupId the group ID 508 * @param userId the user ID 509 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 510 * @return the first matching document library file rank 511 * @throws com.liferay.portlet.documentlibrary.NoSuchFileRankException if a matching document library file rank could not be found 512 * @throws SystemException if a system exception occurred 513 */ 514 public static com.liferay.portlet.documentlibrary.model.DLFileRank findByG_U_First( 515 long groupId, long userId, 516 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 517 throws com.liferay.portal.kernel.exception.SystemException, 518 com.liferay.portlet.documentlibrary.NoSuchFileRankException { 519 return getPersistence() 520 .findByG_U_First(groupId, userId, orderByComparator); 521 } 522 523 /** 524 * Returns the last document library file rank in the ordered set where groupId = ? and userId = ?. 525 * 526 * <p> 527 * 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. 528 * </p> 529 * 530 * @param groupId the group ID 531 * @param userId the user ID 532 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 533 * @return the last matching document library file rank 534 * @throws com.liferay.portlet.documentlibrary.NoSuchFileRankException if a matching document library file rank could not be found 535 * @throws SystemException if a system exception occurred 536 */ 537 public static com.liferay.portlet.documentlibrary.model.DLFileRank findByG_U_Last( 538 long groupId, long userId, 539 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 540 throws com.liferay.portal.kernel.exception.SystemException, 541 com.liferay.portlet.documentlibrary.NoSuchFileRankException { 542 return getPersistence() 543 .findByG_U_Last(groupId, userId, orderByComparator); 544 } 545 546 /** 547 * Returns the document library file ranks before and after the current document library file rank in the ordered set where groupId = ? and userId = ?. 548 * 549 * <p> 550 * 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. 551 * </p> 552 * 553 * @param fileRankId the primary key of the current document library file rank 554 * @param groupId the group ID 555 * @param userId the user ID 556 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 557 * @return the previous, current, and next document library file rank 558 * @throws com.liferay.portlet.documentlibrary.NoSuchFileRankException if a document library file rank with the primary key could not be found 559 * @throws SystemException if a system exception occurred 560 */ 561 public static com.liferay.portlet.documentlibrary.model.DLFileRank[] findByG_U_PrevAndNext( 562 long fileRankId, long groupId, long userId, 563 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 564 throws com.liferay.portal.kernel.exception.SystemException, 565 com.liferay.portlet.documentlibrary.NoSuchFileRankException { 566 return getPersistence() 567 .findByG_U_PrevAndNext(fileRankId, groupId, userId, 568 orderByComparator); 569 } 570 571 /** 572 * 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. 573 * 574 * @param companyId the company ID 575 * @param userId the user ID 576 * @param fileEntryId the file entry ID 577 * @return the matching document library file rank 578 * @throws com.liferay.portlet.documentlibrary.NoSuchFileRankException if a matching document library file rank could not be found 579 * @throws SystemException if a system exception occurred 580 */ 581 public static com.liferay.portlet.documentlibrary.model.DLFileRank findByC_U_F( 582 long companyId, long userId, long fileEntryId) 583 throws com.liferay.portal.kernel.exception.SystemException, 584 com.liferay.portlet.documentlibrary.NoSuchFileRankException { 585 return getPersistence().findByC_U_F(companyId, userId, fileEntryId); 586 } 587 588 /** 589 * 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. 590 * 591 * @param companyId the company ID 592 * @param userId the user ID 593 * @param fileEntryId the file entry ID 594 * @return the matching document library file rank, or <code>null</code> if a matching document library file rank could not be found 595 * @throws SystemException if a system exception occurred 596 */ 597 public static com.liferay.portlet.documentlibrary.model.DLFileRank fetchByC_U_F( 598 long companyId, long userId, long fileEntryId) 599 throws com.liferay.portal.kernel.exception.SystemException { 600 return getPersistence().fetchByC_U_F(companyId, userId, fileEntryId); 601 } 602 603 /** 604 * 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. 605 * 606 * @param companyId the company ID 607 * @param userId the user ID 608 * @param fileEntryId the file entry ID 609 * @param retrieveFromCache whether to use the finder cache 610 * @return the matching document library file rank, or <code>null</code> if a matching document library file rank could not be found 611 * @throws SystemException if a system exception occurred 612 */ 613 public static com.liferay.portlet.documentlibrary.model.DLFileRank fetchByC_U_F( 614 long companyId, long userId, long fileEntryId, boolean retrieveFromCache) 615 throws com.liferay.portal.kernel.exception.SystemException { 616 return getPersistence() 617 .fetchByC_U_F(companyId, userId, fileEntryId, 618 retrieveFromCache); 619 } 620 621 /** 622 * Returns all the document library file ranks. 623 * 624 * @return the document library file ranks 625 * @throws SystemException if a system exception occurred 626 */ 627 public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileRank> findAll() 628 throws com.liferay.portal.kernel.exception.SystemException { 629 return getPersistence().findAll(); 630 } 631 632 /** 633 * Returns a range of all the document library file ranks. 634 * 635 * <p> 636 * 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. 637 * </p> 638 * 639 * @param start the lower bound of the range of document library file ranks 640 * @param end the upper bound of the range of document library file ranks (not inclusive) 641 * @return the range of document library file ranks 642 * @throws SystemException if a system exception occurred 643 */ 644 public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileRank> findAll( 645 int start, int end) 646 throws com.liferay.portal.kernel.exception.SystemException { 647 return getPersistence().findAll(start, end); 648 } 649 650 /** 651 * Returns an ordered range of all the document library file ranks. 652 * 653 * <p> 654 * 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. 655 * </p> 656 * 657 * @param start the lower bound of the range of document library file ranks 658 * @param end the upper bound of the range of document library file ranks (not inclusive) 659 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 660 * @return the ordered range of document library file ranks 661 * @throws SystemException if a system exception occurred 662 */ 663 public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileRank> findAll( 664 int start, int end, 665 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 666 throws com.liferay.portal.kernel.exception.SystemException { 667 return getPersistence().findAll(start, end, orderByComparator); 668 } 669 670 /** 671 * Removes all the document library file ranks where userId = ? from the database. 672 * 673 * @param userId the user ID 674 * @throws SystemException if a system exception occurred 675 */ 676 public static void removeByUserId(long userId) 677 throws com.liferay.portal.kernel.exception.SystemException { 678 getPersistence().removeByUserId(userId); 679 } 680 681 /** 682 * Removes all the document library file ranks where fileEntryId = ? from the database. 683 * 684 * @param fileEntryId the file entry ID 685 * @throws SystemException if a system exception occurred 686 */ 687 public static void removeByFileEntryId(long fileEntryId) 688 throws com.liferay.portal.kernel.exception.SystemException { 689 getPersistence().removeByFileEntryId(fileEntryId); 690 } 691 692 /** 693 * Removes all the document library file ranks where groupId = ? and userId = ? from the database. 694 * 695 * @param groupId the group ID 696 * @param userId the user ID 697 * @throws SystemException if a system exception occurred 698 */ 699 public static void removeByG_U(long groupId, long userId) 700 throws com.liferay.portal.kernel.exception.SystemException { 701 getPersistence().removeByG_U(groupId, userId); 702 } 703 704 /** 705 * Removes the document library file rank where companyId = ? and userId = ? and fileEntryId = ? from the database. 706 * 707 * @param companyId the company ID 708 * @param userId the user ID 709 * @param fileEntryId the file entry ID 710 * @throws SystemException if a system exception occurred 711 */ 712 public static void removeByC_U_F(long companyId, long userId, 713 long fileEntryId) 714 throws com.liferay.portal.kernel.exception.SystemException, 715 com.liferay.portlet.documentlibrary.NoSuchFileRankException { 716 getPersistence().removeByC_U_F(companyId, userId, fileEntryId); 717 } 718 719 /** 720 * Removes all the document library file ranks from the database. 721 * 722 * @throws SystemException if a system exception occurred 723 */ 724 public static void removeAll() 725 throws com.liferay.portal.kernel.exception.SystemException { 726 getPersistence().removeAll(); 727 } 728 729 /** 730 * Returns the number of document library file ranks where userId = ?. 731 * 732 * @param userId the user ID 733 * @return the number of matching document library file ranks 734 * @throws SystemException if a system exception occurred 735 */ 736 public static int countByUserId(long userId) 737 throws com.liferay.portal.kernel.exception.SystemException { 738 return getPersistence().countByUserId(userId); 739 } 740 741 /** 742 * Returns the number of document library file ranks where fileEntryId = ?. 743 * 744 * @param fileEntryId the file entry ID 745 * @return the number of matching document library file ranks 746 * @throws SystemException if a system exception occurred 747 */ 748 public static int countByFileEntryId(long fileEntryId) 749 throws com.liferay.portal.kernel.exception.SystemException { 750 return getPersistence().countByFileEntryId(fileEntryId); 751 } 752 753 /** 754 * Returns the number of document library file ranks where groupId = ? and userId = ?. 755 * 756 * @param groupId the group ID 757 * @param userId the user ID 758 * @return the number of matching document library file ranks 759 * @throws SystemException if a system exception occurred 760 */ 761 public static int countByG_U(long groupId, long userId) 762 throws com.liferay.portal.kernel.exception.SystemException { 763 return getPersistence().countByG_U(groupId, userId); 764 } 765 766 /** 767 * Returns the number of document library file ranks where companyId = ? and userId = ? and fileEntryId = ?. 768 * 769 * @param companyId the company ID 770 * @param userId the user ID 771 * @param fileEntryId the file entry ID 772 * @return the number of matching document library file ranks 773 * @throws SystemException if a system exception occurred 774 */ 775 public static int countByC_U_F(long companyId, long userId, long fileEntryId) 776 throws com.liferay.portal.kernel.exception.SystemException { 777 return getPersistence().countByC_U_F(companyId, userId, fileEntryId); 778 } 779 780 /** 781 * Returns the number of document library file ranks. 782 * 783 * @return the number of document library file ranks 784 * @throws SystemException if a system exception occurred 785 */ 786 public static int countAll() 787 throws com.liferay.portal.kernel.exception.SystemException { 788 return getPersistence().countAll(); 789 } 790 791 public static DLFileRankPersistence getPersistence() { 792 if (_persistence == null) { 793 _persistence = (DLFileRankPersistence)PortalBeanLocatorUtil.locate(DLFileRankPersistence.class.getName()); 794 795 ReferenceRegistry.registerReference(DLFileRankUtil.class, 796 "_persistence"); 797 } 798 799 return _persistence; 800 } 801 802 public void setPersistence(DLFileRankPersistence persistence) { 803 _persistence = persistence; 804 805 ReferenceRegistry.registerReference(DLFileRankUtil.class, "_persistence"); 806 } 807 808 private static DLFileRankPersistence _persistence; 809 }