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