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