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