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.service.persistence; 016 017 import aQute.bnd.annotation.ProviderType; 018 019 import com.liferay.portal.model.ResourceBlockPermission; 020 021 /** 022 * The persistence interface for the resource block permission service. 023 * 024 * <p> 025 * Caching information and settings can be found in <code>portal.properties</code> 026 * </p> 027 * 028 * @author Brian Wing Shun Chan 029 * @see com.liferay.portal.service.persistence.impl.ResourceBlockPermissionPersistenceImpl 030 * @see ResourceBlockPermissionUtil 031 * @generated 032 */ 033 @ProviderType 034 public interface ResourceBlockPermissionPersistence extends BasePersistence<ResourceBlockPermission> { 035 /* 036 * NOTE FOR DEVELOPERS: 037 * 038 * Never modify or reference this interface directly. Always use {@link ResourceBlockPermissionUtil} to access the resource block permission persistence. Modify <code>service.xml</code> and rerun ServiceBuilder to regenerate this interface. 039 */ 040 041 /** 042 * Returns all the resource block permissions where resourceBlockId = ?. 043 * 044 * @param resourceBlockId the resource block ID 045 * @return the matching resource block permissions 046 */ 047 public java.util.List<ResourceBlockPermission> findByResourceBlockId( 048 long resourceBlockId); 049 050 /** 051 * Returns a range of all the resource block permissions where resourceBlockId = ?. 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 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 ResourceBlockPermissionModelImpl}. 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 resourceBlockId the resource block ID 058 * @param start the lower bound of the range of resource block permissions 059 * @param end the upper bound of the range of resource block permissions (not inclusive) 060 * @return the range of matching resource block permissions 061 */ 062 public java.util.List<ResourceBlockPermission> findByResourceBlockId( 063 long resourceBlockId, int start, int end); 064 065 /** 066 * Returns an ordered range of all the resource block permissions where resourceBlockId = ?. 067 * 068 * <p> 069 * 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 ResourceBlockPermissionModelImpl}. 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. 070 * </p> 071 * 072 * @param resourceBlockId the resource block ID 073 * @param start the lower bound of the range of resource block permissions 074 * @param end the upper bound of the range of resource block permissions (not inclusive) 075 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 076 * @return the ordered range of matching resource block permissions 077 */ 078 public java.util.List<ResourceBlockPermission> findByResourceBlockId( 079 long resourceBlockId, int start, int end, 080 com.liferay.portal.kernel.util.OrderByComparator<ResourceBlockPermission> orderByComparator); 081 082 /** 083 * Returns the first resource block permission in the ordered set where resourceBlockId = ?. 084 * 085 * @param resourceBlockId the resource block ID 086 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 087 * @return the first matching resource block permission 088 * @throws NoSuchResourceBlockPermissionException if a matching resource block permission could not be found 089 */ 090 public ResourceBlockPermission findByResourceBlockId_First( 091 long resourceBlockId, 092 com.liferay.portal.kernel.util.OrderByComparator<ResourceBlockPermission> orderByComparator) 093 throws com.liferay.portal.NoSuchResourceBlockPermissionException; 094 095 /** 096 * Returns the first resource block permission in the ordered set where resourceBlockId = ?. 097 * 098 * @param resourceBlockId the resource block ID 099 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 100 * @return the first matching resource block permission, or <code>null</code> if a matching resource block permission could not be found 101 */ 102 public ResourceBlockPermission fetchByResourceBlockId_First( 103 long resourceBlockId, 104 com.liferay.portal.kernel.util.OrderByComparator<ResourceBlockPermission> orderByComparator); 105 106 /** 107 * Returns the last resource block permission in the ordered set where resourceBlockId = ?. 108 * 109 * @param resourceBlockId the resource block ID 110 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 111 * @return the last matching resource block permission 112 * @throws NoSuchResourceBlockPermissionException if a matching resource block permission could not be found 113 */ 114 public ResourceBlockPermission findByResourceBlockId_Last( 115 long resourceBlockId, 116 com.liferay.portal.kernel.util.OrderByComparator<ResourceBlockPermission> orderByComparator) 117 throws com.liferay.portal.NoSuchResourceBlockPermissionException; 118 119 /** 120 * Returns the last resource block permission in the ordered set where resourceBlockId = ?. 121 * 122 * @param resourceBlockId the resource block ID 123 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 124 * @return the last matching resource block permission, or <code>null</code> if a matching resource block permission could not be found 125 */ 126 public ResourceBlockPermission fetchByResourceBlockId_Last( 127 long resourceBlockId, 128 com.liferay.portal.kernel.util.OrderByComparator<ResourceBlockPermission> orderByComparator); 129 130 /** 131 * Returns the resource block permissions before and after the current resource block permission in the ordered set where resourceBlockId = ?. 132 * 133 * @param resourceBlockPermissionId the primary key of the current resource block permission 134 * @param resourceBlockId the resource block ID 135 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 136 * @return the previous, current, and next resource block permission 137 * @throws NoSuchResourceBlockPermissionException if a resource block permission with the primary key could not be found 138 */ 139 public ResourceBlockPermission[] findByResourceBlockId_PrevAndNext( 140 long resourceBlockPermissionId, long resourceBlockId, 141 com.liferay.portal.kernel.util.OrderByComparator<ResourceBlockPermission> orderByComparator) 142 throws com.liferay.portal.NoSuchResourceBlockPermissionException; 143 144 /** 145 * Removes all the resource block permissions where resourceBlockId = ? from the database. 146 * 147 * @param resourceBlockId the resource block ID 148 */ 149 public void removeByResourceBlockId(long resourceBlockId); 150 151 /** 152 * Returns the number of resource block permissions where resourceBlockId = ?. 153 * 154 * @param resourceBlockId the resource block ID 155 * @return the number of matching resource block permissions 156 */ 157 public int countByResourceBlockId(long resourceBlockId); 158 159 /** 160 * Returns all the resource block permissions where roleId = ?. 161 * 162 * @param roleId the role ID 163 * @return the matching resource block permissions 164 */ 165 public java.util.List<ResourceBlockPermission> findByRoleId(long roleId); 166 167 /** 168 * Returns a range of all the resource block permissions where roleId = ?. 169 * 170 * <p> 171 * 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 ResourceBlockPermissionModelImpl}. 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. 172 * </p> 173 * 174 * @param roleId the role ID 175 * @param start the lower bound of the range of resource block permissions 176 * @param end the upper bound of the range of resource block permissions (not inclusive) 177 * @return the range of matching resource block permissions 178 */ 179 public java.util.List<ResourceBlockPermission> findByRoleId(long roleId, 180 int start, int end); 181 182 /** 183 * Returns an ordered range of all the resource block permissions where roleId = ?. 184 * 185 * <p> 186 * 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 ResourceBlockPermissionModelImpl}. 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. 187 * </p> 188 * 189 * @param roleId the role ID 190 * @param start the lower bound of the range of resource block permissions 191 * @param end the upper bound of the range of resource block permissions (not inclusive) 192 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 193 * @return the ordered range of matching resource block permissions 194 */ 195 public java.util.List<ResourceBlockPermission> findByRoleId(long roleId, 196 int start, int end, 197 com.liferay.portal.kernel.util.OrderByComparator<ResourceBlockPermission> orderByComparator); 198 199 /** 200 * Returns the first resource block permission in the ordered set where roleId = ?. 201 * 202 * @param roleId the role ID 203 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 204 * @return the first matching resource block permission 205 * @throws NoSuchResourceBlockPermissionException if a matching resource block permission could not be found 206 */ 207 public ResourceBlockPermission findByRoleId_First(long roleId, 208 com.liferay.portal.kernel.util.OrderByComparator<ResourceBlockPermission> orderByComparator) 209 throws com.liferay.portal.NoSuchResourceBlockPermissionException; 210 211 /** 212 * Returns the first resource block permission in the ordered set where roleId = ?. 213 * 214 * @param roleId the role ID 215 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 216 * @return the first matching resource block permission, or <code>null</code> if a matching resource block permission could not be found 217 */ 218 public ResourceBlockPermission fetchByRoleId_First(long roleId, 219 com.liferay.portal.kernel.util.OrderByComparator<ResourceBlockPermission> orderByComparator); 220 221 /** 222 * Returns the last resource block permission in the ordered set where roleId = ?. 223 * 224 * @param roleId the role ID 225 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 226 * @return the last matching resource block permission 227 * @throws NoSuchResourceBlockPermissionException if a matching resource block permission could not be found 228 */ 229 public ResourceBlockPermission findByRoleId_Last(long roleId, 230 com.liferay.portal.kernel.util.OrderByComparator<ResourceBlockPermission> orderByComparator) 231 throws com.liferay.portal.NoSuchResourceBlockPermissionException; 232 233 /** 234 * Returns the last resource block permission in the ordered set where roleId = ?. 235 * 236 * @param roleId the role ID 237 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 238 * @return the last matching resource block permission, or <code>null</code> if a matching resource block permission could not be found 239 */ 240 public ResourceBlockPermission fetchByRoleId_Last(long roleId, 241 com.liferay.portal.kernel.util.OrderByComparator<ResourceBlockPermission> orderByComparator); 242 243 /** 244 * Returns the resource block permissions before and after the current resource block permission in the ordered set where roleId = ?. 245 * 246 * @param resourceBlockPermissionId the primary key of the current resource block permission 247 * @param roleId the role ID 248 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 249 * @return the previous, current, and next resource block permission 250 * @throws NoSuchResourceBlockPermissionException if a resource block permission with the primary key could not be found 251 */ 252 public ResourceBlockPermission[] findByRoleId_PrevAndNext( 253 long resourceBlockPermissionId, long roleId, 254 com.liferay.portal.kernel.util.OrderByComparator<ResourceBlockPermission> orderByComparator) 255 throws com.liferay.portal.NoSuchResourceBlockPermissionException; 256 257 /** 258 * Removes all the resource block permissions where roleId = ? from the database. 259 * 260 * @param roleId the role ID 261 */ 262 public void removeByRoleId(long roleId); 263 264 /** 265 * Returns the number of resource block permissions where roleId = ?. 266 * 267 * @param roleId the role ID 268 * @return the number of matching resource block permissions 269 */ 270 public int countByRoleId(long roleId); 271 272 /** 273 * Returns the resource block permission where resourceBlockId = ? and roleId = ? or throws a {@link NoSuchResourceBlockPermissionException} if it could not be found. 274 * 275 * @param resourceBlockId the resource block ID 276 * @param roleId the role ID 277 * @return the matching resource block permission 278 * @throws NoSuchResourceBlockPermissionException if a matching resource block permission could not be found 279 */ 280 public ResourceBlockPermission findByR_R(long resourceBlockId, long roleId) 281 throws com.liferay.portal.NoSuchResourceBlockPermissionException; 282 283 /** 284 * Returns the resource block permission where resourceBlockId = ? and roleId = ? or returns <code>null</code> if it could not be found. Uses the finder cache. 285 * 286 * @param resourceBlockId the resource block ID 287 * @param roleId the role ID 288 * @return the matching resource block permission, or <code>null</code> if a matching resource block permission could not be found 289 */ 290 public ResourceBlockPermission fetchByR_R(long resourceBlockId, long roleId); 291 292 /** 293 * Returns the resource block permission where resourceBlockId = ? and roleId = ? or returns <code>null</code> if it could not be found, optionally using the finder cache. 294 * 295 * @param resourceBlockId the resource block ID 296 * @param roleId the role ID 297 * @param retrieveFromCache whether to use the finder cache 298 * @return the matching resource block permission, or <code>null</code> if a matching resource block permission could not be found 299 */ 300 public ResourceBlockPermission fetchByR_R(long resourceBlockId, 301 long roleId, boolean retrieveFromCache); 302 303 /** 304 * Removes the resource block permission where resourceBlockId = ? and roleId = ? from the database. 305 * 306 * @param resourceBlockId the resource block ID 307 * @param roleId the role ID 308 * @return the resource block permission that was removed 309 */ 310 public ResourceBlockPermission removeByR_R(long resourceBlockId, long roleId) 311 throws com.liferay.portal.NoSuchResourceBlockPermissionException; 312 313 /** 314 * Returns the number of resource block permissions where resourceBlockId = ? and roleId = ?. 315 * 316 * @param resourceBlockId the resource block ID 317 * @param roleId the role ID 318 * @return the number of matching resource block permissions 319 */ 320 public int countByR_R(long resourceBlockId, long roleId); 321 322 /** 323 * Caches the resource block permission in the entity cache if it is enabled. 324 * 325 * @param resourceBlockPermission the resource block permission 326 */ 327 public void cacheResult(ResourceBlockPermission resourceBlockPermission); 328 329 /** 330 * Caches the resource block permissions in the entity cache if it is enabled. 331 * 332 * @param resourceBlockPermissions the resource block permissions 333 */ 334 public void cacheResult( 335 java.util.List<ResourceBlockPermission> resourceBlockPermissions); 336 337 /** 338 * Creates a new resource block permission with the primary key. Does not add the resource block permission to the database. 339 * 340 * @param resourceBlockPermissionId the primary key for the new resource block permission 341 * @return the new resource block permission 342 */ 343 public ResourceBlockPermission create(long resourceBlockPermissionId); 344 345 /** 346 * Removes the resource block permission with the primary key from the database. Also notifies the appropriate model listeners. 347 * 348 * @param resourceBlockPermissionId the primary key of the resource block permission 349 * @return the resource block permission that was removed 350 * @throws NoSuchResourceBlockPermissionException if a resource block permission with the primary key could not be found 351 */ 352 public ResourceBlockPermission remove(long resourceBlockPermissionId) 353 throws com.liferay.portal.NoSuchResourceBlockPermissionException; 354 355 public ResourceBlockPermission updateImpl( 356 ResourceBlockPermission resourceBlockPermission); 357 358 /** 359 * Returns the resource block permission with the primary key or throws a {@link NoSuchResourceBlockPermissionException} if it could not be found. 360 * 361 * @param resourceBlockPermissionId the primary key of the resource block permission 362 * @return the resource block permission 363 * @throws NoSuchResourceBlockPermissionException if a resource block permission with the primary key could not be found 364 */ 365 public ResourceBlockPermission findByPrimaryKey( 366 long resourceBlockPermissionId) 367 throws com.liferay.portal.NoSuchResourceBlockPermissionException; 368 369 /** 370 * Returns the resource block permission with the primary key or returns <code>null</code> if it could not be found. 371 * 372 * @param resourceBlockPermissionId the primary key of the resource block permission 373 * @return the resource block permission, or <code>null</code> if a resource block permission with the primary key could not be found 374 */ 375 public ResourceBlockPermission fetchByPrimaryKey( 376 long resourceBlockPermissionId); 377 378 @Override 379 public java.util.Map<java.io.Serializable, ResourceBlockPermission> fetchByPrimaryKeys( 380 java.util.Set<java.io.Serializable> primaryKeys); 381 382 /** 383 * Returns all the resource block permissions. 384 * 385 * @return the resource block permissions 386 */ 387 public java.util.List<ResourceBlockPermission> findAll(); 388 389 /** 390 * Returns a range of all the resource block permissions. 391 * 392 * <p> 393 * 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 ResourceBlockPermissionModelImpl}. 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. 394 * </p> 395 * 396 * @param start the lower bound of the range of resource block permissions 397 * @param end the upper bound of the range of resource block permissions (not inclusive) 398 * @return the range of resource block permissions 399 */ 400 public java.util.List<ResourceBlockPermission> findAll(int start, int end); 401 402 /** 403 * Returns an ordered range of all the resource block permissions. 404 * 405 * <p> 406 * 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 ResourceBlockPermissionModelImpl}. 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. 407 * </p> 408 * 409 * @param start the lower bound of the range of resource block permissions 410 * @param end the upper bound of the range of resource block permissions (not inclusive) 411 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 412 * @return the ordered range of resource block permissions 413 */ 414 public java.util.List<ResourceBlockPermission> findAll(int start, int end, 415 com.liferay.portal.kernel.util.OrderByComparator<ResourceBlockPermission> orderByComparator); 416 417 /** 418 * Removes all the resource block permissions from the database. 419 */ 420 public void removeAll(); 421 422 /** 423 * Returns the number of resource block permissions. 424 * 425 * @return the number of resource block permissions 426 */ 427 public int countAll(); 428 }