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