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