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.DDMTemplateLink; 026 027 import java.util.List; 028 029 /** 030 * The persistence utility for the d d m template link service. This utility wraps {@link com.liferay.portlet.dynamicdatamapping.service.persistence.impl.DDMTemplateLinkPersistenceImpl} 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 DDMTemplateLinkPersistence 038 * @see com.liferay.portlet.dynamicdatamapping.service.persistence.impl.DDMTemplateLinkPersistenceImpl 039 * @generated 040 */ 041 @ProviderType 042 public class DDMTemplateLinkUtil { 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(DDMTemplateLink ddmTemplateLink) { 060 getPersistence().clearCache(ddmTemplateLink); 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<DDMTemplateLink> 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<DDMTemplateLink> 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<DDMTemplateLink> findWithDynamicQuery( 090 DynamicQuery dynamicQuery, int start, int end, 091 OrderByComparator<DDMTemplateLink> 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 DDMTemplateLink update(DDMTemplateLink ddmTemplateLink) { 101 return getPersistence().update(ddmTemplateLink); 102 } 103 104 /** 105 * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, ServiceContext) 106 */ 107 public static DDMTemplateLink update(DDMTemplateLink ddmTemplateLink, 108 ServiceContext serviceContext) { 109 return getPersistence().update(ddmTemplateLink, serviceContext); 110 } 111 112 /** 113 * Returns all the d d m template links where classNameId = ?. 114 * 115 * @param classNameId the class name ID 116 * @return the matching d d m template links 117 */ 118 public static List<DDMTemplateLink> findByClassNameId(long classNameId) { 119 return getPersistence().findByClassNameId(classNameId); 120 } 121 122 /** 123 * Returns a range of all the d d m template links where classNameId = ?. 124 * 125 * <p> 126 * 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 DDMTemplateLinkModelImpl}. 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. 127 * </p> 128 * 129 * @param classNameId the class name ID 130 * @param start the lower bound of the range of d d m template links 131 * @param end the upper bound of the range of d d m template links (not inclusive) 132 * @return the range of matching d d m template links 133 */ 134 public static List<DDMTemplateLink> findByClassNameId(long classNameId, 135 int start, int end) { 136 return getPersistence().findByClassNameId(classNameId, start, end); 137 } 138 139 /** 140 * Returns an ordered range of all the d d m template links where classNameId = ?. 141 * 142 * <p> 143 * 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 DDMTemplateLinkModelImpl}. 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. 144 * </p> 145 * 146 * @param classNameId the class name ID 147 * @param start the lower bound of the range of d d m template links 148 * @param end the upper bound of the range of d d m template links (not inclusive) 149 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 150 * @return the ordered range of matching d d m template links 151 */ 152 public static List<DDMTemplateLink> findByClassNameId(long classNameId, 153 int start, int end, OrderByComparator<DDMTemplateLink> orderByComparator) { 154 return getPersistence() 155 .findByClassNameId(classNameId, start, end, orderByComparator); 156 } 157 158 /** 159 * Returns the first d d m template link in the ordered set where classNameId = ?. 160 * 161 * @param classNameId the class name ID 162 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 163 * @return the first matching d d m template link 164 * @throws NoSuchTemplateLinkException if a matching d d m template link could not be found 165 */ 166 public static DDMTemplateLink findByClassNameId_First(long classNameId, 167 OrderByComparator<DDMTemplateLink> orderByComparator) 168 throws com.liferay.portlet.dynamicdatamapping.NoSuchTemplateLinkException { 169 return getPersistence() 170 .findByClassNameId_First(classNameId, orderByComparator); 171 } 172 173 /** 174 * Returns the first d d m template link in the ordered set where classNameId = ?. 175 * 176 * @param classNameId the class name ID 177 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 178 * @return the first matching d d m template link, or <code>null</code> if a matching d d m template link could not be found 179 */ 180 public static DDMTemplateLink fetchByClassNameId_First(long classNameId, 181 OrderByComparator<DDMTemplateLink> orderByComparator) { 182 return getPersistence() 183 .fetchByClassNameId_First(classNameId, orderByComparator); 184 } 185 186 /** 187 * Returns the last d d m template link in the ordered set where classNameId = ?. 188 * 189 * @param classNameId the class name ID 190 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 191 * @return the last matching d d m template link 192 * @throws NoSuchTemplateLinkException if a matching d d m template link could not be found 193 */ 194 public static DDMTemplateLink findByClassNameId_Last(long classNameId, 195 OrderByComparator<DDMTemplateLink> orderByComparator) 196 throws com.liferay.portlet.dynamicdatamapping.NoSuchTemplateLinkException { 197 return getPersistence() 198 .findByClassNameId_Last(classNameId, orderByComparator); 199 } 200 201 /** 202 * Returns the last d d m template link in the ordered set where classNameId = ?. 203 * 204 * @param classNameId the class name ID 205 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 206 * @return the last matching d d m template link, or <code>null</code> if a matching d d m template link could not be found 207 */ 208 public static DDMTemplateLink fetchByClassNameId_Last(long classNameId, 209 OrderByComparator<DDMTemplateLink> orderByComparator) { 210 return getPersistence() 211 .fetchByClassNameId_Last(classNameId, orderByComparator); 212 } 213 214 /** 215 * Returns the d d m template links before and after the current d d m template link in the ordered set where classNameId = ?. 216 * 217 * @param templateLinkId the primary key of the current d d m template link 218 * @param classNameId the class name ID 219 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 220 * @return the previous, current, and next d d m template link 221 * @throws NoSuchTemplateLinkException if a d d m template link with the primary key could not be found 222 */ 223 public static DDMTemplateLink[] findByClassNameId_PrevAndNext( 224 long templateLinkId, long classNameId, 225 OrderByComparator<DDMTemplateLink> orderByComparator) 226 throws com.liferay.portlet.dynamicdatamapping.NoSuchTemplateLinkException { 227 return getPersistence() 228 .findByClassNameId_PrevAndNext(templateLinkId, classNameId, 229 orderByComparator); 230 } 231 232 /** 233 * Removes all the d d m template links where classNameId = ? from the database. 234 * 235 * @param classNameId the class name ID 236 */ 237 public static void removeByClassNameId(long classNameId) { 238 getPersistence().removeByClassNameId(classNameId); 239 } 240 241 /** 242 * Returns the number of d d m template links where classNameId = ?. 243 * 244 * @param classNameId the class name ID 245 * @return the number of matching d d m template links 246 */ 247 public static int countByClassNameId(long classNameId) { 248 return getPersistence().countByClassNameId(classNameId); 249 } 250 251 /** 252 * Returns all the d d m template links where templateId = ?. 253 * 254 * @param templateId the template ID 255 * @return the matching d d m template links 256 */ 257 public static List<DDMTemplateLink> findByTemplateId(long templateId) { 258 return getPersistence().findByTemplateId(templateId); 259 } 260 261 /** 262 * Returns a range of all the d d m template links where templateId = ?. 263 * 264 * <p> 265 * 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 DDMTemplateLinkModelImpl}. 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. 266 * </p> 267 * 268 * @param templateId the template ID 269 * @param start the lower bound of the range of d d m template links 270 * @param end the upper bound of the range of d d m template links (not inclusive) 271 * @return the range of matching d d m template links 272 */ 273 public static List<DDMTemplateLink> findByTemplateId(long templateId, 274 int start, int end) { 275 return getPersistence().findByTemplateId(templateId, start, end); 276 } 277 278 /** 279 * Returns an ordered range of all the d d m template links where templateId = ?. 280 * 281 * <p> 282 * 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 DDMTemplateLinkModelImpl}. 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. 283 * </p> 284 * 285 * @param templateId the template ID 286 * @param start the lower bound of the range of d d m template links 287 * @param end the upper bound of the range of d d m template links (not inclusive) 288 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 289 * @return the ordered range of matching d d m template links 290 */ 291 public static List<DDMTemplateLink> findByTemplateId(long templateId, 292 int start, int end, OrderByComparator<DDMTemplateLink> orderByComparator) { 293 return getPersistence() 294 .findByTemplateId(templateId, start, end, orderByComparator); 295 } 296 297 /** 298 * Returns the first d d m template link in the ordered set where templateId = ?. 299 * 300 * @param templateId the template ID 301 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 302 * @return the first matching d d m template link 303 * @throws NoSuchTemplateLinkException if a matching d d m template link could not be found 304 */ 305 public static DDMTemplateLink findByTemplateId_First(long templateId, 306 OrderByComparator<DDMTemplateLink> orderByComparator) 307 throws com.liferay.portlet.dynamicdatamapping.NoSuchTemplateLinkException { 308 return getPersistence() 309 .findByTemplateId_First(templateId, orderByComparator); 310 } 311 312 /** 313 * Returns the first d d m template link in the ordered set where templateId = ?. 314 * 315 * @param templateId the template ID 316 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 317 * @return the first matching d d m template link, or <code>null</code> if a matching d d m template link could not be found 318 */ 319 public static DDMTemplateLink fetchByTemplateId_First(long templateId, 320 OrderByComparator<DDMTemplateLink> orderByComparator) { 321 return getPersistence() 322 .fetchByTemplateId_First(templateId, orderByComparator); 323 } 324 325 /** 326 * Returns the last d d m template link in the ordered set where templateId = ?. 327 * 328 * @param templateId the template ID 329 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 330 * @return the last matching d d m template link 331 * @throws NoSuchTemplateLinkException if a matching d d m template link could not be found 332 */ 333 public static DDMTemplateLink findByTemplateId_Last(long templateId, 334 OrderByComparator<DDMTemplateLink> orderByComparator) 335 throws com.liferay.portlet.dynamicdatamapping.NoSuchTemplateLinkException { 336 return getPersistence() 337 .findByTemplateId_Last(templateId, orderByComparator); 338 } 339 340 /** 341 * Returns the last d d m template link in the ordered set where templateId = ?. 342 * 343 * @param templateId the template ID 344 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 345 * @return the last matching d d m template link, or <code>null</code> if a matching d d m template link could not be found 346 */ 347 public static DDMTemplateLink fetchByTemplateId_Last(long templateId, 348 OrderByComparator<DDMTemplateLink> orderByComparator) { 349 return getPersistence() 350 .fetchByTemplateId_Last(templateId, orderByComparator); 351 } 352 353 /** 354 * Returns the d d m template links before and after the current d d m template link in the ordered set where templateId = ?. 355 * 356 * @param templateLinkId the primary key of the current d d m template link 357 * @param templateId the template ID 358 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 359 * @return the previous, current, and next d d m template link 360 * @throws NoSuchTemplateLinkException if a d d m template link with the primary key could not be found 361 */ 362 public static DDMTemplateLink[] findByTemplateId_PrevAndNext( 363 long templateLinkId, long templateId, 364 OrderByComparator<DDMTemplateLink> orderByComparator) 365 throws com.liferay.portlet.dynamicdatamapping.NoSuchTemplateLinkException { 366 return getPersistence() 367 .findByTemplateId_PrevAndNext(templateLinkId, templateId, 368 orderByComparator); 369 } 370 371 /** 372 * Removes all the d d m template links where templateId = ? from the database. 373 * 374 * @param templateId the template ID 375 */ 376 public static void removeByTemplateId(long templateId) { 377 getPersistence().removeByTemplateId(templateId); 378 } 379 380 /** 381 * Returns the number of d d m template links where templateId = ?. 382 * 383 * @param templateId the template ID 384 * @return the number of matching d d m template links 385 */ 386 public static int countByTemplateId(long templateId) { 387 return getPersistence().countByTemplateId(templateId); 388 } 389 390 /** 391 * Returns the d d m template link where classNameId = ? and classPK = ? or throws a {@link NoSuchTemplateLinkException} if it could not be found. 392 * 393 * @param classNameId the class name ID 394 * @param classPK the class p k 395 * @return the matching d d m template link 396 * @throws NoSuchTemplateLinkException if a matching d d m template link could not be found 397 */ 398 public static DDMTemplateLink findByC_C(long classNameId, long classPK) 399 throws com.liferay.portlet.dynamicdatamapping.NoSuchTemplateLinkException { 400 return getPersistence().findByC_C(classNameId, classPK); 401 } 402 403 /** 404 * Returns the d d m template link where classNameId = ? and classPK = ? or returns <code>null</code> if it could not be found. Uses the finder cache. 405 * 406 * @param classNameId the class name ID 407 * @param classPK the class p k 408 * @return the matching d d m template link, or <code>null</code> if a matching d d m template link could not be found 409 */ 410 public static DDMTemplateLink fetchByC_C(long classNameId, long classPK) { 411 return getPersistence().fetchByC_C(classNameId, classPK); 412 } 413 414 /** 415 * Returns the d d m template link where classNameId = ? and classPK = ? or returns <code>null</code> if it could not be found, optionally using the finder cache. 416 * 417 * @param classNameId the class name ID 418 * @param classPK the class p k 419 * @param retrieveFromCache whether to use the finder cache 420 * @return the matching d d m template link, or <code>null</code> if a matching d d m template link could not be found 421 */ 422 public static DDMTemplateLink fetchByC_C(long classNameId, long classPK, 423 boolean retrieveFromCache) { 424 return getPersistence() 425 .fetchByC_C(classNameId, classPK, retrieveFromCache); 426 } 427 428 /** 429 * Removes the d d m template link where classNameId = ? and classPK = ? from the database. 430 * 431 * @param classNameId the class name ID 432 * @param classPK the class p k 433 * @return the d d m template link that was removed 434 */ 435 public static DDMTemplateLink removeByC_C(long classNameId, long classPK) 436 throws com.liferay.portlet.dynamicdatamapping.NoSuchTemplateLinkException { 437 return getPersistence().removeByC_C(classNameId, classPK); 438 } 439 440 /** 441 * Returns the number of d d m template links where classNameId = ? and classPK = ?. 442 * 443 * @param classNameId the class name ID 444 * @param classPK the class p k 445 * @return the number of matching d d m template links 446 */ 447 public static int countByC_C(long classNameId, long classPK) { 448 return getPersistence().countByC_C(classNameId, classPK); 449 } 450 451 /** 452 * Caches the d d m template link in the entity cache if it is enabled. 453 * 454 * @param ddmTemplateLink the d d m template link 455 */ 456 public static void cacheResult(DDMTemplateLink ddmTemplateLink) { 457 getPersistence().cacheResult(ddmTemplateLink); 458 } 459 460 /** 461 * Caches the d d m template links in the entity cache if it is enabled. 462 * 463 * @param ddmTemplateLinks the d d m template links 464 */ 465 public static void cacheResult(List<DDMTemplateLink> ddmTemplateLinks) { 466 getPersistence().cacheResult(ddmTemplateLinks); 467 } 468 469 /** 470 * Creates a new d d m template link with the primary key. Does not add the d d m template link to the database. 471 * 472 * @param templateLinkId the primary key for the new d d m template link 473 * @return the new d d m template link 474 */ 475 public static DDMTemplateLink create(long templateLinkId) { 476 return getPersistence().create(templateLinkId); 477 } 478 479 /** 480 * Removes the d d m template link with the primary key from the database. Also notifies the appropriate model listeners. 481 * 482 * @param templateLinkId the primary key of the d d m template link 483 * @return the d d m template link that was removed 484 * @throws NoSuchTemplateLinkException if a d d m template link with the primary key could not be found 485 */ 486 public static DDMTemplateLink remove(long templateLinkId) 487 throws com.liferay.portlet.dynamicdatamapping.NoSuchTemplateLinkException { 488 return getPersistence().remove(templateLinkId); 489 } 490 491 public static DDMTemplateLink updateImpl(DDMTemplateLink ddmTemplateLink) { 492 return getPersistence().updateImpl(ddmTemplateLink); 493 } 494 495 /** 496 * Returns the d d m template link with the primary key or throws a {@link NoSuchTemplateLinkException} if it could not be found. 497 * 498 * @param templateLinkId the primary key of the d d m template link 499 * @return the d d m template link 500 * @throws NoSuchTemplateLinkException if a d d m template link with the primary key could not be found 501 */ 502 public static DDMTemplateLink findByPrimaryKey(long templateLinkId) 503 throws com.liferay.portlet.dynamicdatamapping.NoSuchTemplateLinkException { 504 return getPersistence().findByPrimaryKey(templateLinkId); 505 } 506 507 /** 508 * Returns the d d m template link with the primary key or returns <code>null</code> if it could not be found. 509 * 510 * @param templateLinkId the primary key of the d d m template link 511 * @return the d d m template link, or <code>null</code> if a d d m template link with the primary key could not be found 512 */ 513 public static DDMTemplateLink fetchByPrimaryKey(long templateLinkId) { 514 return getPersistence().fetchByPrimaryKey(templateLinkId); 515 } 516 517 public static java.util.Map<java.io.Serializable, DDMTemplateLink> fetchByPrimaryKeys( 518 java.util.Set<java.io.Serializable> primaryKeys) { 519 return getPersistence().fetchByPrimaryKeys(primaryKeys); 520 } 521 522 /** 523 * Returns all the d d m template links. 524 * 525 * @return the d d m template links 526 */ 527 public static List<DDMTemplateLink> findAll() { 528 return getPersistence().findAll(); 529 } 530 531 /** 532 * Returns a range of all the d d m template links. 533 * 534 * <p> 535 * 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 DDMTemplateLinkModelImpl}. 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. 536 * </p> 537 * 538 * @param start the lower bound of the range of d d m template links 539 * @param end the upper bound of the range of d d m template links (not inclusive) 540 * @return the range of d d m template links 541 */ 542 public static List<DDMTemplateLink> findAll(int start, int end) { 543 return getPersistence().findAll(start, end); 544 } 545 546 /** 547 * Returns an ordered range of all the d d m template links. 548 * 549 * <p> 550 * 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 DDMTemplateLinkModelImpl}. 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. 551 * </p> 552 * 553 * @param start the lower bound of the range of d d m template links 554 * @param end the upper bound of the range of d d m template links (not inclusive) 555 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 556 * @return the ordered range of d d m template links 557 */ 558 public static List<DDMTemplateLink> findAll(int start, int end, 559 OrderByComparator<DDMTemplateLink> orderByComparator) { 560 return getPersistence().findAll(start, end, orderByComparator); 561 } 562 563 /** 564 * Removes all the d d m template links from the database. 565 */ 566 public static void removeAll() { 567 getPersistence().removeAll(); 568 } 569 570 /** 571 * Returns the number of d d m template links. 572 * 573 * @return the number of d d m template links 574 */ 575 public static int countAll() { 576 return getPersistence().countAll(); 577 } 578 579 public static DDMTemplateLinkPersistence getPersistence() { 580 if (_persistence == null) { 581 _persistence = (DDMTemplateLinkPersistence)PortalBeanLocatorUtil.locate(DDMTemplateLinkPersistence.class.getName()); 582 583 ReferenceRegistry.registerReference(DDMTemplateLinkUtil.class, 584 "_persistence"); 585 } 586 587 return _persistence; 588 } 589 590 /** 591 * @deprecated As of 6.2.0 592 */ 593 @Deprecated 594 public void setPersistence(DDMTemplateLinkPersistence persistence) { 595 } 596 597 private static DDMTemplateLinkPersistence _persistence; 598 }