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.OrgGroupPermission; 018 019 /** 020 * The persistence interface for the org group 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 OrgGroupPermissionPersistenceImpl 028 * @see OrgGroupPermissionUtil 029 * @generated 030 */ 031 public interface OrgGroupPermissionPersistence extends BasePersistence<OrgGroupPermission> { 032 /* 033 * NOTE FOR DEVELOPERS: 034 * 035 * Never modify or reference this interface directly. Always use {@link OrgGroupPermissionUtil} to access the org group permission persistence. Modify <code>service.xml</code> and rerun ServiceBuilder to regenerate this interface. 036 */ 037 038 /** 039 * Caches the org group permission in the entity cache if it is enabled. 040 * 041 * @param orgGroupPermission the org group permission 042 */ 043 public void cacheResult( 044 com.liferay.portal.model.OrgGroupPermission orgGroupPermission); 045 046 /** 047 * Caches the org group permissions in the entity cache if it is enabled. 048 * 049 * @param orgGroupPermissions the org group permissions 050 */ 051 public void cacheResult( 052 java.util.List<com.liferay.portal.model.OrgGroupPermission> orgGroupPermissions); 053 054 /** 055 * Creates a new org group permission with the primary key. Does not add the org group permission to the database. 056 * 057 * @param orgGroupPermissionPK the primary key for the new org group permission 058 * @return the new org group permission 059 */ 060 public com.liferay.portal.model.OrgGroupPermission create( 061 com.liferay.portal.service.persistence.OrgGroupPermissionPK orgGroupPermissionPK); 062 063 /** 064 * Removes the org group permission with the primary key from the database. Also notifies the appropriate model listeners. 065 * 066 * @param orgGroupPermissionPK the primary key of the org group permission 067 * @return the org group permission that was removed 068 * @throws com.liferay.portal.NoSuchOrgGroupPermissionException if a org group permission with the primary key could not be found 069 * @throws SystemException if a system exception occurred 070 */ 071 public com.liferay.portal.model.OrgGroupPermission remove( 072 com.liferay.portal.service.persistence.OrgGroupPermissionPK orgGroupPermissionPK) 073 throws com.liferay.portal.NoSuchOrgGroupPermissionException, 074 com.liferay.portal.kernel.exception.SystemException; 075 076 public com.liferay.portal.model.OrgGroupPermission updateImpl( 077 com.liferay.portal.model.OrgGroupPermission orgGroupPermission, 078 boolean merge) 079 throws com.liferay.portal.kernel.exception.SystemException; 080 081 /** 082 * Returns the org group permission with the primary key or throws a {@link com.liferay.portal.NoSuchOrgGroupPermissionException} if it could not be found. 083 * 084 * @param orgGroupPermissionPK the primary key of the org group permission 085 * @return the org group permission 086 * @throws com.liferay.portal.NoSuchOrgGroupPermissionException if a org group permission with the primary key could not be found 087 * @throws SystemException if a system exception occurred 088 */ 089 public com.liferay.portal.model.OrgGroupPermission findByPrimaryKey( 090 com.liferay.portal.service.persistence.OrgGroupPermissionPK orgGroupPermissionPK) 091 throws com.liferay.portal.NoSuchOrgGroupPermissionException, 092 com.liferay.portal.kernel.exception.SystemException; 093 094 /** 095 * Returns the org group permission with the primary key or returns <code>null</code> if it could not be found. 096 * 097 * @param orgGroupPermissionPK the primary key of the org group permission 098 * @return the org group permission, or <code>null</code> if a org group permission with the primary key could not be found 099 * @throws SystemException if a system exception occurred 100 */ 101 public com.liferay.portal.model.OrgGroupPermission fetchByPrimaryKey( 102 com.liferay.portal.service.persistence.OrgGroupPermissionPK orgGroupPermissionPK) 103 throws com.liferay.portal.kernel.exception.SystemException; 104 105 /** 106 * Returns all the org group permissions where groupId = ?. 107 * 108 * @param groupId the group ID 109 * @return the matching org group permissions 110 * @throws SystemException if a system exception occurred 111 */ 112 public java.util.List<com.liferay.portal.model.OrgGroupPermission> findByGroupId( 113 long groupId) 114 throws com.liferay.portal.kernel.exception.SystemException; 115 116 /** 117 * Returns a range of all the org group permissions where groupId = ?. 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 groupId the group ID 124 * @param start the lower bound of the range of org group permissions 125 * @param end the upper bound of the range of org group permissions (not inclusive) 126 * @return the range of matching org group permissions 127 * @throws SystemException if a system exception occurred 128 */ 129 public java.util.List<com.liferay.portal.model.OrgGroupPermission> findByGroupId( 130 long groupId, int start, int end) 131 throws com.liferay.portal.kernel.exception.SystemException; 132 133 /** 134 * Returns an ordered range of all the org group permissions where groupId = ?. 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 groupId the group ID 141 * @param start the lower bound of the range of org group permissions 142 * @param end the upper bound of the range of org group permissions (not inclusive) 143 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 144 * @return the ordered range of matching org group permissions 145 * @throws SystemException if a system exception occurred 146 */ 147 public java.util.List<com.liferay.portal.model.OrgGroupPermission> findByGroupId( 148 long groupId, 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 org group permission in the ordered set where groupId = ?. 154 * 155 * <p> 156 * 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. 157 * </p> 158 * 159 * @param groupId the group ID 160 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 161 * @return the first matching org group permission 162 * @throws com.liferay.portal.NoSuchOrgGroupPermissionException if a matching org group permission could not be found 163 * @throws SystemException if a system exception occurred 164 */ 165 public com.liferay.portal.model.OrgGroupPermission findByGroupId_First( 166 long groupId, 167 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 168 throws com.liferay.portal.NoSuchOrgGroupPermissionException, 169 com.liferay.portal.kernel.exception.SystemException; 170 171 /** 172 * Returns the last org group permission in the ordered set where groupId = ?. 173 * 174 * <p> 175 * 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. 176 * </p> 177 * 178 * @param groupId the group ID 179 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 180 * @return the last matching org group permission 181 * @throws com.liferay.portal.NoSuchOrgGroupPermissionException if a matching org group permission could not be found 182 * @throws SystemException if a system exception occurred 183 */ 184 public com.liferay.portal.model.OrgGroupPermission findByGroupId_Last( 185 long groupId, 186 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 187 throws com.liferay.portal.NoSuchOrgGroupPermissionException, 188 com.liferay.portal.kernel.exception.SystemException; 189 190 /** 191 * Returns the org group permissions before and after the current org group permission in the ordered set where groupId = ?. 192 * 193 * <p> 194 * 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. 195 * </p> 196 * 197 * @param orgGroupPermissionPK the primary key of the current org group permission 198 * @param groupId the group ID 199 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 200 * @return the previous, current, and next org group permission 201 * @throws com.liferay.portal.NoSuchOrgGroupPermissionException if a org group permission with the primary key could not be found 202 * @throws SystemException if a system exception occurred 203 */ 204 public com.liferay.portal.model.OrgGroupPermission[] findByGroupId_PrevAndNext( 205 com.liferay.portal.service.persistence.OrgGroupPermissionPK orgGroupPermissionPK, 206 long groupId, 207 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 208 throws com.liferay.portal.NoSuchOrgGroupPermissionException, 209 com.liferay.portal.kernel.exception.SystemException; 210 211 /** 212 * Returns all the org group permissions where permissionId = ?. 213 * 214 * @param permissionId the permission ID 215 * @return the matching org group permissions 216 * @throws SystemException if a system exception occurred 217 */ 218 public java.util.List<com.liferay.portal.model.OrgGroupPermission> findByPermissionId( 219 long permissionId) 220 throws com.liferay.portal.kernel.exception.SystemException; 221 222 /** 223 * Returns a range of all the org group permissions where permissionId = ?. 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 permissionId the permission ID 230 * @param start the lower bound of the range of org group permissions 231 * @param end the upper bound of the range of org group permissions (not inclusive) 232 * @return the range of matching org group permissions 233 * @throws SystemException if a system exception occurred 234 */ 235 public java.util.List<com.liferay.portal.model.OrgGroupPermission> findByPermissionId( 236 long permissionId, int start, int end) 237 throws com.liferay.portal.kernel.exception.SystemException; 238 239 /** 240 * Returns an ordered range of all the org group permissions where permissionId = ?. 241 * 242 * <p> 243 * 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. 244 * </p> 245 * 246 * @param permissionId the permission ID 247 * @param start the lower bound of the range of org group permissions 248 * @param end the upper bound of the range of org group permissions (not inclusive) 249 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 250 * @return the ordered range of matching org group permissions 251 * @throws SystemException if a system exception occurred 252 */ 253 public java.util.List<com.liferay.portal.model.OrgGroupPermission> findByPermissionId( 254 long permissionId, int start, int end, 255 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 256 throws com.liferay.portal.kernel.exception.SystemException; 257 258 /** 259 * Returns the first org group permission in the ordered set where permissionId = ?. 260 * 261 * <p> 262 * 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. 263 * </p> 264 * 265 * @param permissionId the permission ID 266 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 267 * @return the first matching org group permission 268 * @throws com.liferay.portal.NoSuchOrgGroupPermissionException if a matching org group permission could not be found 269 * @throws SystemException if a system exception occurred 270 */ 271 public com.liferay.portal.model.OrgGroupPermission findByPermissionId_First( 272 long permissionId, 273 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 274 throws com.liferay.portal.NoSuchOrgGroupPermissionException, 275 com.liferay.portal.kernel.exception.SystemException; 276 277 /** 278 * Returns the last org group permission in the ordered set where permissionId = ?. 279 * 280 * <p> 281 * 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. 282 * </p> 283 * 284 * @param permissionId the permission ID 285 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 286 * @return the last matching org group permission 287 * @throws com.liferay.portal.NoSuchOrgGroupPermissionException if a matching org group permission could not be found 288 * @throws SystemException if a system exception occurred 289 */ 290 public com.liferay.portal.model.OrgGroupPermission findByPermissionId_Last( 291 long permissionId, 292 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 293 throws com.liferay.portal.NoSuchOrgGroupPermissionException, 294 com.liferay.portal.kernel.exception.SystemException; 295 296 /** 297 * Returns the org group permissions before and after the current org group permission in the ordered set where permissionId = ?. 298 * 299 * <p> 300 * 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. 301 * </p> 302 * 303 * @param orgGroupPermissionPK the primary key of the current org group permission 304 * @param permissionId the permission ID 305 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 306 * @return the previous, current, and next org group permission 307 * @throws com.liferay.portal.NoSuchOrgGroupPermissionException if a org group permission with the primary key could not be found 308 * @throws SystemException if a system exception occurred 309 */ 310 public com.liferay.portal.model.OrgGroupPermission[] findByPermissionId_PrevAndNext( 311 com.liferay.portal.service.persistence.OrgGroupPermissionPK orgGroupPermissionPK, 312 long permissionId, 313 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 314 throws com.liferay.portal.NoSuchOrgGroupPermissionException, 315 com.liferay.portal.kernel.exception.SystemException; 316 317 /** 318 * Returns all the org group permissions. 319 * 320 * @return the org group permissions 321 * @throws SystemException if a system exception occurred 322 */ 323 public java.util.List<com.liferay.portal.model.OrgGroupPermission> findAll() 324 throws com.liferay.portal.kernel.exception.SystemException; 325 326 /** 327 * Returns a range of all the org group permissions. 328 * 329 * <p> 330 * 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. 331 * </p> 332 * 333 * @param start the lower bound of the range of org group permissions 334 * @param end the upper bound of the range of org group permissions (not inclusive) 335 * @return the range of org group permissions 336 * @throws SystemException if a system exception occurred 337 */ 338 public java.util.List<com.liferay.portal.model.OrgGroupPermission> findAll( 339 int start, int end) 340 throws com.liferay.portal.kernel.exception.SystemException; 341 342 /** 343 * Returns an ordered range of all the org group permissions. 344 * 345 * <p> 346 * 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. 347 * </p> 348 * 349 * @param start the lower bound of the range of org group permissions 350 * @param end the upper bound of the range of org group permissions (not inclusive) 351 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 352 * @return the ordered range of org group permissions 353 * @throws SystemException if a system exception occurred 354 */ 355 public java.util.List<com.liferay.portal.model.OrgGroupPermission> findAll( 356 int start, int end, 357 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 358 throws com.liferay.portal.kernel.exception.SystemException; 359 360 /** 361 * Removes all the org group permissions where groupId = ? from the database. 362 * 363 * @param groupId the group ID 364 * @throws SystemException if a system exception occurred 365 */ 366 public void removeByGroupId(long groupId) 367 throws com.liferay.portal.kernel.exception.SystemException; 368 369 /** 370 * Removes all the org group permissions where permissionId = ? from the database. 371 * 372 * @param permissionId the permission ID 373 * @throws SystemException if a system exception occurred 374 */ 375 public void removeByPermissionId(long permissionId) 376 throws com.liferay.portal.kernel.exception.SystemException; 377 378 /** 379 * Removes all the org group permissions from the database. 380 * 381 * @throws SystemException if a system exception occurred 382 */ 383 public void removeAll() 384 throws com.liferay.portal.kernel.exception.SystemException; 385 386 /** 387 * Returns the number of org group permissions where groupId = ?. 388 * 389 * @param groupId the group ID 390 * @return the number of matching org group permissions 391 * @throws SystemException if a system exception occurred 392 */ 393 public int countByGroupId(long groupId) 394 throws com.liferay.portal.kernel.exception.SystemException; 395 396 /** 397 * Returns the number of org group permissions where permissionId = ?. 398 * 399 * @param permissionId the permission ID 400 * @return the number of matching org group permissions 401 * @throws SystemException if a system exception occurred 402 */ 403 public int countByPermissionId(long permissionId) 404 throws com.liferay.portal.kernel.exception.SystemException; 405 406 /** 407 * Returns the number of org group permissions. 408 * 409 * @return the number of org group permissions 410 * @throws SystemException if a system exception occurred 411 */ 412 public int countAll() 413 throws com.liferay.portal.kernel.exception.SystemException; 414 }