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