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