001 /** 002 * Copyright (c) 2000-2013 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.ResourceBlockPermission; 018 019 /** 020 * The persistence interface for the resource block permission 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 ResourceBlockPermissionPersistenceImpl 028 * @see ResourceBlockPermissionUtil 029 * @generated 030 */ 031 public interface ResourceBlockPermissionPersistence extends BasePersistence<ResourceBlockPermission> { 032 /* 033 * NOTE FOR DEVELOPERS: 034 * 035 * 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. 036 */ 037 038 /** 039 * Caches the resource block permission in the entity cache if it is enabled. 040 * 041 * @param resourceBlockPermission the resource block permission 042 */ 043 public void cacheResult( 044 com.liferay.portal.model.ResourceBlockPermission resourceBlockPermission); 045 046 /** 047 * Caches the resource block permissions in the entity cache if it is enabled. 048 * 049 * @param resourceBlockPermissions the resource block permissions 050 */ 051 public void cacheResult( 052 java.util.List<com.liferay.portal.model.ResourceBlockPermission> resourceBlockPermissions); 053 054 /** 055 * Creates a new resource block permission with the primary key. Does not add the resource block permission to the database. 056 * 057 * @param resourceBlockPermissionId the primary key for the new resource block permission 058 * @return the new resource block permission 059 */ 060 public com.liferay.portal.model.ResourceBlockPermission create( 061 long resourceBlockPermissionId); 062 063 /** 064 * Removes the resource block permission with the primary key from the database. Also notifies the appropriate model listeners. 065 * 066 * @param resourceBlockPermissionId the primary key of the resource block permission 067 * @return the resource block permission that was removed 068 * @throws com.liferay.portal.NoSuchResourceBlockPermissionException if a resource block permission with the primary key could not be found 069 * @throws SystemException if a system exception occurred 070 */ 071 public com.liferay.portal.model.ResourceBlockPermission remove( 072 long resourceBlockPermissionId) 073 throws com.liferay.portal.NoSuchResourceBlockPermissionException, 074 com.liferay.portal.kernel.exception.SystemException; 075 076 public com.liferay.portal.model.ResourceBlockPermission updateImpl( 077 com.liferay.portal.model.ResourceBlockPermission resourceBlockPermission, 078 boolean merge) 079 throws com.liferay.portal.kernel.exception.SystemException; 080 081 /** 082 * Returns the resource block permission with the primary key or throws a {@link com.liferay.portal.NoSuchResourceBlockPermissionException} if it could not be found. 083 * 084 * @param resourceBlockPermissionId the primary key of the resource block permission 085 * @return the resource block permission 086 * @throws com.liferay.portal.NoSuchResourceBlockPermissionException if a resource block permission with the primary key could not be found 087 * @throws SystemException if a system exception occurred 088 */ 089 public com.liferay.portal.model.ResourceBlockPermission findByPrimaryKey( 090 long resourceBlockPermissionId) 091 throws com.liferay.portal.NoSuchResourceBlockPermissionException, 092 com.liferay.portal.kernel.exception.SystemException; 093 094 /** 095 * Returns the resource block permission with the primary key or returns <code>null</code> if it could not be found. 096 * 097 * @param resourceBlockPermissionId the primary key of the resource block permission 098 * @return the resource block permission, or <code>null</code> if a resource block permission with the primary key could not be found 099 * @throws SystemException if a system exception occurred 100 */ 101 public com.liferay.portal.model.ResourceBlockPermission fetchByPrimaryKey( 102 long resourceBlockPermissionId) 103 throws com.liferay.portal.kernel.exception.SystemException; 104 105 /** 106 * Returns all the resource block permissions where resourceBlockId = ?. 107 * 108 * @param resourceBlockId the resource block ID 109 * @return the matching resource block permissions 110 * @throws SystemException if a system exception occurred 111 */ 112 public java.util.List<com.liferay.portal.model.ResourceBlockPermission> findByResourceBlockId( 113 long resourceBlockId) 114 throws com.liferay.portal.kernel.exception.SystemException; 115 116 /** 117 * Returns a range of all the resource block permissions where resourceBlockId = ?. 118 * 119 * <p> 120 * 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. 121 * </p> 122 * 123 * @param resourceBlockId the resource block ID 124 * @param start the lower bound of the range of resource block permissions 125 * @param end the upper bound of the range of resource block permissions (not inclusive) 126 * @return the range of matching resource block permissions 127 * @throws SystemException if a system exception occurred 128 */ 129 public java.util.List<com.liferay.portal.model.ResourceBlockPermission> findByResourceBlockId( 130 long resourceBlockId, int start, int end) 131 throws com.liferay.portal.kernel.exception.SystemException; 132 133 /** 134 * Returns an ordered range of all the resource block permissions where resourceBlockId = ?. 135 * 136 * <p> 137 * 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. 138 * </p> 139 * 140 * @param resourceBlockId the resource block ID 141 * @param start the lower bound of the range of resource block permissions 142 * @param end the upper bound of the range of resource block permissions (not inclusive) 143 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 144 * @return the ordered range of matching resource block permissions 145 * @throws SystemException if a system exception occurred 146 */ 147 public java.util.List<com.liferay.portal.model.ResourceBlockPermission> findByResourceBlockId( 148 long resourceBlockId, int start, int end, 149 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 150 throws com.liferay.portal.kernel.exception.SystemException; 151 152 /** 153 * Returns the first resource block permission in the ordered set where resourceBlockId = ?. 154 * 155 * @param resourceBlockId the resource block ID 156 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 157 * @return the first matching resource block permission 158 * @throws com.liferay.portal.NoSuchResourceBlockPermissionException if a matching resource block permission could not be found 159 * @throws SystemException if a system exception occurred 160 */ 161 public com.liferay.portal.model.ResourceBlockPermission findByResourceBlockId_First( 162 long resourceBlockId, 163 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 164 throws com.liferay.portal.NoSuchResourceBlockPermissionException, 165 com.liferay.portal.kernel.exception.SystemException; 166 167 /** 168 * Returns the first resource block permission in the ordered set where resourceBlockId = ?. 169 * 170 * @param resourceBlockId the resource block ID 171 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 172 * @return the first matching resource block permission, or <code>null</code> if a matching resource block permission could not be found 173 * @throws SystemException if a system exception occurred 174 */ 175 public com.liferay.portal.model.ResourceBlockPermission fetchByResourceBlockId_First( 176 long resourceBlockId, 177 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 178 throws com.liferay.portal.kernel.exception.SystemException; 179 180 /** 181 * Returns the last resource block permission in the ordered set where resourceBlockId = ?. 182 * 183 * @param resourceBlockId the resource block ID 184 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 185 * @return the last matching resource block permission 186 * @throws com.liferay.portal.NoSuchResourceBlockPermissionException if a matching resource block permission could not be found 187 * @throws SystemException if a system exception occurred 188 */ 189 public com.liferay.portal.model.ResourceBlockPermission findByResourceBlockId_Last( 190 long resourceBlockId, 191 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 192 throws com.liferay.portal.NoSuchResourceBlockPermissionException, 193 com.liferay.portal.kernel.exception.SystemException; 194 195 /** 196 * Returns the last resource block permission in the ordered set where resourceBlockId = ?. 197 * 198 * @param resourceBlockId the resource block ID 199 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 200 * @return the last matching resource block permission, or <code>null</code> if a matching resource block permission could not be found 201 * @throws SystemException if a system exception occurred 202 */ 203 public com.liferay.portal.model.ResourceBlockPermission fetchByResourceBlockId_Last( 204 long resourceBlockId, 205 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 206 throws com.liferay.portal.kernel.exception.SystemException; 207 208 /** 209 * Returns the resource block permissions before and after the current resource block permission in the ordered set where resourceBlockId = ?. 210 * 211 * @param resourceBlockPermissionId the primary key of the current resource block permission 212 * @param resourceBlockId the resource block ID 213 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 214 * @return the previous, current, and next resource block permission 215 * @throws com.liferay.portal.NoSuchResourceBlockPermissionException if a resource block permission with the primary key could not be found 216 * @throws SystemException if a system exception occurred 217 */ 218 public com.liferay.portal.model.ResourceBlockPermission[] findByResourceBlockId_PrevAndNext( 219 long resourceBlockPermissionId, long resourceBlockId, 220 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 221 throws com.liferay.portal.NoSuchResourceBlockPermissionException, 222 com.liferay.portal.kernel.exception.SystemException; 223 224 /** 225 * Returns the resource block permission where resourceBlockId = ? and roleId = ? or throws a {@link com.liferay.portal.NoSuchResourceBlockPermissionException} if it could not be found. 226 * 227 * @param resourceBlockId the resource block ID 228 * @param roleId the role ID 229 * @return the matching resource block permission 230 * @throws com.liferay.portal.NoSuchResourceBlockPermissionException if a matching resource block permission could not be found 231 * @throws SystemException if a system exception occurred 232 */ 233 public com.liferay.portal.model.ResourceBlockPermission findByR_R( 234 long resourceBlockId, long roleId) 235 throws com.liferay.portal.NoSuchResourceBlockPermissionException, 236 com.liferay.portal.kernel.exception.SystemException; 237 238 /** 239 * Returns the resource block permission where resourceBlockId = ? and roleId = ? or returns <code>null</code> if it could not be found. Uses the finder cache. 240 * 241 * @param resourceBlockId the resource block ID 242 * @param roleId the role ID 243 * @return the matching resource block permission, or <code>null</code> if a matching resource block permission could not be found 244 * @throws SystemException if a system exception occurred 245 */ 246 public com.liferay.portal.model.ResourceBlockPermission fetchByR_R( 247 long resourceBlockId, long roleId) 248 throws com.liferay.portal.kernel.exception.SystemException; 249 250 /** 251 * 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. 252 * 253 * @param resourceBlockId the resource block ID 254 * @param roleId the role ID 255 * @param retrieveFromCache whether to use the finder cache 256 * @return the matching resource block permission, or <code>null</code> if a matching resource block permission could not be found 257 * @throws SystemException if a system exception occurred 258 */ 259 public com.liferay.portal.model.ResourceBlockPermission fetchByR_R( 260 long resourceBlockId, long roleId, boolean retrieveFromCache) 261 throws com.liferay.portal.kernel.exception.SystemException; 262 263 /** 264 * Returns all the resource block permissions. 265 * 266 * @return the resource block permissions 267 * @throws SystemException if a system exception occurred 268 */ 269 public java.util.List<com.liferay.portal.model.ResourceBlockPermission> findAll() 270 throws com.liferay.portal.kernel.exception.SystemException; 271 272 /** 273 * Returns a range of all the resource block permissions. 274 * 275 * <p> 276 * 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. 277 * </p> 278 * 279 * @param start the lower bound of the range of resource block permissions 280 * @param end the upper bound of the range of resource block permissions (not inclusive) 281 * @return the range of resource block permissions 282 * @throws SystemException if a system exception occurred 283 */ 284 public java.util.List<com.liferay.portal.model.ResourceBlockPermission> findAll( 285 int start, int end) 286 throws com.liferay.portal.kernel.exception.SystemException; 287 288 /** 289 * Returns an ordered range of all the resource block permissions. 290 * 291 * <p> 292 * 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. 293 * </p> 294 * 295 * @param start the lower bound of the range of resource block permissions 296 * @param end the upper bound of the range of resource block permissions (not inclusive) 297 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 298 * @return the ordered range of resource block permissions 299 * @throws SystemException if a system exception occurred 300 */ 301 public java.util.List<com.liferay.portal.model.ResourceBlockPermission> findAll( 302 int start, int end, 303 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 304 throws com.liferay.portal.kernel.exception.SystemException; 305 306 /** 307 * Removes all the resource block permissions where resourceBlockId = ? from the database. 308 * 309 * @param resourceBlockId the resource block ID 310 * @throws SystemException if a system exception occurred 311 */ 312 public void removeByResourceBlockId(long resourceBlockId) 313 throws com.liferay.portal.kernel.exception.SystemException; 314 315 /** 316 * Removes the resource block permission where resourceBlockId = ? and roleId = ? from the database. 317 * 318 * @param resourceBlockId the resource block ID 319 * @param roleId the role ID 320 * @return the resource block permission that was removed 321 * @throws SystemException if a system exception occurred 322 */ 323 public com.liferay.portal.model.ResourceBlockPermission removeByR_R( 324 long resourceBlockId, long roleId) 325 throws com.liferay.portal.NoSuchResourceBlockPermissionException, 326 com.liferay.portal.kernel.exception.SystemException; 327 328 /** 329 * Removes all the resource block permissions from the database. 330 * 331 * @throws SystemException if a system exception occurred 332 */ 333 public void removeAll() 334 throws com.liferay.portal.kernel.exception.SystemException; 335 336 /** 337 * Returns the number of resource block permissions where resourceBlockId = ?. 338 * 339 * @param resourceBlockId the resource block ID 340 * @return the number of matching resource block permissions 341 * @throws SystemException if a system exception occurred 342 */ 343 public int countByResourceBlockId(long resourceBlockId) 344 throws com.liferay.portal.kernel.exception.SystemException; 345 346 /** 347 * Returns the number of resource block permissions where resourceBlockId = ? and roleId = ?. 348 * 349 * @param resourceBlockId the resource block ID 350 * @param roleId the role ID 351 * @return the number of matching resource block permissions 352 * @throws SystemException if a system exception occurred 353 */ 354 public int countByR_R(long resourceBlockId, long roleId) 355 throws com.liferay.portal.kernel.exception.SystemException; 356 357 /** 358 * Returns the number of resource block permissions. 359 * 360 * @return the number of resource block permissions 361 * @throws SystemException if a system exception occurred 362 */ 363 public int countAll() 364 throws com.liferay.portal.kernel.exception.SystemException; 365 }