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