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