001 /** 002 * Copyright (c) 2000-2013 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 * @param uuid the uuid 152 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 153 * @return the first matching repository 154 * @throws com.liferay.portal.NoSuchRepositoryException if a matching repository could not be found 155 * @throws SystemException if a system exception occurred 156 */ 157 public com.liferay.portal.model.Repository findByUuid_First( 158 java.lang.String uuid, 159 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 160 throws com.liferay.portal.NoSuchRepositoryException, 161 com.liferay.portal.kernel.exception.SystemException; 162 163 /** 164 * Returns the first repository in the ordered set where uuid = ?. 165 * 166 * @param uuid the uuid 167 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 168 * @return the first matching repository, or <code>null</code> if a matching repository could not be found 169 * @throws SystemException if a system exception occurred 170 */ 171 public com.liferay.portal.model.Repository fetchByUuid_First( 172 java.lang.String uuid, 173 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 174 throws com.liferay.portal.kernel.exception.SystemException; 175 176 /** 177 * Returns the last repository in the ordered set where uuid = ?. 178 * 179 * @param uuid the uuid 180 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 181 * @return the last matching repository 182 * @throws com.liferay.portal.NoSuchRepositoryException if a matching repository could not be found 183 * @throws SystemException if a system exception occurred 184 */ 185 public com.liferay.portal.model.Repository findByUuid_Last( 186 java.lang.String uuid, 187 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 188 throws com.liferay.portal.NoSuchRepositoryException, 189 com.liferay.portal.kernel.exception.SystemException; 190 191 /** 192 * Returns the last repository in the ordered set where uuid = ?. 193 * 194 * @param uuid the uuid 195 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 196 * @return the last matching repository, or <code>null</code> if a matching repository could not be found 197 * @throws SystemException if a system exception occurred 198 */ 199 public com.liferay.portal.model.Repository fetchByUuid_Last( 200 java.lang.String uuid, 201 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 202 throws com.liferay.portal.kernel.exception.SystemException; 203 204 /** 205 * Returns the repositories before and after the current repository in the ordered set where uuid = ?. 206 * 207 * @param repositoryId the primary key of the current repository 208 * @param uuid the uuid 209 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 210 * @return the previous, current, and next repository 211 * @throws com.liferay.portal.NoSuchRepositoryException if a repository with the primary key could not be found 212 * @throws SystemException if a system exception occurred 213 */ 214 public com.liferay.portal.model.Repository[] findByUuid_PrevAndNext( 215 long repositoryId, java.lang.String uuid, 216 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 217 throws com.liferay.portal.NoSuchRepositoryException, 218 com.liferay.portal.kernel.exception.SystemException; 219 220 /** 221 * Returns the repository where uuid = ? and groupId = ? or throws a {@link com.liferay.portal.NoSuchRepositoryException} if it could not be found. 222 * 223 * @param uuid the uuid 224 * @param groupId the group ID 225 * @return the matching repository 226 * @throws com.liferay.portal.NoSuchRepositoryException if a matching repository could not be found 227 * @throws SystemException if a system exception occurred 228 */ 229 public com.liferay.portal.model.Repository findByUUID_G( 230 java.lang.String uuid, long groupId) 231 throws com.liferay.portal.NoSuchRepositoryException, 232 com.liferay.portal.kernel.exception.SystemException; 233 234 /** 235 * Returns the repository where uuid = ? and groupId = ? or returns <code>null</code> if it could not be found. Uses the finder cache. 236 * 237 * @param uuid the uuid 238 * @param groupId the group ID 239 * @return the matching repository, or <code>null</code> if a matching repository could not be found 240 * @throws SystemException if a system exception occurred 241 */ 242 public com.liferay.portal.model.Repository fetchByUUID_G( 243 java.lang.String uuid, long groupId) 244 throws com.liferay.portal.kernel.exception.SystemException; 245 246 /** 247 * Returns the repository where uuid = ? and groupId = ? or returns <code>null</code> if it could not be found, optionally using the finder cache. 248 * 249 * @param uuid the uuid 250 * @param groupId the group ID 251 * @param retrieveFromCache whether to use the finder cache 252 * @return the matching repository, or <code>null</code> if a matching repository could not be found 253 * @throws SystemException if a system exception occurred 254 */ 255 public com.liferay.portal.model.Repository fetchByUUID_G( 256 java.lang.String uuid, long groupId, boolean retrieveFromCache) 257 throws com.liferay.portal.kernel.exception.SystemException; 258 259 /** 260 * Returns all the repositories where groupId = ?. 261 * 262 * @param groupId the group ID 263 * @return the matching repositories 264 * @throws SystemException if a system exception occurred 265 */ 266 public java.util.List<com.liferay.portal.model.Repository> findByGroupId( 267 long groupId) 268 throws com.liferay.portal.kernel.exception.SystemException; 269 270 /** 271 * Returns a range of all the repositories where groupId = ?. 272 * 273 * <p> 274 * 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. 275 * </p> 276 * 277 * @param groupId the group ID 278 * @param start the lower bound of the range of repositories 279 * @param end the upper bound of the range of repositories (not inclusive) 280 * @return the range of matching repositories 281 * @throws SystemException if a system exception occurred 282 */ 283 public java.util.List<com.liferay.portal.model.Repository> findByGroupId( 284 long groupId, int start, int end) 285 throws com.liferay.portal.kernel.exception.SystemException; 286 287 /** 288 * Returns an ordered range of all the repositories where groupId = ?. 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 groupId the group ID 295 * @param start the lower bound of the range of repositories 296 * @param end the upper bound of the range of repositories (not inclusive) 297 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 298 * @return the ordered range of matching repositories 299 * @throws SystemException if a system exception occurred 300 */ 301 public java.util.List<com.liferay.portal.model.Repository> findByGroupId( 302 long groupId, int start, int end, 303 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 304 throws com.liferay.portal.kernel.exception.SystemException; 305 306 /** 307 * Returns the first repository in the ordered set where groupId = ?. 308 * 309 * @param groupId the group ID 310 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 311 * @return the first matching repository 312 * @throws com.liferay.portal.NoSuchRepositoryException if a matching repository could not be found 313 * @throws SystemException if a system exception occurred 314 */ 315 public com.liferay.portal.model.Repository findByGroupId_First( 316 long groupId, 317 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 318 throws com.liferay.portal.NoSuchRepositoryException, 319 com.liferay.portal.kernel.exception.SystemException; 320 321 /** 322 * Returns the first repository in the ordered set where groupId = ?. 323 * 324 * @param groupId the group ID 325 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 326 * @return the first matching repository, or <code>null</code> if a matching repository could not be found 327 * @throws SystemException if a system exception occurred 328 */ 329 public com.liferay.portal.model.Repository fetchByGroupId_First( 330 long groupId, 331 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 332 throws com.liferay.portal.kernel.exception.SystemException; 333 334 /** 335 * Returns the last repository in the ordered set where groupId = ?. 336 * 337 * @param groupId the group ID 338 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 339 * @return the last matching repository 340 * @throws com.liferay.portal.NoSuchRepositoryException if a matching repository could not be found 341 * @throws SystemException if a system exception occurred 342 */ 343 public com.liferay.portal.model.Repository findByGroupId_Last( 344 long groupId, 345 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 346 throws com.liferay.portal.NoSuchRepositoryException, 347 com.liferay.portal.kernel.exception.SystemException; 348 349 /** 350 * Returns the last repository in the ordered set where groupId = ?. 351 * 352 * @param groupId the group ID 353 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 354 * @return the last matching repository, or <code>null</code> if a matching repository could not be found 355 * @throws SystemException if a system exception occurred 356 */ 357 public com.liferay.portal.model.Repository fetchByGroupId_Last( 358 long groupId, 359 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 360 throws com.liferay.portal.kernel.exception.SystemException; 361 362 /** 363 * Returns the repositories before and after the current repository in the ordered set where groupId = ?. 364 * 365 * @param repositoryId the primary key of the current repository 366 * @param groupId the group ID 367 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 368 * @return the previous, current, and next repository 369 * @throws com.liferay.portal.NoSuchRepositoryException if a repository with the primary key could not be found 370 * @throws SystemException if a system exception occurred 371 */ 372 public com.liferay.portal.model.Repository[] findByGroupId_PrevAndNext( 373 long repositoryId, long groupId, 374 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 375 throws com.liferay.portal.NoSuchRepositoryException, 376 com.liferay.portal.kernel.exception.SystemException; 377 378 /** 379 * Returns all the repositories. 380 * 381 * @return the repositories 382 * @throws SystemException if a system exception occurred 383 */ 384 public java.util.List<com.liferay.portal.model.Repository> findAll() 385 throws com.liferay.portal.kernel.exception.SystemException; 386 387 /** 388 * Returns a range of all the repositories. 389 * 390 * <p> 391 * 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. 392 * </p> 393 * 394 * @param start the lower bound of the range of repositories 395 * @param end the upper bound of the range of repositories (not inclusive) 396 * @return the range of repositories 397 * @throws SystemException if a system exception occurred 398 */ 399 public java.util.List<com.liferay.portal.model.Repository> findAll( 400 int start, int end) 401 throws com.liferay.portal.kernel.exception.SystemException; 402 403 /** 404 * Returns an ordered range of all the repositories. 405 * 406 * <p> 407 * 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. 408 * </p> 409 * 410 * @param start the lower bound of the range of repositories 411 * @param end the upper bound of the range of repositories (not inclusive) 412 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 413 * @return the ordered range of repositories 414 * @throws SystemException if a system exception occurred 415 */ 416 public java.util.List<com.liferay.portal.model.Repository> findAll( 417 int start, int end, 418 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 419 throws com.liferay.portal.kernel.exception.SystemException; 420 421 /** 422 * Removes all the repositories where uuid = ? from the database. 423 * 424 * @param uuid the uuid 425 * @throws SystemException if a system exception occurred 426 */ 427 public void removeByUuid(java.lang.String uuid) 428 throws com.liferay.portal.kernel.exception.SystemException; 429 430 /** 431 * Removes the repository where uuid = ? and groupId = ? from the database. 432 * 433 * @param uuid the uuid 434 * @param groupId the group ID 435 * @return the repository that was removed 436 * @throws SystemException if a system exception occurred 437 */ 438 public com.liferay.portal.model.Repository removeByUUID_G( 439 java.lang.String uuid, long groupId) 440 throws com.liferay.portal.NoSuchRepositoryException, 441 com.liferay.portal.kernel.exception.SystemException; 442 443 /** 444 * Removes all the repositories where groupId = ? from the database. 445 * 446 * @param groupId the group ID 447 * @throws SystemException if a system exception occurred 448 */ 449 public void removeByGroupId(long groupId) 450 throws com.liferay.portal.kernel.exception.SystemException; 451 452 /** 453 * Removes all the repositories from the database. 454 * 455 * @throws SystemException if a system exception occurred 456 */ 457 public void removeAll() 458 throws com.liferay.portal.kernel.exception.SystemException; 459 460 /** 461 * Returns the number of repositories where uuid = ?. 462 * 463 * @param uuid the uuid 464 * @return the number of matching repositories 465 * @throws SystemException if a system exception occurred 466 */ 467 public int countByUuid(java.lang.String uuid) 468 throws com.liferay.portal.kernel.exception.SystemException; 469 470 /** 471 * Returns the number of repositories where uuid = ? and groupId = ?. 472 * 473 * @param uuid the uuid 474 * @param groupId the group ID 475 * @return the number of matching repositories 476 * @throws SystemException if a system exception occurred 477 */ 478 public int countByUUID_G(java.lang.String uuid, long groupId) 479 throws com.liferay.portal.kernel.exception.SystemException; 480 481 /** 482 * Returns the number of repositories where groupId = ?. 483 * 484 * @param groupId the group ID 485 * @return the number of matching repositories 486 * @throws SystemException if a system exception occurred 487 */ 488 public int countByGroupId(long groupId) 489 throws com.liferay.portal.kernel.exception.SystemException; 490 491 /** 492 * Returns the number of repositories. 493 * 494 * @return the number of repositories 495 * @throws SystemException if a system exception occurred 496 */ 497 public int countAll() 498 throws com.liferay.portal.kernel.exception.SystemException; 499 }