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 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<com.liferay.portal.model.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 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.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<com.liferay.portal.model.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 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.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<com.liferay.portal.model.ResourceBlockPermission> findByResourceBlockId( 079 long resourceBlockId, int start, int end, 080 com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.model.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 com.liferay.portal.NoSuchResourceBlockPermissionException if a matching resource block permission could not be found 089 */ 090 public com.liferay.portal.model.ResourceBlockPermission findByResourceBlockId_First( 091 long resourceBlockId, 092 com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.model.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 com.liferay.portal.model.ResourceBlockPermission fetchByResourceBlockId_First( 103 long resourceBlockId, 104 com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.model.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 com.liferay.portal.NoSuchResourceBlockPermissionException if a matching resource block permission could not be found 113 */ 114 public com.liferay.portal.model.ResourceBlockPermission findByResourceBlockId_Last( 115 long resourceBlockId, 116 com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.model.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 com.liferay.portal.model.ResourceBlockPermission fetchByResourceBlockId_Last( 127 long resourceBlockId, 128 com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.model.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 com.liferay.portal.NoSuchResourceBlockPermissionException if a resource block permission with the primary key could not be found 138 */ 139 public com.liferay.portal.model.ResourceBlockPermission[] findByResourceBlockId_PrevAndNext( 140 long resourceBlockPermissionId, long resourceBlockId, 141 com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.model.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<com.liferay.portal.model.ResourceBlockPermission> findByRoleId( 166 long roleId); 167 168 /** 169 * Returns a range of all the resource block permissions where roleId = ?. 170 * 171 * <p> 172 * 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.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. 173 * </p> 174 * 175 * @param roleId the role ID 176 * @param start the lower bound of the range of resource block permissions 177 * @param end the upper bound of the range of resource block permissions (not inclusive) 178 * @return the range of matching resource block permissions 179 */ 180 public java.util.List<com.liferay.portal.model.ResourceBlockPermission> findByRoleId( 181 long roleId, int start, int end); 182 183 /** 184 * Returns an ordered range of all the resource block permissions where roleId = ?. 185 * 186 * <p> 187 * 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.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. 188 * </p> 189 * 190 * @param roleId the role ID 191 * @param start the lower bound of the range of resource block permissions 192 * @param end the upper bound of the range of resource block permissions (not inclusive) 193 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 194 * @return the ordered range of matching resource block permissions 195 */ 196 public java.util.List<com.liferay.portal.model.ResourceBlockPermission> findByRoleId( 197 long roleId, int start, int end, 198 com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.model.ResourceBlockPermission> orderByComparator); 199 200 /** 201 * Returns the first resource block permission in the ordered set where roleId = ?. 202 * 203 * @param roleId the role ID 204 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 205 * @return the first matching resource block permission 206 * @throws com.liferay.portal.NoSuchResourceBlockPermissionException if a matching resource block permission could not be found 207 */ 208 public com.liferay.portal.model.ResourceBlockPermission findByRoleId_First( 209 long roleId, 210 com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.model.ResourceBlockPermission> orderByComparator) 211 throws com.liferay.portal.NoSuchResourceBlockPermissionException; 212 213 /** 214 * Returns the first resource block permission in the ordered set where roleId = ?. 215 * 216 * @param roleId the role ID 217 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 218 * @return the first matching resource block permission, or <code>null</code> if a matching resource block permission could not be found 219 */ 220 public com.liferay.portal.model.ResourceBlockPermission fetchByRoleId_First( 221 long roleId, 222 com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.model.ResourceBlockPermission> orderByComparator); 223 224 /** 225 * Returns the last resource block permission in the ordered set where roleId = ?. 226 * 227 * @param roleId the role ID 228 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 229 * @return the last matching resource block permission 230 * @throws com.liferay.portal.NoSuchResourceBlockPermissionException if a matching resource block permission could not be found 231 */ 232 public com.liferay.portal.model.ResourceBlockPermission findByRoleId_Last( 233 long roleId, 234 com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.model.ResourceBlockPermission> orderByComparator) 235 throws com.liferay.portal.NoSuchResourceBlockPermissionException; 236 237 /** 238 * Returns the last resource block permission in the ordered set where roleId = ?. 239 * 240 * @param roleId the role ID 241 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 242 * @return the last matching resource block permission, or <code>null</code> if a matching resource block permission could not be found 243 */ 244 public com.liferay.portal.model.ResourceBlockPermission fetchByRoleId_Last( 245 long roleId, 246 com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.model.ResourceBlockPermission> orderByComparator); 247 248 /** 249 * Returns the resource block permissions before and after the current resource block permission in the ordered set where roleId = ?. 250 * 251 * @param resourceBlockPermissionId the primary key of the current resource block permission 252 * @param roleId the role ID 253 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 254 * @return the previous, current, and next resource block permission 255 * @throws com.liferay.portal.NoSuchResourceBlockPermissionException if a resource block permission with the primary key could not be found 256 */ 257 public com.liferay.portal.model.ResourceBlockPermission[] findByRoleId_PrevAndNext( 258 long resourceBlockPermissionId, long roleId, 259 com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.model.ResourceBlockPermission> orderByComparator) 260 throws com.liferay.portal.NoSuchResourceBlockPermissionException; 261 262 /** 263 * Removes all the resource block permissions where roleId = ? from the database. 264 * 265 * @param roleId the role ID 266 */ 267 public void removeByRoleId(long roleId); 268 269 /** 270 * Returns the number of resource block permissions where roleId = ?. 271 * 272 * @param roleId the role ID 273 * @return the number of matching resource block permissions 274 */ 275 public int countByRoleId(long roleId); 276 277 /** 278 * Returns the resource block permission where resourceBlockId = ? and roleId = ? or throws a {@link com.liferay.portal.NoSuchResourceBlockPermissionException} if it could not be found. 279 * 280 * @param resourceBlockId the resource block ID 281 * @param roleId the role ID 282 * @return the matching resource block permission 283 * @throws com.liferay.portal.NoSuchResourceBlockPermissionException if a matching resource block permission could not be found 284 */ 285 public com.liferay.portal.model.ResourceBlockPermission findByR_R( 286 long resourceBlockId, long roleId) 287 throws com.liferay.portal.NoSuchResourceBlockPermissionException; 288 289 /** 290 * Returns the resource block permission where resourceBlockId = ? and roleId = ? or returns <code>null</code> if it could not be found. Uses the finder cache. 291 * 292 * @param resourceBlockId the resource block ID 293 * @param roleId the role ID 294 * @return the matching resource block permission, or <code>null</code> if a matching resource block permission could not be found 295 */ 296 public com.liferay.portal.model.ResourceBlockPermission fetchByR_R( 297 long resourceBlockId, long roleId); 298 299 /** 300 * 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. 301 * 302 * @param resourceBlockId the resource block ID 303 * @param roleId the role ID 304 * @param retrieveFromCache whether to use the finder cache 305 * @return the matching resource block permission, or <code>null</code> if a matching resource block permission could not be found 306 */ 307 public com.liferay.portal.model.ResourceBlockPermission fetchByR_R( 308 long resourceBlockId, long roleId, boolean retrieveFromCache); 309 310 /** 311 * Removes the resource block permission where resourceBlockId = ? and roleId = ? from the database. 312 * 313 * @param resourceBlockId the resource block ID 314 * @param roleId the role ID 315 * @return the resource block permission that was removed 316 */ 317 public com.liferay.portal.model.ResourceBlockPermission removeByR_R( 318 long resourceBlockId, long roleId) 319 throws com.liferay.portal.NoSuchResourceBlockPermissionException; 320 321 /** 322 * Returns the number of resource block permissions where resourceBlockId = ? and roleId = ?. 323 * 324 * @param resourceBlockId the resource block ID 325 * @param roleId the role ID 326 * @return the number of matching resource block permissions 327 */ 328 public int countByR_R(long resourceBlockId, long roleId); 329 330 /** 331 * Caches the resource block permission in the entity cache if it is enabled. 332 * 333 * @param resourceBlockPermission the resource block permission 334 */ 335 public void cacheResult( 336 com.liferay.portal.model.ResourceBlockPermission resourceBlockPermission); 337 338 /** 339 * Caches the resource block permissions in the entity cache if it is enabled. 340 * 341 * @param resourceBlockPermissions the resource block permissions 342 */ 343 public void cacheResult( 344 java.util.List<com.liferay.portal.model.ResourceBlockPermission> resourceBlockPermissions); 345 346 /** 347 * Creates a new resource block permission with the primary key. Does not add the resource block permission to the database. 348 * 349 * @param resourceBlockPermissionId the primary key for the new resource block permission 350 * @return the new resource block permission 351 */ 352 public com.liferay.portal.model.ResourceBlockPermission create( 353 long resourceBlockPermissionId); 354 355 /** 356 * Removes the resource block permission with the primary key from the database. Also notifies the appropriate model listeners. 357 * 358 * @param resourceBlockPermissionId the primary key of the resource block permission 359 * @return the resource block permission that was removed 360 * @throws com.liferay.portal.NoSuchResourceBlockPermissionException if a resource block permission with the primary key could not be found 361 */ 362 public com.liferay.portal.model.ResourceBlockPermission remove( 363 long resourceBlockPermissionId) 364 throws com.liferay.portal.NoSuchResourceBlockPermissionException; 365 366 public com.liferay.portal.model.ResourceBlockPermission updateImpl( 367 com.liferay.portal.model.ResourceBlockPermission resourceBlockPermission); 368 369 /** 370 * Returns the resource block permission with the primary key or throws a {@link com.liferay.portal.NoSuchResourceBlockPermissionException} if it could not be found. 371 * 372 * @param resourceBlockPermissionId the primary key of the resource block permission 373 * @return the resource block permission 374 * @throws com.liferay.portal.NoSuchResourceBlockPermissionException if a resource block permission with the primary key could not be found 375 */ 376 public com.liferay.portal.model.ResourceBlockPermission findByPrimaryKey( 377 long resourceBlockPermissionId) 378 throws com.liferay.portal.NoSuchResourceBlockPermissionException; 379 380 /** 381 * Returns the resource block permission with the primary key or returns <code>null</code> if it could not be found. 382 * 383 * @param resourceBlockPermissionId the primary key of the resource block permission 384 * @return the resource block permission, or <code>null</code> if a resource block permission with the primary key could not be found 385 */ 386 public com.liferay.portal.model.ResourceBlockPermission fetchByPrimaryKey( 387 long resourceBlockPermissionId); 388 389 @Override 390 public java.util.Map<java.io.Serializable, com.liferay.portal.model.ResourceBlockPermission> fetchByPrimaryKeys( 391 java.util.Set<java.io.Serializable> primaryKeys); 392 393 /** 394 * Returns all the resource block permissions. 395 * 396 * @return the resource block permissions 397 */ 398 public java.util.List<com.liferay.portal.model.ResourceBlockPermission> findAll(); 399 400 /** 401 * Returns a range of all the resource block permissions. 402 * 403 * <p> 404 * 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.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. 405 * </p> 406 * 407 * @param start the lower bound of the range of resource block permissions 408 * @param end the upper bound of the range of resource block permissions (not inclusive) 409 * @return the range of resource block permissions 410 */ 411 public java.util.List<com.liferay.portal.model.ResourceBlockPermission> findAll( 412 int start, int end); 413 414 /** 415 * Returns an ordered range of all the resource block permissions. 416 * 417 * <p> 418 * 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.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. 419 * </p> 420 * 421 * @param start the lower bound of the range of resource block permissions 422 * @param end the upper bound of the range of resource block permissions (not inclusive) 423 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 424 * @return the ordered range of resource block permissions 425 */ 426 public java.util.List<com.liferay.portal.model.ResourceBlockPermission> findAll( 427 int start, int end, 428 com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.model.ResourceBlockPermission> orderByComparator); 429 430 /** 431 * Removes all the resource block permissions from the database. 432 */ 433 public void removeAll(); 434 435 /** 436 * Returns the number of resource block permissions. 437 * 438 * @return the number of resource block permissions 439 */ 440 public int countAll(); 441 }