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.portal.kernel.service.persistence; 016 017 import aQute.bnd.annotation.ProviderType; 018 019 import com.liferay.portal.kernel.exception.NoSuchResourceBlockException; 020 import com.liferay.portal.kernel.model.ResourceBlock; 021 022 /** 023 * The persistence interface for the resource block service. 024 * 025 * <p> 026 * Caching information and settings can be found in <code>portal.properties</code> 027 * </p> 028 * 029 * @author Brian Wing Shun Chan 030 * @see com.liferay.portal.service.persistence.impl.ResourceBlockPersistenceImpl 031 * @see ResourceBlockUtil 032 * @generated 033 */ 034 @ProviderType 035 public interface ResourceBlockPersistence extends BasePersistence<ResourceBlock> { 036 /* 037 * NOTE FOR DEVELOPERS: 038 * 039 * Never modify or reference this interface directly. Always use {@link ResourceBlockUtil} to access the resource block persistence. Modify <code>service.xml</code> and rerun ServiceBuilder to regenerate this interface. 040 */ 041 042 /** 043 * Returns all the resource blocks where companyId = ? and name = ?. 044 * 045 * @param companyId the company ID 046 * @param name the name 047 * @return the matching resource blocks 048 */ 049 public java.util.List<ResourceBlock> findByC_N(long companyId, 050 java.lang.String name); 051 052 /** 053 * Returns a range of all the resource blocks where companyId = ? and name = ?. 054 * 055 * <p> 056 * 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 ResourceBlockModelImpl}. 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. 057 * </p> 058 * 059 * @param companyId the company ID 060 * @param name the name 061 * @param start the lower bound of the range of resource blocks 062 * @param end the upper bound of the range of resource blocks (not inclusive) 063 * @return the range of matching resource blocks 064 */ 065 public java.util.List<ResourceBlock> findByC_N(long companyId, 066 java.lang.String name, int start, int end); 067 068 /** 069 * Returns an ordered range of all the resource blocks where companyId = ? and name = ?. 070 * 071 * <p> 072 * 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 ResourceBlockModelImpl}. 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. 073 * </p> 074 * 075 * @param companyId the company ID 076 * @param name the name 077 * @param start the lower bound of the range of resource blocks 078 * @param end the upper bound of the range of resource blocks (not inclusive) 079 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 080 * @return the ordered range of matching resource blocks 081 */ 082 public java.util.List<ResourceBlock> findByC_N(long companyId, 083 java.lang.String name, int start, int end, 084 com.liferay.portal.kernel.util.OrderByComparator<ResourceBlock> orderByComparator); 085 086 /** 087 * Returns an ordered range of all the resource blocks where companyId = ? and name = ?. 088 * 089 * <p> 090 * 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 ResourceBlockModelImpl}. 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. 091 * </p> 092 * 093 * @param companyId the company ID 094 * @param name the name 095 * @param start the lower bound of the range of resource blocks 096 * @param end the upper bound of the range of resource blocks (not inclusive) 097 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 098 * @param retrieveFromCache whether to retrieve from the finder cache 099 * @return the ordered range of matching resource blocks 100 */ 101 public java.util.List<ResourceBlock> findByC_N(long companyId, 102 java.lang.String name, int start, int end, 103 com.liferay.portal.kernel.util.OrderByComparator<ResourceBlock> orderByComparator, 104 boolean retrieveFromCache); 105 106 /** 107 * Returns the first resource block in the ordered set where companyId = ? and name = ?. 108 * 109 * @param companyId the company ID 110 * @param name the name 111 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 112 * @return the first matching resource block 113 * @throws NoSuchResourceBlockException if a matching resource block could not be found 114 */ 115 public ResourceBlock findByC_N_First(long companyId, java.lang.String name, 116 com.liferay.portal.kernel.util.OrderByComparator<ResourceBlock> orderByComparator) 117 throws NoSuchResourceBlockException; 118 119 /** 120 * Returns the first resource block in the ordered set where companyId = ? and name = ?. 121 * 122 * @param companyId the company ID 123 * @param name the name 124 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 125 * @return the first matching resource block, or <code>null</code> if a matching resource block could not be found 126 */ 127 public ResourceBlock fetchByC_N_First(long companyId, 128 java.lang.String name, 129 com.liferay.portal.kernel.util.OrderByComparator<ResourceBlock> orderByComparator); 130 131 /** 132 * Returns the last resource block in the ordered set where companyId = ? and name = ?. 133 * 134 * @param companyId the company ID 135 * @param name the name 136 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 137 * @return the last matching resource block 138 * @throws NoSuchResourceBlockException if a matching resource block could not be found 139 */ 140 public ResourceBlock findByC_N_Last(long companyId, java.lang.String name, 141 com.liferay.portal.kernel.util.OrderByComparator<ResourceBlock> orderByComparator) 142 throws NoSuchResourceBlockException; 143 144 /** 145 * Returns the last resource block in the ordered set where companyId = ? and name = ?. 146 * 147 * @param companyId the company ID 148 * @param name the name 149 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 150 * @return the last matching resource block, or <code>null</code> if a matching resource block could not be found 151 */ 152 public ResourceBlock fetchByC_N_Last(long companyId, java.lang.String name, 153 com.liferay.portal.kernel.util.OrderByComparator<ResourceBlock> orderByComparator); 154 155 /** 156 * Returns the resource blocks before and after the current resource block in the ordered set where companyId = ? and name = ?. 157 * 158 * @param resourceBlockId the primary key of the current resource block 159 * @param companyId the company ID 160 * @param name the name 161 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 162 * @return the previous, current, and next resource block 163 * @throws NoSuchResourceBlockException if a resource block with the primary key could not be found 164 */ 165 public ResourceBlock[] findByC_N_PrevAndNext(long resourceBlockId, 166 long companyId, java.lang.String name, 167 com.liferay.portal.kernel.util.OrderByComparator<ResourceBlock> orderByComparator) 168 throws NoSuchResourceBlockException; 169 170 /** 171 * Removes all the resource blocks where companyId = ? and name = ? from the database. 172 * 173 * @param companyId the company ID 174 * @param name the name 175 */ 176 public void removeByC_N(long companyId, java.lang.String name); 177 178 /** 179 * Returns the number of resource blocks where companyId = ? and name = ?. 180 * 181 * @param companyId the company ID 182 * @param name the name 183 * @return the number of matching resource blocks 184 */ 185 public int countByC_N(long companyId, java.lang.String name); 186 187 /** 188 * Returns all the resource blocks where companyId = ? and groupId = ? and name = ?. 189 * 190 * @param companyId the company ID 191 * @param groupId the group ID 192 * @param name the name 193 * @return the matching resource blocks 194 */ 195 public java.util.List<ResourceBlock> findByC_G_N(long companyId, 196 long groupId, java.lang.String name); 197 198 /** 199 * Returns a range of all the resource blocks where companyId = ? and groupId = ? and name = ?. 200 * 201 * <p> 202 * 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 ResourceBlockModelImpl}. 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. 203 * </p> 204 * 205 * @param companyId the company ID 206 * @param groupId the group ID 207 * @param name the name 208 * @param start the lower bound of the range of resource blocks 209 * @param end the upper bound of the range of resource blocks (not inclusive) 210 * @return the range of matching resource blocks 211 */ 212 public java.util.List<ResourceBlock> findByC_G_N(long companyId, 213 long groupId, java.lang.String name, int start, int end); 214 215 /** 216 * Returns an ordered range of all the resource blocks where companyId = ? and groupId = ? and name = ?. 217 * 218 * <p> 219 * 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 ResourceBlockModelImpl}. 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. 220 * </p> 221 * 222 * @param companyId the company ID 223 * @param groupId the group ID 224 * @param name the name 225 * @param start the lower bound of the range of resource blocks 226 * @param end the upper bound of the range of resource blocks (not inclusive) 227 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 228 * @return the ordered range of matching resource blocks 229 */ 230 public java.util.List<ResourceBlock> findByC_G_N(long companyId, 231 long groupId, java.lang.String name, int start, int end, 232 com.liferay.portal.kernel.util.OrderByComparator<ResourceBlock> orderByComparator); 233 234 /** 235 * Returns an ordered range of all the resource blocks where companyId = ? and groupId = ? and name = ?. 236 * 237 * <p> 238 * 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 ResourceBlockModelImpl}. 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. 239 * </p> 240 * 241 * @param companyId the company ID 242 * @param groupId the group ID 243 * @param name the name 244 * @param start the lower bound of the range of resource blocks 245 * @param end the upper bound of the range of resource blocks (not inclusive) 246 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 247 * @param retrieveFromCache whether to retrieve from the finder cache 248 * @return the ordered range of matching resource blocks 249 */ 250 public java.util.List<ResourceBlock> findByC_G_N(long companyId, 251 long groupId, java.lang.String name, int start, int end, 252 com.liferay.portal.kernel.util.OrderByComparator<ResourceBlock> orderByComparator, 253 boolean retrieveFromCache); 254 255 /** 256 * Returns the first resource block in the ordered set where companyId = ? and groupId = ? and name = ?. 257 * 258 * @param companyId the company ID 259 * @param groupId the group ID 260 * @param name the name 261 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 262 * @return the first matching resource block 263 * @throws NoSuchResourceBlockException if a matching resource block could not be found 264 */ 265 public ResourceBlock findByC_G_N_First(long companyId, long groupId, 266 java.lang.String name, 267 com.liferay.portal.kernel.util.OrderByComparator<ResourceBlock> orderByComparator) 268 throws NoSuchResourceBlockException; 269 270 /** 271 * Returns the first resource block in the ordered set where companyId = ? and groupId = ? and name = ?. 272 * 273 * @param companyId the company ID 274 * @param groupId the group ID 275 * @param name the name 276 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 277 * @return the first matching resource block, or <code>null</code> if a matching resource block could not be found 278 */ 279 public ResourceBlock fetchByC_G_N_First(long companyId, long groupId, 280 java.lang.String name, 281 com.liferay.portal.kernel.util.OrderByComparator<ResourceBlock> orderByComparator); 282 283 /** 284 * Returns the last resource block in the ordered set where companyId = ? and groupId = ? and name = ?. 285 * 286 * @param companyId the company ID 287 * @param groupId the group ID 288 * @param name the name 289 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 290 * @return the last matching resource block 291 * @throws NoSuchResourceBlockException if a matching resource block could not be found 292 */ 293 public ResourceBlock findByC_G_N_Last(long companyId, long groupId, 294 java.lang.String name, 295 com.liferay.portal.kernel.util.OrderByComparator<ResourceBlock> orderByComparator) 296 throws NoSuchResourceBlockException; 297 298 /** 299 * Returns the last resource block in the ordered set where companyId = ? and groupId = ? and name = ?. 300 * 301 * @param companyId the company ID 302 * @param groupId the group ID 303 * @param name the name 304 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 305 * @return the last matching resource block, or <code>null</code> if a matching resource block could not be found 306 */ 307 public ResourceBlock fetchByC_G_N_Last(long companyId, long groupId, 308 java.lang.String name, 309 com.liferay.portal.kernel.util.OrderByComparator<ResourceBlock> orderByComparator); 310 311 /** 312 * Returns the resource blocks before and after the current resource block in the ordered set where companyId = ? and groupId = ? and name = ?. 313 * 314 * @param resourceBlockId the primary key of the current resource block 315 * @param companyId the company ID 316 * @param groupId the group ID 317 * @param name the name 318 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 319 * @return the previous, current, and next resource block 320 * @throws NoSuchResourceBlockException if a resource block with the primary key could not be found 321 */ 322 public ResourceBlock[] findByC_G_N_PrevAndNext(long resourceBlockId, 323 long companyId, long groupId, java.lang.String name, 324 com.liferay.portal.kernel.util.OrderByComparator<ResourceBlock> orderByComparator) 325 throws NoSuchResourceBlockException; 326 327 /** 328 * Removes all the resource blocks where companyId = ? and groupId = ? and name = ? from the database. 329 * 330 * @param companyId the company ID 331 * @param groupId the group ID 332 * @param name the name 333 */ 334 public void removeByC_G_N(long companyId, long groupId, 335 java.lang.String name); 336 337 /** 338 * Returns the number of resource blocks where companyId = ? and groupId = ? and name = ?. 339 * 340 * @param companyId the company ID 341 * @param groupId the group ID 342 * @param name the name 343 * @return the number of matching resource blocks 344 */ 345 public int countByC_G_N(long companyId, long groupId, java.lang.String name); 346 347 /** 348 * Returns the resource block where companyId = ? and groupId = ? and name = ? and permissionsHash = ? or throws a {@link NoSuchResourceBlockException} if it could not be found. 349 * 350 * @param companyId the company ID 351 * @param groupId the group ID 352 * @param name the name 353 * @param permissionsHash the permissions hash 354 * @return the matching resource block 355 * @throws NoSuchResourceBlockException if a matching resource block could not be found 356 */ 357 public ResourceBlock findByC_G_N_P(long companyId, long groupId, 358 java.lang.String name, java.lang.String permissionsHash) 359 throws NoSuchResourceBlockException; 360 361 /** 362 * Returns the resource block where companyId = ? and groupId = ? and name = ? and permissionsHash = ? or returns <code>null</code> if it could not be found. Uses the finder cache. 363 * 364 * @param companyId the company ID 365 * @param groupId the group ID 366 * @param name the name 367 * @param permissionsHash the permissions hash 368 * @return the matching resource block, or <code>null</code> if a matching resource block could not be found 369 */ 370 public ResourceBlock fetchByC_G_N_P(long companyId, long groupId, 371 java.lang.String name, java.lang.String permissionsHash); 372 373 /** 374 * Returns the resource block where companyId = ? and groupId = ? and name = ? and permissionsHash = ? or returns <code>null</code> if it could not be found, optionally using the finder cache. 375 * 376 * @param companyId the company ID 377 * @param groupId the group ID 378 * @param name the name 379 * @param permissionsHash the permissions hash 380 * @param retrieveFromCache whether to retrieve from the finder cache 381 * @return the matching resource block, or <code>null</code> if a matching resource block could not be found 382 */ 383 public ResourceBlock fetchByC_G_N_P(long companyId, long groupId, 384 java.lang.String name, java.lang.String permissionsHash, 385 boolean retrieveFromCache); 386 387 /** 388 * Removes the resource block where companyId = ? and groupId = ? and name = ? and permissionsHash = ? from the database. 389 * 390 * @param companyId the company ID 391 * @param groupId the group ID 392 * @param name the name 393 * @param permissionsHash the permissions hash 394 * @return the resource block that was removed 395 */ 396 public ResourceBlock removeByC_G_N_P(long companyId, long groupId, 397 java.lang.String name, java.lang.String permissionsHash) 398 throws NoSuchResourceBlockException; 399 400 /** 401 * Returns the number of resource blocks where companyId = ? and groupId = ? and name = ? and permissionsHash = ?. 402 * 403 * @param companyId the company ID 404 * @param groupId the group ID 405 * @param name the name 406 * @param permissionsHash the permissions hash 407 * @return the number of matching resource blocks 408 */ 409 public int countByC_G_N_P(long companyId, long groupId, 410 java.lang.String name, java.lang.String permissionsHash); 411 412 /** 413 * Caches the resource block in the entity cache if it is enabled. 414 * 415 * @param resourceBlock the resource block 416 */ 417 public void cacheResult(ResourceBlock resourceBlock); 418 419 /** 420 * Caches the resource blocks in the entity cache if it is enabled. 421 * 422 * @param resourceBlocks the resource blocks 423 */ 424 public void cacheResult(java.util.List<ResourceBlock> resourceBlocks); 425 426 /** 427 * Creates a new resource block with the primary key. Does not add the resource block to the database. 428 * 429 * @param resourceBlockId the primary key for the new resource block 430 * @return the new resource block 431 */ 432 public ResourceBlock create(long resourceBlockId); 433 434 /** 435 * Removes the resource block with the primary key from the database. Also notifies the appropriate model listeners. 436 * 437 * @param resourceBlockId the primary key of the resource block 438 * @return the resource block that was removed 439 * @throws NoSuchResourceBlockException if a resource block with the primary key could not be found 440 */ 441 public ResourceBlock remove(long resourceBlockId) 442 throws NoSuchResourceBlockException; 443 444 public ResourceBlock updateImpl(ResourceBlock resourceBlock); 445 446 /** 447 * Returns the resource block with the primary key or throws a {@link NoSuchResourceBlockException} if it could not be found. 448 * 449 * @param resourceBlockId the primary key of the resource block 450 * @return the resource block 451 * @throws NoSuchResourceBlockException if a resource block with the primary key could not be found 452 */ 453 public ResourceBlock findByPrimaryKey(long resourceBlockId) 454 throws NoSuchResourceBlockException; 455 456 /** 457 * Returns the resource block with the primary key or returns <code>null</code> if it could not be found. 458 * 459 * @param resourceBlockId the primary key of the resource block 460 * @return the resource block, or <code>null</code> if a resource block with the primary key could not be found 461 */ 462 public ResourceBlock fetchByPrimaryKey(long resourceBlockId); 463 464 @Override 465 public java.util.Map<java.io.Serializable, ResourceBlock> fetchByPrimaryKeys( 466 java.util.Set<java.io.Serializable> primaryKeys); 467 468 /** 469 * Returns all the resource blocks. 470 * 471 * @return the resource blocks 472 */ 473 public java.util.List<ResourceBlock> findAll(); 474 475 /** 476 * Returns a range of all the resource blocks. 477 * 478 * <p> 479 * 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 ResourceBlockModelImpl}. 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. 480 * </p> 481 * 482 * @param start the lower bound of the range of resource blocks 483 * @param end the upper bound of the range of resource blocks (not inclusive) 484 * @return the range of resource blocks 485 */ 486 public java.util.List<ResourceBlock> findAll(int start, int end); 487 488 /** 489 * Returns an ordered range of all the resource blocks. 490 * 491 * <p> 492 * 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 ResourceBlockModelImpl}. 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. 493 * </p> 494 * 495 * @param start the lower bound of the range of resource blocks 496 * @param end the upper bound of the range of resource blocks (not inclusive) 497 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 498 * @return the ordered range of resource blocks 499 */ 500 public java.util.List<ResourceBlock> findAll(int start, int end, 501 com.liferay.portal.kernel.util.OrderByComparator<ResourceBlock> orderByComparator); 502 503 /** 504 * Returns an ordered range of all the resource blocks. 505 * 506 * <p> 507 * 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 ResourceBlockModelImpl}. 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. 508 * </p> 509 * 510 * @param start the lower bound of the range of resource blocks 511 * @param end the upper bound of the range of resource blocks (not inclusive) 512 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 513 * @param retrieveFromCache whether to retrieve from the finder cache 514 * @return the ordered range of resource blocks 515 */ 516 public java.util.List<ResourceBlock> findAll(int start, int end, 517 com.liferay.portal.kernel.util.OrderByComparator<ResourceBlock> orderByComparator, 518 boolean retrieveFromCache); 519 520 /** 521 * Removes all the resource blocks from the database. 522 */ 523 public void removeAll(); 524 525 /** 526 * Returns the number of resource blocks. 527 * 528 * @return the number of resource blocks 529 */ 530 public int countAll(); 531 }