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.DLContent; 026 027 import java.util.List; 028 029 /** 030 * The persistence utility for the document library content service. This utility wraps {@link com.liferay.portlet.documentlibrary.service.persistence.impl.DLContentPersistenceImpl} 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 DLContentPersistence 038 * @see com.liferay.portlet.documentlibrary.service.persistence.impl.DLContentPersistenceImpl 039 * @generated 040 */ 041 @ProviderType 042 public class DLContentUtil { 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(DLContent dlContent) { 060 getPersistence().clearCache(dlContent); 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<DLContent> 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<DLContent> 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<DLContent> findWithDynamicQuery( 090 DynamicQuery dynamicQuery, int start, int end, 091 OrderByComparator<DLContent> 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 DLContent update(DLContent dlContent) { 101 return getPersistence().update(dlContent); 102 } 103 104 /** 105 * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, ServiceContext) 106 */ 107 public static DLContent update(DLContent dlContent, 108 ServiceContext serviceContext) { 109 return getPersistence().update(dlContent, serviceContext); 110 } 111 112 /** 113 * Returns all the document library contents where companyId = ? and repositoryId = ?. 114 * 115 * @param companyId the company ID 116 * @param repositoryId the repository ID 117 * @return the matching document library contents 118 */ 119 public static List<DLContent> findByC_R(long companyId, long repositoryId) { 120 return getPersistence().findByC_R(companyId, repositoryId); 121 } 122 123 /** 124 * Returns a range of all the document library contents where companyId = ? and repositoryId = ?. 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 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 QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link DLContentModelImpl}. 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 companyId the company ID 131 * @param repositoryId the repository ID 132 * @param start the lower bound of the range of document library contents 133 * @param end the upper bound of the range of document library contents (not inclusive) 134 * @return the range of matching document library contents 135 */ 136 public static List<DLContent> findByC_R(long companyId, long repositoryId, 137 int start, int end) { 138 return getPersistence().findByC_R(companyId, repositoryId, start, end); 139 } 140 141 /** 142 * Returns an ordered range of all the document library contents where companyId = ? and repositoryId = ?. 143 * 144 * <p> 145 * 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 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 QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link DLContentModelImpl}. 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. 146 * </p> 147 * 148 * @param companyId the company ID 149 * @param repositoryId the repository ID 150 * @param start the lower bound of the range of document library contents 151 * @param end the upper bound of the range of document library contents (not inclusive) 152 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 153 * @return the ordered range of matching document library contents 154 */ 155 public static List<DLContent> findByC_R(long companyId, long repositoryId, 156 int start, int end, OrderByComparator<DLContent> orderByComparator) { 157 return getPersistence() 158 .findByC_R(companyId, repositoryId, start, end, 159 orderByComparator); 160 } 161 162 /** 163 * Returns an ordered range of all the document library contents where companyId = ? and repositoryId = ?. 164 * 165 * <p> 166 * 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 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 QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link DLContentModelImpl}. 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. 167 * </p> 168 * 169 * @param companyId the company ID 170 * @param repositoryId the repository ID 171 * @param start the lower bound of the range of document library contents 172 * @param end the upper bound of the range of document library contents (not inclusive) 173 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 174 * @param retrieveFromCache whether to retrieve from the finder cache 175 * @return the ordered range of matching document library contents 176 */ 177 public static List<DLContent> findByC_R(long companyId, long repositoryId, 178 int start, int end, OrderByComparator<DLContent> orderByComparator, 179 boolean retrieveFromCache) { 180 return getPersistence() 181 .findByC_R(companyId, repositoryId, start, end, 182 orderByComparator, retrieveFromCache); 183 } 184 185 /** 186 * Returns the first document library content in the ordered set where companyId = ? and repositoryId = ?. 187 * 188 * @param companyId the company ID 189 * @param repositoryId the repository ID 190 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 191 * @return the first matching document library content 192 * @throws NoSuchContentException if a matching document library content could not be found 193 */ 194 public static DLContent findByC_R_First(long companyId, long repositoryId, 195 OrderByComparator<DLContent> orderByComparator) 196 throws com.liferay.portlet.documentlibrary.exception.NoSuchContentException { 197 return getPersistence() 198 .findByC_R_First(companyId, repositoryId, orderByComparator); 199 } 200 201 /** 202 * Returns the first document library content in the ordered set where companyId = ? and repositoryId = ?. 203 * 204 * @param companyId the company ID 205 * @param repositoryId the repository ID 206 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 207 * @return the first matching document library content, or <code>null</code> if a matching document library content could not be found 208 */ 209 public static DLContent fetchByC_R_First(long companyId, long repositoryId, 210 OrderByComparator<DLContent> orderByComparator) { 211 return getPersistence() 212 .fetchByC_R_First(companyId, repositoryId, orderByComparator); 213 } 214 215 /** 216 * Returns the last document library content in the ordered set where companyId = ? and repositoryId = ?. 217 * 218 * @param companyId the company ID 219 * @param repositoryId the repository ID 220 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 221 * @return the last matching document library content 222 * @throws NoSuchContentException if a matching document library content could not be found 223 */ 224 public static DLContent findByC_R_Last(long companyId, long repositoryId, 225 OrderByComparator<DLContent> orderByComparator) 226 throws com.liferay.portlet.documentlibrary.exception.NoSuchContentException { 227 return getPersistence() 228 .findByC_R_Last(companyId, repositoryId, orderByComparator); 229 } 230 231 /** 232 * Returns the last document library content in the ordered set where companyId = ? and repositoryId = ?. 233 * 234 * @param companyId the company ID 235 * @param repositoryId the repository ID 236 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 237 * @return the last matching document library content, or <code>null</code> if a matching document library content could not be found 238 */ 239 public static DLContent fetchByC_R_Last(long companyId, long repositoryId, 240 OrderByComparator<DLContent> orderByComparator) { 241 return getPersistence() 242 .fetchByC_R_Last(companyId, repositoryId, orderByComparator); 243 } 244 245 /** 246 * Returns the document library contents before and after the current document library content in the ordered set where companyId = ? and repositoryId = ?. 247 * 248 * @param contentId the primary key of the current document library content 249 * @param companyId the company ID 250 * @param repositoryId the repository ID 251 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 252 * @return the previous, current, and next document library content 253 * @throws NoSuchContentException if a document library content with the primary key could not be found 254 */ 255 public static DLContent[] findByC_R_PrevAndNext(long contentId, 256 long companyId, long repositoryId, 257 OrderByComparator<DLContent> orderByComparator) 258 throws com.liferay.portlet.documentlibrary.exception.NoSuchContentException { 259 return getPersistence() 260 .findByC_R_PrevAndNext(contentId, companyId, repositoryId, 261 orderByComparator); 262 } 263 264 /** 265 * Removes all the document library contents where companyId = ? and repositoryId = ? from the database. 266 * 267 * @param companyId the company ID 268 * @param repositoryId the repository ID 269 */ 270 public static void removeByC_R(long companyId, long repositoryId) { 271 getPersistence().removeByC_R(companyId, repositoryId); 272 } 273 274 /** 275 * Returns the number of document library contents where companyId = ? and repositoryId = ?. 276 * 277 * @param companyId the company ID 278 * @param repositoryId the repository ID 279 * @return the number of matching document library contents 280 */ 281 public static int countByC_R(long companyId, long repositoryId) { 282 return getPersistence().countByC_R(companyId, repositoryId); 283 } 284 285 /** 286 * Returns all the document library contents where companyId = ? and repositoryId = ? and path = ?. 287 * 288 * @param companyId the company ID 289 * @param repositoryId the repository ID 290 * @param path the path 291 * @return the matching document library contents 292 */ 293 public static List<DLContent> findByC_R_P(long companyId, 294 long repositoryId, java.lang.String path) { 295 return getPersistence().findByC_R_P(companyId, repositoryId, path); 296 } 297 298 /** 299 * Returns a range of all the document library contents where companyId = ? and repositoryId = ? and path = ?. 300 * 301 * <p> 302 * 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 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 QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link DLContentModelImpl}. 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. 303 * </p> 304 * 305 * @param companyId the company ID 306 * @param repositoryId the repository ID 307 * @param path the path 308 * @param start the lower bound of the range of document library contents 309 * @param end the upper bound of the range of document library contents (not inclusive) 310 * @return the range of matching document library contents 311 */ 312 public static List<DLContent> findByC_R_P(long companyId, 313 long repositoryId, java.lang.String path, int start, int end) { 314 return getPersistence() 315 .findByC_R_P(companyId, repositoryId, path, start, end); 316 } 317 318 /** 319 * Returns an ordered range of all the document library contents where companyId = ? and repositoryId = ? and path = ?. 320 * 321 * <p> 322 * 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 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 QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link DLContentModelImpl}. 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. 323 * </p> 324 * 325 * @param companyId the company ID 326 * @param repositoryId the repository ID 327 * @param path the path 328 * @param start the lower bound of the range of document library contents 329 * @param end the upper bound of the range of document library contents (not inclusive) 330 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 331 * @return the ordered range of matching document library contents 332 */ 333 public static List<DLContent> findByC_R_P(long companyId, 334 long repositoryId, java.lang.String path, int start, int end, 335 OrderByComparator<DLContent> orderByComparator) { 336 return getPersistence() 337 .findByC_R_P(companyId, repositoryId, path, start, end, 338 orderByComparator); 339 } 340 341 /** 342 * Returns an ordered range of all the document library contents where companyId = ? and repositoryId = ? and path = ?. 343 * 344 * <p> 345 * 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 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 QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link DLContentModelImpl}. 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. 346 * </p> 347 * 348 * @param companyId the company ID 349 * @param repositoryId the repository ID 350 * @param path the path 351 * @param start the lower bound of the range of document library contents 352 * @param end the upper bound of the range of document library contents (not inclusive) 353 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 354 * @param retrieveFromCache whether to retrieve from the finder cache 355 * @return the ordered range of matching document library contents 356 */ 357 public static List<DLContent> findByC_R_P(long companyId, 358 long repositoryId, java.lang.String path, int start, int end, 359 OrderByComparator<DLContent> orderByComparator, 360 boolean retrieveFromCache) { 361 return getPersistence() 362 .findByC_R_P(companyId, repositoryId, path, start, end, 363 orderByComparator, retrieveFromCache); 364 } 365 366 /** 367 * Returns the first document library content in the ordered set where companyId = ? and repositoryId = ? and path = ?. 368 * 369 * @param companyId the company ID 370 * @param repositoryId the repository ID 371 * @param path the path 372 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 373 * @return the first matching document library content 374 * @throws NoSuchContentException if a matching document library content could not be found 375 */ 376 public static DLContent findByC_R_P_First(long companyId, 377 long repositoryId, java.lang.String path, 378 OrderByComparator<DLContent> orderByComparator) 379 throws com.liferay.portlet.documentlibrary.exception.NoSuchContentException { 380 return getPersistence() 381 .findByC_R_P_First(companyId, repositoryId, path, 382 orderByComparator); 383 } 384 385 /** 386 * Returns the first document library content in the ordered set where companyId = ? and repositoryId = ? and path = ?. 387 * 388 * @param companyId the company ID 389 * @param repositoryId the repository ID 390 * @param path the path 391 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 392 * @return the first matching document library content, or <code>null</code> if a matching document library content could not be found 393 */ 394 public static DLContent fetchByC_R_P_First(long companyId, 395 long repositoryId, java.lang.String path, 396 OrderByComparator<DLContent> orderByComparator) { 397 return getPersistence() 398 .fetchByC_R_P_First(companyId, repositoryId, path, 399 orderByComparator); 400 } 401 402 /** 403 * Returns the last document library content in the ordered set where companyId = ? and repositoryId = ? and path = ?. 404 * 405 * @param companyId the company ID 406 * @param repositoryId the repository ID 407 * @param path the path 408 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 409 * @return the last matching document library content 410 * @throws NoSuchContentException if a matching document library content could not be found 411 */ 412 public static DLContent findByC_R_P_Last(long companyId, long repositoryId, 413 java.lang.String path, OrderByComparator<DLContent> orderByComparator) 414 throws com.liferay.portlet.documentlibrary.exception.NoSuchContentException { 415 return getPersistence() 416 .findByC_R_P_Last(companyId, repositoryId, path, 417 orderByComparator); 418 } 419 420 /** 421 * Returns the last document library content in the ordered set where companyId = ? and repositoryId = ? and path = ?. 422 * 423 * @param companyId the company ID 424 * @param repositoryId the repository ID 425 * @param path the path 426 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 427 * @return the last matching document library content, or <code>null</code> if a matching document library content could not be found 428 */ 429 public static DLContent fetchByC_R_P_Last(long companyId, 430 long repositoryId, java.lang.String path, 431 OrderByComparator<DLContent> orderByComparator) { 432 return getPersistence() 433 .fetchByC_R_P_Last(companyId, repositoryId, path, 434 orderByComparator); 435 } 436 437 /** 438 * Returns the document library contents before and after the current document library content in the ordered set where companyId = ? and repositoryId = ? and path = ?. 439 * 440 * @param contentId the primary key of the current document library content 441 * @param companyId the company ID 442 * @param repositoryId the repository ID 443 * @param path the path 444 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 445 * @return the previous, current, and next document library content 446 * @throws NoSuchContentException if a document library content with the primary key could not be found 447 */ 448 public static DLContent[] findByC_R_P_PrevAndNext(long contentId, 449 long companyId, long repositoryId, java.lang.String path, 450 OrderByComparator<DLContent> orderByComparator) 451 throws com.liferay.portlet.documentlibrary.exception.NoSuchContentException { 452 return getPersistence() 453 .findByC_R_P_PrevAndNext(contentId, companyId, repositoryId, 454 path, orderByComparator); 455 } 456 457 /** 458 * Removes all the document library contents where companyId = ? and repositoryId = ? and path = ? from the database. 459 * 460 * @param companyId the company ID 461 * @param repositoryId the repository ID 462 * @param path the path 463 */ 464 public static void removeByC_R_P(long companyId, long repositoryId, 465 java.lang.String path) { 466 getPersistence().removeByC_R_P(companyId, repositoryId, path); 467 } 468 469 /** 470 * Returns the number of document library contents where companyId = ? and repositoryId = ? and path = ?. 471 * 472 * @param companyId the company ID 473 * @param repositoryId the repository ID 474 * @param path the path 475 * @return the number of matching document library contents 476 */ 477 public static int countByC_R_P(long companyId, long repositoryId, 478 java.lang.String path) { 479 return getPersistence().countByC_R_P(companyId, repositoryId, path); 480 } 481 482 /** 483 * Returns all the document library contents where companyId = ? and repositoryId = ? and path LIKE ?. 484 * 485 * @param companyId the company ID 486 * @param repositoryId the repository ID 487 * @param path the path 488 * @return the matching document library contents 489 */ 490 public static List<DLContent> findByC_R_LikeP(long companyId, 491 long repositoryId, java.lang.String path) { 492 return getPersistence().findByC_R_LikeP(companyId, repositoryId, path); 493 } 494 495 /** 496 * Returns a range of all the document library contents where companyId = ? and repositoryId = ? and path LIKE ?. 497 * 498 * <p> 499 * 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 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 QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link DLContentModelImpl}. 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. 500 * </p> 501 * 502 * @param companyId the company ID 503 * @param repositoryId the repository ID 504 * @param path the path 505 * @param start the lower bound of the range of document library contents 506 * @param end the upper bound of the range of document library contents (not inclusive) 507 * @return the range of matching document library contents 508 */ 509 public static List<DLContent> findByC_R_LikeP(long companyId, 510 long repositoryId, java.lang.String path, int start, int end) { 511 return getPersistence() 512 .findByC_R_LikeP(companyId, repositoryId, path, start, end); 513 } 514 515 /** 516 * Returns an ordered range of all the document library contents where companyId = ? and repositoryId = ? and path LIKE ?. 517 * 518 * <p> 519 * 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 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 QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link DLContentModelImpl}. 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. 520 * </p> 521 * 522 * @param companyId the company ID 523 * @param repositoryId the repository ID 524 * @param path the path 525 * @param start the lower bound of the range of document library contents 526 * @param end the upper bound of the range of document library contents (not inclusive) 527 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 528 * @return the ordered range of matching document library contents 529 */ 530 public static List<DLContent> findByC_R_LikeP(long companyId, 531 long repositoryId, java.lang.String path, int start, int end, 532 OrderByComparator<DLContent> orderByComparator) { 533 return getPersistence() 534 .findByC_R_LikeP(companyId, repositoryId, path, start, end, 535 orderByComparator); 536 } 537 538 /** 539 * Returns an ordered range of all the document library contents where companyId = ? and repositoryId = ? and path LIKE ?. 540 * 541 * <p> 542 * 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 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 QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link DLContentModelImpl}. 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. 543 * </p> 544 * 545 * @param companyId the company ID 546 * @param repositoryId the repository ID 547 * @param path the path 548 * @param start the lower bound of the range of document library contents 549 * @param end the upper bound of the range of document library contents (not inclusive) 550 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 551 * @param retrieveFromCache whether to retrieve from the finder cache 552 * @return the ordered range of matching document library contents 553 */ 554 public static List<DLContent> findByC_R_LikeP(long companyId, 555 long repositoryId, java.lang.String path, int start, int end, 556 OrderByComparator<DLContent> orderByComparator, 557 boolean retrieveFromCache) { 558 return getPersistence() 559 .findByC_R_LikeP(companyId, repositoryId, path, start, end, 560 orderByComparator, retrieveFromCache); 561 } 562 563 /** 564 * Returns the first document library content in the ordered set where companyId = ? and repositoryId = ? and path LIKE ?. 565 * 566 * @param companyId the company ID 567 * @param repositoryId the repository ID 568 * @param path the path 569 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 570 * @return the first matching document library content 571 * @throws NoSuchContentException if a matching document library content could not be found 572 */ 573 public static DLContent findByC_R_LikeP_First(long companyId, 574 long repositoryId, java.lang.String path, 575 OrderByComparator<DLContent> orderByComparator) 576 throws com.liferay.portlet.documentlibrary.exception.NoSuchContentException { 577 return getPersistence() 578 .findByC_R_LikeP_First(companyId, repositoryId, path, 579 orderByComparator); 580 } 581 582 /** 583 * Returns the first document library content in the ordered set where companyId = ? and repositoryId = ? and path LIKE ?. 584 * 585 * @param companyId the company ID 586 * @param repositoryId the repository ID 587 * @param path the path 588 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 589 * @return the first matching document library content, or <code>null</code> if a matching document library content could not be found 590 */ 591 public static DLContent fetchByC_R_LikeP_First(long companyId, 592 long repositoryId, java.lang.String path, 593 OrderByComparator<DLContent> orderByComparator) { 594 return getPersistence() 595 .fetchByC_R_LikeP_First(companyId, repositoryId, path, 596 orderByComparator); 597 } 598 599 /** 600 * Returns the last document library content in the ordered set where companyId = ? and repositoryId = ? and path LIKE ?. 601 * 602 * @param companyId the company ID 603 * @param repositoryId the repository ID 604 * @param path the path 605 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 606 * @return the last matching document library content 607 * @throws NoSuchContentException if a matching document library content could not be found 608 */ 609 public static DLContent findByC_R_LikeP_Last(long companyId, 610 long repositoryId, java.lang.String path, 611 OrderByComparator<DLContent> orderByComparator) 612 throws com.liferay.portlet.documentlibrary.exception.NoSuchContentException { 613 return getPersistence() 614 .findByC_R_LikeP_Last(companyId, repositoryId, path, 615 orderByComparator); 616 } 617 618 /** 619 * Returns the last document library content in the ordered set where companyId = ? and repositoryId = ? and path LIKE ?. 620 * 621 * @param companyId the company ID 622 * @param repositoryId the repository ID 623 * @param path the path 624 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 625 * @return the last matching document library content, or <code>null</code> if a matching document library content could not be found 626 */ 627 public static DLContent fetchByC_R_LikeP_Last(long companyId, 628 long repositoryId, java.lang.String path, 629 OrderByComparator<DLContent> orderByComparator) { 630 return getPersistence() 631 .fetchByC_R_LikeP_Last(companyId, repositoryId, path, 632 orderByComparator); 633 } 634 635 /** 636 * Returns the document library contents before and after the current document library content in the ordered set where companyId = ? and repositoryId = ? and path LIKE ?. 637 * 638 * @param contentId the primary key of the current document library content 639 * @param companyId the company ID 640 * @param repositoryId the repository ID 641 * @param path the path 642 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 643 * @return the previous, current, and next document library content 644 * @throws NoSuchContentException if a document library content with the primary key could not be found 645 */ 646 public static DLContent[] findByC_R_LikeP_PrevAndNext(long contentId, 647 long companyId, long repositoryId, java.lang.String path, 648 OrderByComparator<DLContent> orderByComparator) 649 throws com.liferay.portlet.documentlibrary.exception.NoSuchContentException { 650 return getPersistence() 651 .findByC_R_LikeP_PrevAndNext(contentId, companyId, 652 repositoryId, path, orderByComparator); 653 } 654 655 /** 656 * Removes all the document library contents where companyId = ? and repositoryId = ? and path LIKE ? from the database. 657 * 658 * @param companyId the company ID 659 * @param repositoryId the repository ID 660 * @param path the path 661 */ 662 public static void removeByC_R_LikeP(long companyId, long repositoryId, 663 java.lang.String path) { 664 getPersistence().removeByC_R_LikeP(companyId, repositoryId, path); 665 } 666 667 /** 668 * Returns the number of document library contents where companyId = ? and repositoryId = ? and path LIKE ?. 669 * 670 * @param companyId the company ID 671 * @param repositoryId the repository ID 672 * @param path the path 673 * @return the number of matching document library contents 674 */ 675 public static int countByC_R_LikeP(long companyId, long repositoryId, 676 java.lang.String path) { 677 return getPersistence().countByC_R_LikeP(companyId, repositoryId, path); 678 } 679 680 /** 681 * Returns the document library content where companyId = ? and repositoryId = ? and path = ? and version = ? or throws a {@link NoSuchContentException} if it could not be found. 682 * 683 * @param companyId the company ID 684 * @param repositoryId the repository ID 685 * @param path the path 686 * @param version the version 687 * @return the matching document library content 688 * @throws NoSuchContentException if a matching document library content could not be found 689 */ 690 public static DLContent findByC_R_P_V(long companyId, long repositoryId, 691 java.lang.String path, java.lang.String version) 692 throws com.liferay.portlet.documentlibrary.exception.NoSuchContentException { 693 return getPersistence() 694 .findByC_R_P_V(companyId, repositoryId, path, version); 695 } 696 697 /** 698 * Returns the document library content where companyId = ? and repositoryId = ? and path = ? and version = ? or returns <code>null</code> if it could not be found. Uses the finder cache. 699 * 700 * @param companyId the company ID 701 * @param repositoryId the repository ID 702 * @param path the path 703 * @param version the version 704 * @return the matching document library content, or <code>null</code> if a matching document library content could not be found 705 */ 706 public static DLContent fetchByC_R_P_V(long companyId, long repositoryId, 707 java.lang.String path, java.lang.String version) { 708 return getPersistence() 709 .fetchByC_R_P_V(companyId, repositoryId, path, version); 710 } 711 712 /** 713 * Returns the document library content where companyId = ? and repositoryId = ? and path = ? and version = ? or returns <code>null</code> if it could not be found, optionally using the finder cache. 714 * 715 * @param companyId the company ID 716 * @param repositoryId the repository ID 717 * @param path the path 718 * @param version the version 719 * @param retrieveFromCache whether to retrieve from the finder cache 720 * @return the matching document library content, or <code>null</code> if a matching document library content could not be found 721 */ 722 public static DLContent fetchByC_R_P_V(long companyId, long repositoryId, 723 java.lang.String path, java.lang.String version, 724 boolean retrieveFromCache) { 725 return getPersistence() 726 .fetchByC_R_P_V(companyId, repositoryId, path, version, 727 retrieveFromCache); 728 } 729 730 /** 731 * Removes the document library content where companyId = ? and repositoryId = ? and path = ? and version = ? from the database. 732 * 733 * @param companyId the company ID 734 * @param repositoryId the repository ID 735 * @param path the path 736 * @param version the version 737 * @return the document library content that was removed 738 */ 739 public static DLContent removeByC_R_P_V(long companyId, long repositoryId, 740 java.lang.String path, java.lang.String version) 741 throws com.liferay.portlet.documentlibrary.exception.NoSuchContentException { 742 return getPersistence() 743 .removeByC_R_P_V(companyId, repositoryId, path, version); 744 } 745 746 /** 747 * Returns the number of document library contents where companyId = ? and repositoryId = ? and path = ? and version = ?. 748 * 749 * @param companyId the company ID 750 * @param repositoryId the repository ID 751 * @param path the path 752 * @param version the version 753 * @return the number of matching document library contents 754 */ 755 public static int countByC_R_P_V(long companyId, long repositoryId, 756 java.lang.String path, java.lang.String version) { 757 return getPersistence() 758 .countByC_R_P_V(companyId, repositoryId, path, version); 759 } 760 761 /** 762 * Caches the document library content in the entity cache if it is enabled. 763 * 764 * @param dlContent the document library content 765 */ 766 public static void cacheResult(DLContent dlContent) { 767 getPersistence().cacheResult(dlContent); 768 } 769 770 /** 771 * Caches the document library contents in the entity cache if it is enabled. 772 * 773 * @param dlContents the document library contents 774 */ 775 public static void cacheResult(List<DLContent> dlContents) { 776 getPersistence().cacheResult(dlContents); 777 } 778 779 /** 780 * Creates a new document library content with the primary key. Does not add the document library content to the database. 781 * 782 * @param contentId the primary key for the new document library content 783 * @return the new document library content 784 */ 785 public static DLContent create(long contentId) { 786 return getPersistence().create(contentId); 787 } 788 789 /** 790 * Removes the document library content with the primary key from the database. Also notifies the appropriate model listeners. 791 * 792 * @param contentId the primary key of the document library content 793 * @return the document library content that was removed 794 * @throws NoSuchContentException if a document library content with the primary key could not be found 795 */ 796 public static DLContent remove(long contentId) 797 throws com.liferay.portlet.documentlibrary.exception.NoSuchContentException { 798 return getPersistence().remove(contentId); 799 } 800 801 public static DLContent updateImpl(DLContent dlContent) { 802 return getPersistence().updateImpl(dlContent); 803 } 804 805 /** 806 * Returns the document library content with the primary key or throws a {@link NoSuchContentException} if it could not be found. 807 * 808 * @param contentId the primary key of the document library content 809 * @return the document library content 810 * @throws NoSuchContentException if a document library content with the primary key could not be found 811 */ 812 public static DLContent findByPrimaryKey(long contentId) 813 throws com.liferay.portlet.documentlibrary.exception.NoSuchContentException { 814 return getPersistence().findByPrimaryKey(contentId); 815 } 816 817 /** 818 * Returns the document library content with the primary key or returns <code>null</code> if it could not be found. 819 * 820 * @param contentId the primary key of the document library content 821 * @return the document library content, or <code>null</code> if a document library content with the primary key could not be found 822 */ 823 public static DLContent fetchByPrimaryKey(long contentId) { 824 return getPersistence().fetchByPrimaryKey(contentId); 825 } 826 827 public static java.util.Map<java.io.Serializable, DLContent> fetchByPrimaryKeys( 828 java.util.Set<java.io.Serializable> primaryKeys) { 829 return getPersistence().fetchByPrimaryKeys(primaryKeys); 830 } 831 832 /** 833 * Returns all the document library contents. 834 * 835 * @return the document library contents 836 */ 837 public static List<DLContent> findAll() { 838 return getPersistence().findAll(); 839 } 840 841 /** 842 * Returns a range of all the document library contents. 843 * 844 * <p> 845 * 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 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 QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link DLContentModelImpl}. 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. 846 * </p> 847 * 848 * @param start the lower bound of the range of document library contents 849 * @param end the upper bound of the range of document library contents (not inclusive) 850 * @return the range of document library contents 851 */ 852 public static List<DLContent> findAll(int start, int end) { 853 return getPersistence().findAll(start, end); 854 } 855 856 /** 857 * Returns an ordered range of all the document library contents. 858 * 859 * <p> 860 * 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 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 QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link DLContentModelImpl}. 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. 861 * </p> 862 * 863 * @param start the lower bound of the range of document library contents 864 * @param end the upper bound of the range of document library contents (not inclusive) 865 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 866 * @return the ordered range of document library contents 867 */ 868 public static List<DLContent> findAll(int start, int end, 869 OrderByComparator<DLContent> orderByComparator) { 870 return getPersistence().findAll(start, end, orderByComparator); 871 } 872 873 /** 874 * Returns an ordered range of all the document library contents. 875 * 876 * <p> 877 * 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 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 QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link DLContentModelImpl}. 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. 878 * </p> 879 * 880 * @param start the lower bound of the range of document library contents 881 * @param end the upper bound of the range of document library contents (not inclusive) 882 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 883 * @param retrieveFromCache whether to retrieve from the finder cache 884 * @return the ordered range of document library contents 885 */ 886 public static List<DLContent> findAll(int start, int end, 887 OrderByComparator<DLContent> orderByComparator, 888 boolean retrieveFromCache) { 889 return getPersistence() 890 .findAll(start, end, orderByComparator, retrieveFromCache); 891 } 892 893 /** 894 * Removes all the document library contents from the database. 895 */ 896 public static void removeAll() { 897 getPersistence().removeAll(); 898 } 899 900 /** 901 * Returns the number of document library contents. 902 * 903 * @return the number of document library contents 904 */ 905 public static int countAll() { 906 return getPersistence().countAll(); 907 } 908 909 public static java.util.Set<java.lang.String> getBadColumnNames() { 910 return getPersistence().getBadColumnNames(); 911 } 912 913 public static DLContentPersistence getPersistence() { 914 if (_persistence == null) { 915 _persistence = (DLContentPersistence)PortalBeanLocatorUtil.locate(DLContentPersistence.class.getName()); 916 917 ReferenceRegistry.registerReference(DLContentUtil.class, 918 "_persistence"); 919 } 920 921 return _persistence; 922 } 923 924 private static DLContentPersistence _persistence; 925 }