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