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