001 /** 002 * Copyright (c) 2000-present Liferay, Inc. All rights reserved. 003 * 004 * This library is free software; you can redistribute it and/or modify it under 005 * the terms of the GNU Lesser General Public License as published by the Free 006 * Software Foundation; either version 2.1 of the License, or (at your option) 007 * any later version. 008 * 009 * This library is distributed in the hope that it will be useful, but WITHOUT 010 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 011 * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more 012 * details. 013 */ 014 015 package com.liferay.portlet.dynamicdatamapping.service.persistence; 016 017 import aQute.bnd.annotation.ProviderType; 018 019 import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil; 020 import com.liferay.portal.kernel.dao.orm.DynamicQuery; 021 import com.liferay.portal.kernel.util.OrderByComparator; 022 import com.liferay.portal.kernel.util.ReferenceRegistry; 023 import com.liferay.portal.service.ServiceContext; 024 025 import com.liferay.portlet.dynamicdatamapping.model.DDMTemplateVersion; 026 027 import java.util.List; 028 029 /** 030 * The persistence utility for the d d m template version service. This utility wraps {@link com.liferay.portlet.dynamicdatamapping.service.persistence.impl.DDMTemplateVersionPersistenceImpl} and provides direct access to the database for CRUD operations. This utility should only be used by the service layer, as it must operate within a transaction. Never access this utility in a JSP, controller, model, or other front-end class. 031 * 032 * <p> 033 * Caching information and settings can be found in <code>portal.properties</code> 034 * </p> 035 * 036 * @author Brian Wing Shun Chan 037 * @see DDMTemplateVersionPersistence 038 * @see com.liferay.portlet.dynamicdatamapping.service.persistence.impl.DDMTemplateVersionPersistenceImpl 039 * @generated 040 */ 041 @ProviderType 042 public class DDMTemplateVersionUtil { 043 /* 044 * NOTE FOR DEVELOPERS: 045 * 046 * Never modify this class directly. Modify <code>service.xml</code> and rerun ServiceBuilder to regenerate this class. 047 */ 048 049 /** 050 * @see com.liferay.portal.service.persistence.BasePersistence#clearCache() 051 */ 052 public static void clearCache() { 053 getPersistence().clearCache(); 054 } 055 056 /** 057 * @see com.liferay.portal.service.persistence.BasePersistence#clearCache(com.liferay.portal.model.BaseModel) 058 */ 059 public static void clearCache(DDMTemplateVersion ddmTemplateVersion) { 060 getPersistence().clearCache(ddmTemplateVersion); 061 } 062 063 /** 064 * @see com.liferay.portal.service.persistence.BasePersistence#countWithDynamicQuery(DynamicQuery) 065 */ 066 public static long countWithDynamicQuery(DynamicQuery dynamicQuery) { 067 return getPersistence().countWithDynamicQuery(dynamicQuery); 068 } 069 070 /** 071 * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery) 072 */ 073 public static List<DDMTemplateVersion> findWithDynamicQuery( 074 DynamicQuery dynamicQuery) { 075 return getPersistence().findWithDynamicQuery(dynamicQuery); 076 } 077 078 /** 079 * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery, int, int) 080 */ 081 public static List<DDMTemplateVersion> findWithDynamicQuery( 082 DynamicQuery dynamicQuery, int start, int end) { 083 return getPersistence().findWithDynamicQuery(dynamicQuery, start, end); 084 } 085 086 /** 087 * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery, int, int, OrderByComparator) 088 */ 089 public static List<DDMTemplateVersion> findWithDynamicQuery( 090 DynamicQuery dynamicQuery, int start, int end, 091 OrderByComparator<DDMTemplateVersion> orderByComparator) { 092 return getPersistence() 093 .findWithDynamicQuery(dynamicQuery, start, end, 094 orderByComparator); 095 } 096 097 /** 098 * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel) 099 */ 100 public static DDMTemplateVersion update( 101 DDMTemplateVersion ddmTemplateVersion) { 102 return getPersistence().update(ddmTemplateVersion); 103 } 104 105 /** 106 * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, ServiceContext) 107 */ 108 public static DDMTemplateVersion update( 109 DDMTemplateVersion ddmTemplateVersion, ServiceContext serviceContext) { 110 return getPersistence().update(ddmTemplateVersion, serviceContext); 111 } 112 113 /** 114 * Returns all the d d m template versions where templateId = ?. 115 * 116 * @param templateId the template ID 117 * @return the matching d d m template versions 118 */ 119 public static List<DDMTemplateVersion> findByTemplateId(long templateId) { 120 return getPersistence().findByTemplateId(templateId); 121 } 122 123 /** 124 * Returns a range of all the d d m template versions where templateId = ?. 125 * 126 * <p> 127 * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link DDMTemplateVersionModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. 128 * </p> 129 * 130 * @param templateId the template ID 131 * @param start the lower bound of the range of d d m template versions 132 * @param end the upper bound of the range of d d m template versions (not inclusive) 133 * @return the range of matching d d m template versions 134 */ 135 public static List<DDMTemplateVersion> findByTemplateId(long templateId, 136 int start, int end) { 137 return getPersistence().findByTemplateId(templateId, start, end); 138 } 139 140 /** 141 * Returns an ordered range of all the d d m template versions where templateId = ?. 142 * 143 * <p> 144 * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link DDMTemplateVersionModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. 145 * </p> 146 * 147 * @param templateId the template ID 148 * @param start the lower bound of the range of d d m template versions 149 * @param end the upper bound of the range of d d m template versions (not inclusive) 150 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 151 * @return the ordered range of matching d d m template versions 152 */ 153 public static List<DDMTemplateVersion> findByTemplateId(long templateId, 154 int start, int end, 155 OrderByComparator<DDMTemplateVersion> orderByComparator) { 156 return getPersistence() 157 .findByTemplateId(templateId, start, end, orderByComparator); 158 } 159 160 /** 161 * Returns the first d d m template version in the ordered set where templateId = ?. 162 * 163 * @param templateId the template ID 164 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 165 * @return the first matching d d m template version 166 * @throws NoSuchTemplateVersionException if a matching d d m template version could not be found 167 */ 168 public static DDMTemplateVersion findByTemplateId_First(long templateId, 169 OrderByComparator<DDMTemplateVersion> orderByComparator) 170 throws com.liferay.portlet.dynamicdatamapping.NoSuchTemplateVersionException { 171 return getPersistence() 172 .findByTemplateId_First(templateId, orderByComparator); 173 } 174 175 /** 176 * Returns the first d d m template version in the ordered set where templateId = ?. 177 * 178 * @param templateId the template ID 179 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 180 * @return the first matching d d m template version, or <code>null</code> if a matching d d m template version could not be found 181 */ 182 public static DDMTemplateVersion fetchByTemplateId_First(long templateId, 183 OrderByComparator<DDMTemplateVersion> orderByComparator) { 184 return getPersistence() 185 .fetchByTemplateId_First(templateId, orderByComparator); 186 } 187 188 /** 189 * Returns the last d d m template version in the ordered set where templateId = ?. 190 * 191 * @param templateId the template ID 192 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 193 * @return the last matching d d m template version 194 * @throws NoSuchTemplateVersionException if a matching d d m template version could not be found 195 */ 196 public static DDMTemplateVersion findByTemplateId_Last(long templateId, 197 OrderByComparator<DDMTemplateVersion> orderByComparator) 198 throws com.liferay.portlet.dynamicdatamapping.NoSuchTemplateVersionException { 199 return getPersistence() 200 .findByTemplateId_Last(templateId, orderByComparator); 201 } 202 203 /** 204 * Returns the last d d m template version in the ordered set where templateId = ?. 205 * 206 * @param templateId the template ID 207 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 208 * @return the last matching d d m template version, or <code>null</code> if a matching d d m template version could not be found 209 */ 210 public static DDMTemplateVersion fetchByTemplateId_Last(long templateId, 211 OrderByComparator<DDMTemplateVersion> orderByComparator) { 212 return getPersistence() 213 .fetchByTemplateId_Last(templateId, orderByComparator); 214 } 215 216 /** 217 * Returns the d d m template versions before and after the current d d m template version in the ordered set where templateId = ?. 218 * 219 * @param templateVersionId the primary key of the current d d m template version 220 * @param templateId the template ID 221 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 222 * @return the previous, current, and next d d m template version 223 * @throws NoSuchTemplateVersionException if a d d m template version with the primary key could not be found 224 */ 225 public static DDMTemplateVersion[] findByTemplateId_PrevAndNext( 226 long templateVersionId, long templateId, 227 OrderByComparator<DDMTemplateVersion> orderByComparator) 228 throws com.liferay.portlet.dynamicdatamapping.NoSuchTemplateVersionException { 229 return getPersistence() 230 .findByTemplateId_PrevAndNext(templateVersionId, templateId, 231 orderByComparator); 232 } 233 234 /** 235 * Removes all the d d m template versions where templateId = ? from the database. 236 * 237 * @param templateId the template ID 238 */ 239 public static void removeByTemplateId(long templateId) { 240 getPersistence().removeByTemplateId(templateId); 241 } 242 243 /** 244 * Returns the number of d d m template versions where templateId = ?. 245 * 246 * @param templateId the template ID 247 * @return the number of matching d d m template versions 248 */ 249 public static int countByTemplateId(long templateId) { 250 return getPersistence().countByTemplateId(templateId); 251 } 252 253 /** 254 * Returns the d d m template version where templateId = ? and version = ? or throws a {@link NoSuchTemplateVersionException} if it could not be found. 255 * 256 * @param templateId the template ID 257 * @param version the version 258 * @return the matching d d m template version 259 * @throws NoSuchTemplateVersionException if a matching d d m template version could not be found 260 */ 261 public static DDMTemplateVersion findByT_V(long templateId, 262 java.lang.String version) 263 throws com.liferay.portlet.dynamicdatamapping.NoSuchTemplateVersionException { 264 return getPersistence().findByT_V(templateId, version); 265 } 266 267 /** 268 * Returns the d d m template version where templateId = ? and version = ? or returns <code>null</code> if it could not be found. Uses the finder cache. 269 * 270 * @param templateId the template ID 271 * @param version the version 272 * @return the matching d d m template version, or <code>null</code> if a matching d d m template version could not be found 273 */ 274 public static DDMTemplateVersion fetchByT_V(long templateId, 275 java.lang.String version) { 276 return getPersistence().fetchByT_V(templateId, version); 277 } 278 279 /** 280 * Returns the d d m template version where templateId = ? and version = ? or returns <code>null</code> if it could not be found, optionally using the finder cache. 281 * 282 * @param templateId the template ID 283 * @param version the version 284 * @param retrieveFromCache whether to use the finder cache 285 * @return the matching d d m template version, or <code>null</code> if a matching d d m template version could not be found 286 */ 287 public static DDMTemplateVersion fetchByT_V(long templateId, 288 java.lang.String version, boolean retrieveFromCache) { 289 return getPersistence() 290 .fetchByT_V(templateId, version, retrieveFromCache); 291 } 292 293 /** 294 * Removes the d d m template version where templateId = ? and version = ? from the database. 295 * 296 * @param templateId the template ID 297 * @param version the version 298 * @return the d d m template version that was removed 299 */ 300 public static DDMTemplateVersion removeByT_V(long templateId, 301 java.lang.String version) 302 throws com.liferay.portlet.dynamicdatamapping.NoSuchTemplateVersionException { 303 return getPersistence().removeByT_V(templateId, version); 304 } 305 306 /** 307 * Returns the number of d d m template versions where templateId = ? and version = ?. 308 * 309 * @param templateId the template ID 310 * @param version the version 311 * @return the number of matching d d m template versions 312 */ 313 public static int countByT_V(long templateId, java.lang.String version) { 314 return getPersistence().countByT_V(templateId, version); 315 } 316 317 /** 318 * Returns all the d d m template versions where templateId = ? and status = ?. 319 * 320 * @param templateId the template ID 321 * @param status the status 322 * @return the matching d d m template versions 323 */ 324 public static List<DDMTemplateVersion> findByT_S(long templateId, int status) { 325 return getPersistence().findByT_S(templateId, status); 326 } 327 328 /** 329 * Returns a range of all the d d m template versions where templateId = ? and status = ?. 330 * 331 * <p> 332 * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link DDMTemplateVersionModelImpl}. 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. 333 * </p> 334 * 335 * @param templateId the template ID 336 * @param status the status 337 * @param start the lower bound of the range of d d m template versions 338 * @param end the upper bound of the range of d d m template versions (not inclusive) 339 * @return the range of matching d d m template versions 340 */ 341 public static List<DDMTemplateVersion> findByT_S(long templateId, 342 int status, int start, int end) { 343 return getPersistence().findByT_S(templateId, status, start, end); 344 } 345 346 /** 347 * Returns an ordered range of all the d d m template versions where templateId = ? and status = ?. 348 * 349 * <p> 350 * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link DDMTemplateVersionModelImpl}. 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. 351 * </p> 352 * 353 * @param templateId the template ID 354 * @param status the status 355 * @param start the lower bound of the range of d d m template versions 356 * @param end the upper bound of the range of d d m template versions (not inclusive) 357 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 358 * @return the ordered range of matching d d m template versions 359 */ 360 public static List<DDMTemplateVersion> findByT_S(long templateId, 361 int status, int start, int end, 362 OrderByComparator<DDMTemplateVersion> orderByComparator) { 363 return getPersistence() 364 .findByT_S(templateId, status, start, end, orderByComparator); 365 } 366 367 /** 368 * Returns the first d d m template version in the ordered set where templateId = ? and status = ?. 369 * 370 * @param templateId the template ID 371 * @param status the status 372 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 373 * @return the first matching d d m template version 374 * @throws NoSuchTemplateVersionException if a matching d d m template version could not be found 375 */ 376 public static DDMTemplateVersion findByT_S_First(long templateId, 377 int status, OrderByComparator<DDMTemplateVersion> orderByComparator) 378 throws com.liferay.portlet.dynamicdatamapping.NoSuchTemplateVersionException { 379 return getPersistence() 380 .findByT_S_First(templateId, status, orderByComparator); 381 } 382 383 /** 384 * Returns the first d d m template version in the ordered set where templateId = ? and status = ?. 385 * 386 * @param templateId the template ID 387 * @param status the status 388 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 389 * @return the first matching d d m template version, or <code>null</code> if a matching d d m template version could not be found 390 */ 391 public static DDMTemplateVersion fetchByT_S_First(long templateId, 392 int status, OrderByComparator<DDMTemplateVersion> orderByComparator) { 393 return getPersistence() 394 .fetchByT_S_First(templateId, status, orderByComparator); 395 } 396 397 /** 398 * Returns the last d d m template version in the ordered set where templateId = ? and status = ?. 399 * 400 * @param templateId the template ID 401 * @param status the status 402 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 403 * @return the last matching d d m template version 404 * @throws NoSuchTemplateVersionException if a matching d d m template version could not be found 405 */ 406 public static DDMTemplateVersion findByT_S_Last(long templateId, 407 int status, OrderByComparator<DDMTemplateVersion> orderByComparator) 408 throws com.liferay.portlet.dynamicdatamapping.NoSuchTemplateVersionException { 409 return getPersistence() 410 .findByT_S_Last(templateId, status, orderByComparator); 411 } 412 413 /** 414 * Returns the last d d m template version in the ordered set where templateId = ? and status = ?. 415 * 416 * @param templateId the template ID 417 * @param status the status 418 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 419 * @return the last matching d d m template version, or <code>null</code> if a matching d d m template version could not be found 420 */ 421 public static DDMTemplateVersion fetchByT_S_Last(long templateId, 422 int status, OrderByComparator<DDMTemplateVersion> orderByComparator) { 423 return getPersistence() 424 .fetchByT_S_Last(templateId, status, orderByComparator); 425 } 426 427 /** 428 * Returns the d d m template versions before and after the current d d m template version in the ordered set where templateId = ? and status = ?. 429 * 430 * @param templateVersionId the primary key of the current d d m template version 431 * @param templateId the template ID 432 * @param status the status 433 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 434 * @return the previous, current, and next d d m template version 435 * @throws NoSuchTemplateVersionException if a d d m template version with the primary key could not be found 436 */ 437 public static DDMTemplateVersion[] findByT_S_PrevAndNext( 438 long templateVersionId, long templateId, int status, 439 OrderByComparator<DDMTemplateVersion> orderByComparator) 440 throws com.liferay.portlet.dynamicdatamapping.NoSuchTemplateVersionException { 441 return getPersistence() 442 .findByT_S_PrevAndNext(templateVersionId, templateId, 443 status, orderByComparator); 444 } 445 446 /** 447 * Removes all the d d m template versions where templateId = ? and status = ? from the database. 448 * 449 * @param templateId the template ID 450 * @param status the status 451 */ 452 public static void removeByT_S(long templateId, int status) { 453 getPersistence().removeByT_S(templateId, status); 454 } 455 456 /** 457 * Returns the number of d d m template versions where templateId = ? and status = ?. 458 * 459 * @param templateId the template ID 460 * @param status the status 461 * @return the number of matching d d m template versions 462 */ 463 public static int countByT_S(long templateId, int status) { 464 return getPersistence().countByT_S(templateId, status); 465 } 466 467 /** 468 * Caches the d d m template version in the entity cache if it is enabled. 469 * 470 * @param ddmTemplateVersion the d d m template version 471 */ 472 public static void cacheResult(DDMTemplateVersion ddmTemplateVersion) { 473 getPersistence().cacheResult(ddmTemplateVersion); 474 } 475 476 /** 477 * Caches the d d m template versions in the entity cache if it is enabled. 478 * 479 * @param ddmTemplateVersions the d d m template versions 480 */ 481 public static void cacheResult(List<DDMTemplateVersion> ddmTemplateVersions) { 482 getPersistence().cacheResult(ddmTemplateVersions); 483 } 484 485 /** 486 * Creates a new d d m template version with the primary key. Does not add the d d m template version to the database. 487 * 488 * @param templateVersionId the primary key for the new d d m template version 489 * @return the new d d m template version 490 */ 491 public static DDMTemplateVersion create(long templateVersionId) { 492 return getPersistence().create(templateVersionId); 493 } 494 495 /** 496 * Removes the d d m template version with the primary key from the database. Also notifies the appropriate model listeners. 497 * 498 * @param templateVersionId the primary key of the d d m template version 499 * @return the d d m template version that was removed 500 * @throws NoSuchTemplateVersionException if a d d m template version with the primary key could not be found 501 */ 502 public static DDMTemplateVersion remove(long templateVersionId) 503 throws com.liferay.portlet.dynamicdatamapping.NoSuchTemplateVersionException { 504 return getPersistence().remove(templateVersionId); 505 } 506 507 public static DDMTemplateVersion updateImpl( 508 DDMTemplateVersion ddmTemplateVersion) { 509 return getPersistence().updateImpl(ddmTemplateVersion); 510 } 511 512 /** 513 * Returns the d d m template version with the primary key or throws a {@link NoSuchTemplateVersionException} if it could not be found. 514 * 515 * @param templateVersionId the primary key of the d d m template version 516 * @return the d d m template version 517 * @throws NoSuchTemplateVersionException if a d d m template version with the primary key could not be found 518 */ 519 public static DDMTemplateVersion findByPrimaryKey(long templateVersionId) 520 throws com.liferay.portlet.dynamicdatamapping.NoSuchTemplateVersionException { 521 return getPersistence().findByPrimaryKey(templateVersionId); 522 } 523 524 /** 525 * Returns the d d m template version with the primary key or returns <code>null</code> if it could not be found. 526 * 527 * @param templateVersionId the primary key of the d d m template version 528 * @return the d d m template version, or <code>null</code> if a d d m template version with the primary key could not be found 529 */ 530 public static DDMTemplateVersion fetchByPrimaryKey(long templateVersionId) { 531 return getPersistence().fetchByPrimaryKey(templateVersionId); 532 } 533 534 public static java.util.Map<java.io.Serializable, DDMTemplateVersion> fetchByPrimaryKeys( 535 java.util.Set<java.io.Serializable> primaryKeys) { 536 return getPersistence().fetchByPrimaryKeys(primaryKeys); 537 } 538 539 /** 540 * Returns all the d d m template versions. 541 * 542 * @return the d d m template versions 543 */ 544 public static List<DDMTemplateVersion> findAll() { 545 return getPersistence().findAll(); 546 } 547 548 /** 549 * Returns a range of all the d d m template versions. 550 * 551 * <p> 552 * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link DDMTemplateVersionModelImpl}. 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. 553 * </p> 554 * 555 * @param start the lower bound of the range of d d m template versions 556 * @param end the upper bound of the range of d d m template versions (not inclusive) 557 * @return the range of d d m template versions 558 */ 559 public static List<DDMTemplateVersion> findAll(int start, int end) { 560 return getPersistence().findAll(start, end); 561 } 562 563 /** 564 * Returns an ordered range of all the d d m template versions. 565 * 566 * <p> 567 * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link DDMTemplateVersionModelImpl}. 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. 568 * </p> 569 * 570 * @param start the lower bound of the range of d d m template versions 571 * @param end the upper bound of the range of d d m template versions (not inclusive) 572 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 573 * @return the ordered range of d d m template versions 574 */ 575 public static List<DDMTemplateVersion> findAll(int start, int end, 576 OrderByComparator<DDMTemplateVersion> orderByComparator) { 577 return getPersistence().findAll(start, end, orderByComparator); 578 } 579 580 /** 581 * Removes all the d d m template versions from the database. 582 */ 583 public static void removeAll() { 584 getPersistence().removeAll(); 585 } 586 587 /** 588 * Returns the number of d d m template versions. 589 * 590 * @return the number of d d m template versions 591 */ 592 public static int countAll() { 593 return getPersistence().countAll(); 594 } 595 596 public static DDMTemplateVersionPersistence getPersistence() { 597 if (_persistence == null) { 598 _persistence = (DDMTemplateVersionPersistence)PortalBeanLocatorUtil.locate(DDMTemplateVersionPersistence.class.getName()); 599 600 ReferenceRegistry.registerReference(DDMTemplateVersionUtil.class, 601 "_persistence"); 602 } 603 604 return _persistence; 605 } 606 607 /** 608 * @deprecated As of 6.2.0 609 */ 610 @Deprecated 611 public void setPersistence(DDMTemplateVersionPersistence persistence) { 612 } 613 614 private static DDMTemplateVersionPersistence _persistence; 615 }