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