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 d l 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 d l file rank in the entity cache if it is enabled. 123 * 124 * @param dlFileRank the d l file rank to cache 125 */ 126 public static void cacheResult( 127 com.liferay.portlet.documentlibrary.model.DLFileRank dlFileRank) { 128 getPersistence().cacheResult(dlFileRank); 129 } 130 131 /** 132 * Caches the d l file ranks in the entity cache if it is enabled. 133 * 134 * @param dlFileRanks the d l file ranks to cache 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 d l file rank with the primary key. Does not add the d l file rank to the database. 143 * 144 * @param fileRankId the primary key for the new d l file rank 145 * @return the new d l 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 d l file rank with the primary key from the database. Also notifies the appropriate model listeners. 154 * 155 * @param fileRankId the primary key of the d l file rank to remove 156 * @return the d l file rank that was removed 157 * @throws com.liferay.portlet.documentlibrary.NoSuchFileRankException if a d l 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 * Finds the d l 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 d l file rank to find 178 * @return the d l file rank 179 * @throws com.liferay.portlet.documentlibrary.NoSuchFileRankException if a d l 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 * Finds the d l 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 d l file rank to find 193 * @return the d l file rank, or <code>null</code> if a d l 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 * Finds all the d l file ranks where userId = ?. 204 * 205 * @param userId the user ID to search with 206 * @return the matching d l 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 * Finds a range of all the d l 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 to search with 222 * @param start the lower bound of the range of d l file ranks to return 223 * @param end the upper bound of the range of d l file ranks to return (not inclusive) 224 * @return the range of matching d l 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 * Finds an ordered range of all the d l 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 to search with 241 * @param start the lower bound of the range of d l file ranks to return 242 * @param end the upper bound of the range of d l file ranks to return (not inclusive) 243 * @param orderByComparator the comparator to order the results by 244 * @return the ordered range of matching d l 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 * Finds the first d l 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 to search with 263 * @param orderByComparator the comparator to order the set by 264 * @return the first matching d l file rank 265 * @throws com.liferay.portlet.documentlibrary.NoSuchFileRankException if a matching d l 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 * Finds the last d l 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 to search with 284 * @param orderByComparator the comparator to order the set by 285 * @return the last matching d l file rank 286 * @throws com.liferay.portlet.documentlibrary.NoSuchFileRankException if a matching d l 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 * Finds the d l file ranks before and after the current d l 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 d l file rank 305 * @param userId the user ID to search with 306 * @param orderByComparator the comparator to order the set by 307 * @return the previous, current, and next d l file rank 308 * @throws com.liferay.portlet.documentlibrary.NoSuchFileRankException if a d l 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 * Finds all the d l file ranks where fileEntryId = ?. 323 * 324 * @param fileEntryId the file entry ID to search with 325 * @return the matching d l 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 * Finds a range of all the d l 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 to search with 342 * @param start the lower bound of the range of d l file ranks to return 343 * @param end the upper bound of the range of d l file ranks to return (not inclusive) 344 * @return the range of matching d l 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 * Finds an ordered range of all the d l 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 to search with 361 * @param start the lower bound of the range of d l file ranks to return 362 * @param end the upper bound of the range of d l file ranks to return (not inclusive) 363 * @param orderByComparator the comparator to order the results by 364 * @return the ordered range of matching d l 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 * Finds the first d l 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 to search with 383 * @param orderByComparator the comparator to order the set by 384 * @return the first matching d l file rank 385 * @throws com.liferay.portlet.documentlibrary.NoSuchFileRankException if a matching d l 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 * Finds the last d l 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 to search with 405 * @param orderByComparator the comparator to order the set by 406 * @return the last matching d l file rank 407 * @throws com.liferay.portlet.documentlibrary.NoSuchFileRankException if a matching d l 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 * Finds the d l file ranks before and after the current d l 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 d l file rank 427 * @param fileEntryId the file entry ID to search with 428 * @param orderByComparator the comparator to order the set by 429 * @return the previous, current, and next d l file rank 430 * @throws com.liferay.portlet.documentlibrary.NoSuchFileRankException if a d l 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 * Finds all the d l file ranks where groupId = ? and userId = ?. 445 * 446 * @param groupId the group ID to search with 447 * @param userId the user ID to search with 448 * @return the matching d l 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 * Finds a range of all the d l 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 to search with 465 * @param userId the user ID to search with 466 * @param start the lower bound of the range of d l file ranks to return 467 * @param end the upper bound of the range of d l file ranks to return (not inclusive) 468 * @return the range of matching d l 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 * Finds an ordered range of all the d l 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 to search with 485 * @param userId the user ID to search with 486 * @param start the lower bound of the range of d l file ranks to return 487 * @param end the upper bound of the range of d l file ranks to return (not inclusive) 488 * @param orderByComparator the comparator to order the results by 489 * @return the ordered range of matching d l 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 * Finds the first d l 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 to search with 508 * @param userId the user ID to search with 509 * @param orderByComparator the comparator to order the set by 510 * @return the first matching d l file rank 511 * @throws com.liferay.portlet.documentlibrary.NoSuchFileRankException if a matching d l 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 * Finds the last d l 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 to search with 531 * @param userId the user ID to search with 532 * @param orderByComparator the comparator to order the set by 533 * @return the last matching d l file rank 534 * @throws com.liferay.portlet.documentlibrary.NoSuchFileRankException if a matching d l 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 * Finds the d l file ranks before and after the current d l 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 d l file rank 554 * @param groupId the group ID to search with 555 * @param userId the user ID to search with 556 * @param orderByComparator the comparator to order the set by 557 * @return the previous, current, and next d l file rank 558 * @throws com.liferay.portlet.documentlibrary.NoSuchFileRankException if a d l 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 * Finds the d l 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 to search with 575 * @param userId the user ID to search with 576 * @param fileEntryId the file entry ID to search with 577 * @return the matching d l file rank 578 * @throws com.liferay.portlet.documentlibrary.NoSuchFileRankException if a matching d l 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 * Finds the d l 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 to search with 592 * @param userId the user ID to search with 593 * @param fileEntryId the file entry ID to search with 594 * @return the matching d l file rank, or <code>null</code> if a matching d l 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 * Finds the d l 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 to search with 607 * @param userId the user ID to search with 608 * @param fileEntryId the file entry ID to search with 609 * @return the matching d l file rank, or <code>null</code> if a matching d l file rank could not be found 610 * @throws SystemException if a system exception occurred 611 */ 612 public static com.liferay.portlet.documentlibrary.model.DLFileRank fetchByC_U_F( 613 long companyId, long userId, long fileEntryId, boolean retrieveFromCache) 614 throws com.liferay.portal.kernel.exception.SystemException { 615 return getPersistence() 616 .fetchByC_U_F(companyId, userId, fileEntryId, 617 retrieveFromCache); 618 } 619 620 /** 621 * Finds all the d l file ranks. 622 * 623 * @return the d l file ranks 624 * @throws SystemException if a system exception occurred 625 */ 626 public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileRank> findAll() 627 throws com.liferay.portal.kernel.exception.SystemException { 628 return getPersistence().findAll(); 629 } 630 631 /** 632 * Finds a range of all the d l file ranks. 633 * 634 * <p> 635 * 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. 636 * </p> 637 * 638 * @param start the lower bound of the range of d l file ranks to return 639 * @param end the upper bound of the range of d l file ranks to return (not inclusive) 640 * @return the range of d l file ranks 641 * @throws SystemException if a system exception occurred 642 */ 643 public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileRank> findAll( 644 int start, int end) 645 throws com.liferay.portal.kernel.exception.SystemException { 646 return getPersistence().findAll(start, end); 647 } 648 649 /** 650 * Finds an ordered range of all the d l file ranks. 651 * 652 * <p> 653 * 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. 654 * </p> 655 * 656 * @param start the lower bound of the range of d l file ranks to return 657 * @param end the upper bound of the range of d l file ranks to return (not inclusive) 658 * @param orderByComparator the comparator to order the results by 659 * @return the ordered range of d l file ranks 660 * @throws SystemException if a system exception occurred 661 */ 662 public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileRank> findAll( 663 int start, int end, 664 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 665 throws com.liferay.portal.kernel.exception.SystemException { 666 return getPersistence().findAll(start, end, orderByComparator); 667 } 668 669 /** 670 * Removes all the d l file ranks where userId = ? from the database. 671 * 672 * @param userId the user ID to search with 673 * @throws SystemException if a system exception occurred 674 */ 675 public static void removeByUserId(long userId) 676 throws com.liferay.portal.kernel.exception.SystemException { 677 getPersistence().removeByUserId(userId); 678 } 679 680 /** 681 * Removes all the d l file ranks where fileEntryId = ? from the database. 682 * 683 * @param fileEntryId the file entry ID to search with 684 * @throws SystemException if a system exception occurred 685 */ 686 public static void removeByFileEntryId(long fileEntryId) 687 throws com.liferay.portal.kernel.exception.SystemException { 688 getPersistence().removeByFileEntryId(fileEntryId); 689 } 690 691 /** 692 * Removes all the d l file ranks where groupId = ? and userId = ? from the database. 693 * 694 * @param groupId the group ID to search with 695 * @param userId the user ID to search with 696 * @throws SystemException if a system exception occurred 697 */ 698 public static void removeByG_U(long groupId, long userId) 699 throws com.liferay.portal.kernel.exception.SystemException { 700 getPersistence().removeByG_U(groupId, userId); 701 } 702 703 /** 704 * Removes the d l file rank where companyId = ? and userId = ? and fileEntryId = ? from the database. 705 * 706 * @param companyId the company ID to search with 707 * @param userId the user ID to search with 708 * @param fileEntryId the file entry ID to search with 709 * @throws SystemException if a system exception occurred 710 */ 711 public static void removeByC_U_F(long companyId, long userId, 712 long fileEntryId) 713 throws com.liferay.portal.kernel.exception.SystemException, 714 com.liferay.portlet.documentlibrary.NoSuchFileRankException { 715 getPersistence().removeByC_U_F(companyId, userId, fileEntryId); 716 } 717 718 /** 719 * Removes all the d l file ranks from the database. 720 * 721 * @throws SystemException if a system exception occurred 722 */ 723 public static void removeAll() 724 throws com.liferay.portal.kernel.exception.SystemException { 725 getPersistence().removeAll(); 726 } 727 728 /** 729 * Counts all the d l file ranks where userId = ?. 730 * 731 * @param userId the user ID to search with 732 * @return the number of matching d l file ranks 733 * @throws SystemException if a system exception occurred 734 */ 735 public static int countByUserId(long userId) 736 throws com.liferay.portal.kernel.exception.SystemException { 737 return getPersistence().countByUserId(userId); 738 } 739 740 /** 741 * Counts all the d l file ranks where fileEntryId = ?. 742 * 743 * @param fileEntryId the file entry ID to search with 744 * @return the number of matching d l file ranks 745 * @throws SystemException if a system exception occurred 746 */ 747 public static int countByFileEntryId(long fileEntryId) 748 throws com.liferay.portal.kernel.exception.SystemException { 749 return getPersistence().countByFileEntryId(fileEntryId); 750 } 751 752 /** 753 * Counts all the d l file ranks where groupId = ? and userId = ?. 754 * 755 * @param groupId the group ID to search with 756 * @param userId the user ID to search with 757 * @return the number of matching d l file ranks 758 * @throws SystemException if a system exception occurred 759 */ 760 public static int countByG_U(long groupId, long userId) 761 throws com.liferay.portal.kernel.exception.SystemException { 762 return getPersistence().countByG_U(groupId, userId); 763 } 764 765 /** 766 * Counts all the d l file ranks where companyId = ? and userId = ? and fileEntryId = ?. 767 * 768 * @param companyId the company ID to search with 769 * @param userId the user ID to search with 770 * @param fileEntryId the file entry ID to search with 771 * @return the number of matching d l file ranks 772 * @throws SystemException if a system exception occurred 773 */ 774 public static int countByC_U_F(long companyId, long userId, long fileEntryId) 775 throws com.liferay.portal.kernel.exception.SystemException { 776 return getPersistence().countByC_U_F(companyId, userId, fileEntryId); 777 } 778 779 /** 780 * Counts all the d l file ranks. 781 * 782 * @return the number of d l file ranks 783 * @throws SystemException if a system exception occurred 784 */ 785 public static int countAll() 786 throws com.liferay.portal.kernel.exception.SystemException { 787 return getPersistence().countAll(); 788 } 789 790 public static DLFileRankPersistence getPersistence() { 791 if (_persistence == null) { 792 _persistence = (DLFileRankPersistence)PortalBeanLocatorUtil.locate(DLFileRankPersistence.class.getName()); 793 794 ReferenceRegistry.registerReference(DLFileRankUtil.class, 795 "_persistence"); 796 } 797 798 return _persistence; 799 } 800 801 public void setPersistence(DLFileRankPersistence persistence) { 802 _persistence = persistence; 803 804 ReferenceRegistry.registerReference(DLFileRankUtil.class, "_persistence"); 805 } 806 807 private static DLFileRankPersistence _persistence; 808 }