Liferay 6.1.0

com.liferay.portal.service.persistence
Interface RepositoryPersistence

All Superinterfaces:
BasePersistence<Repository>

public interface RepositoryPersistence
extends BasePersistence<Repository>

The persistence interface for the repository service.

Caching information and settings can be found in portal.properties

See Also:
RepositoryPersistenceImpl, RepositoryUtil

Method Summary
 void cacheResult(List<Repository> repositories)
          Caches the repositories in the entity cache if it is enabled.
 void cacheResult(Repository repository)
          Caches the repository in the entity cache if it is enabled.
 int countAll()
          Returns the number of repositories.
 int countByGroupId(long groupId)
          Returns the number of repositories where groupId = ?.
 Repository create(long repositoryId)
          Creates a new repository with the primary key.
 Repository fetchByPrimaryKey(long repositoryId)
          Returns the repository with the primary key or returns null if it could not be found.
 List<Repository> findAll()
          Returns all the repositories.
 List<Repository> findAll(int start, int end)
          Returns a range of all the repositories.
 List<Repository> findAll(int start, int end, OrderByComparator orderByComparator)
          Returns an ordered range of all the repositories.
 Repository findByGroupId_First(long groupId, OrderByComparator orderByComparator)
          Returns the first repository in the ordered set where groupId = ?.
 Repository findByGroupId_Last(long groupId, OrderByComparator orderByComparator)
          Returns the last repository in the ordered set where groupId = ?.
 Repository[] findByGroupId_PrevAndNext(long repositoryId, long groupId, OrderByComparator orderByComparator)
          Returns the repositories before and after the current repository in the ordered set where groupId = ?.
 List<Repository> findByGroupId(long groupId)
          Returns all the repositories where groupId = ?.
 List<Repository> findByGroupId(long groupId, int start, int end)
          Returns a range of all the repositories where groupId = ?.
 List<Repository> findByGroupId(long groupId, int start, int end, OrderByComparator orderByComparator)
          Returns an ordered range of all the repositories where groupId = ?.
 Repository findByPrimaryKey(long repositoryId)
          Returns the repository with the primary key or throws a NoSuchRepositoryException if it could not be found.
 Repository remove(long repositoryId)
          Removes the repository with the primary key from the database.
 Repository remove(Repository repository)
          Removes the model instance from the database.
 void removeAll()
          Removes all the repositories from the database.
 void removeByGroupId(long groupId)
          Removes all the repositories where groupId = ? from the database.
 Repository updateImpl(Repository repository, boolean merge)
           
 
Methods inherited from interface com.liferay.portal.service.persistence.BasePersistence
clearCache, clearCache, closeSession, countWithDynamicQuery, fetchByPrimaryKey, findByPrimaryKey, findWithDynamicQuery, findWithDynamicQuery, findWithDynamicQuery, getDataSource, getListeners, openSession, processException, registerListener, remove, setDataSource, unregisterListener, update, update
 

Method Detail

cacheResult

void cacheResult(Repository repository)
Caches the repository in the entity cache if it is enabled.

Parameters:
repository - the repository

cacheResult

void cacheResult(List<Repository> repositories)
Caches the repositories in the entity cache if it is enabled.

Parameters:
repositories - the repositories

create

Repository create(long repositoryId)
Creates a new repository with the primary key. Does not add the repository to the database.

Parameters:
repositoryId - the primary key for the new repository
Returns:
the new repository

remove

Repository remove(long repositoryId)
                  throws NoSuchRepositoryException,
                         SystemException
Removes the repository with the primary key from the database. Also notifies the appropriate model listeners.

Parameters:
repositoryId - the primary key of the repository
Returns:
the repository that was removed
Throws:
NoSuchRepositoryException - if a repository with the primary key could not be found
SystemException - if a system exception occurred

updateImpl

Repository updateImpl(Repository repository,
                      boolean merge)
                      throws SystemException
Throws:
SystemException

findByPrimaryKey

Repository findByPrimaryKey(long repositoryId)
                            throws NoSuchRepositoryException,
                                   SystemException
Returns the repository with the primary key or throws a NoSuchRepositoryException if it could not be found.

Parameters:
repositoryId - the primary key of the repository
Returns:
the repository
Throws:
NoSuchRepositoryException - if a repository with the primary key could not be found
SystemException - if a system exception occurred

fetchByPrimaryKey

Repository fetchByPrimaryKey(long repositoryId)
                             throws SystemException
Returns the repository with the primary key or returns null if it could not be found.

Parameters:
repositoryId - the primary key of the repository
Returns:
the repository, or null if a repository with the primary key could not be found
Throws:
SystemException - if a system exception occurred

findByGroupId

List<Repository> findByGroupId(long groupId)
                               throws SystemException
Returns all the repositories where groupId = ?.

Parameters:
groupId - the group ID
Returns:
the matching repositories
Throws:
SystemException - if a system exception occurred

findByGroupId

List<Repository> findByGroupId(long groupId,
                               int start,
                               int end)
                               throws SystemException
Returns a range of all the repositories where groupId = ?.

Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to QueryUtil.ALL_POS will return the full result set.

Parameters:
groupId - the group ID
start - the lower bound of the range of repositories
end - the upper bound of the range of repositories (not inclusive)
Returns:
the range of matching repositories
Throws:
SystemException - if a system exception occurred

findByGroupId

List<Repository> findByGroupId(long groupId,
                               int start,
                               int end,
                               OrderByComparator orderByComparator)
                               throws SystemException
Returns an ordered range of all the repositories where groupId = ?.

Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to QueryUtil.ALL_POS will return the full result set.

Parameters:
groupId - the group ID
start - the lower bound of the range of repositories
end - the upper bound of the range of repositories (not inclusive)
orderByComparator - the comparator to order the results by (optionally null)
Returns:
the ordered range of matching repositories
Throws:
SystemException - if a system exception occurred

findByGroupId_First

Repository findByGroupId_First(long groupId,
                               OrderByComparator orderByComparator)
                               throws NoSuchRepositoryException,
                                      SystemException
Returns the first repository in the ordered set where groupId = ?.

Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to QueryUtil.ALL_POS will return the full result set.

Parameters:
groupId - the group ID
orderByComparator - the comparator to order the set by (optionally null)
Returns:
the first matching repository
Throws:
NoSuchRepositoryException - if a matching repository could not be found
SystemException - if a system exception occurred

findByGroupId_Last

Repository findByGroupId_Last(long groupId,
                              OrderByComparator orderByComparator)
                              throws NoSuchRepositoryException,
                                     SystemException
Returns the last repository in the ordered set where groupId = ?.

Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to QueryUtil.ALL_POS will return the full result set.

Parameters:
groupId - the group ID
orderByComparator - the comparator to order the set by (optionally null)
Returns:
the last matching repository
Throws:
NoSuchRepositoryException - if a matching repository could not be found
SystemException - if a system exception occurred

findByGroupId_PrevAndNext

Repository[] findByGroupId_PrevAndNext(long repositoryId,
                                       long groupId,
                                       OrderByComparator orderByComparator)
                                       throws NoSuchRepositoryException,
                                              SystemException
Returns the repositories before and after the current repository in the ordered set where groupId = ?.

Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to QueryUtil.ALL_POS will return the full result set.

Parameters:
repositoryId - the primary key of the current repository
groupId - the group ID
orderByComparator - the comparator to order the set by (optionally null)
Returns:
the previous, current, and next repository
Throws:
NoSuchRepositoryException - if a repository with the primary key could not be found
SystemException - if a system exception occurred

findAll

List<Repository> findAll()
                         throws SystemException
Returns all the repositories.

Returns:
the repositories
Throws:
SystemException - if a system exception occurred

findAll

List<Repository> findAll(int start,
                         int end)
                         throws SystemException
Returns a range of all the repositories.

Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to QueryUtil.ALL_POS will return the full result set.

Parameters:
start - the lower bound of the range of repositories
end - the upper bound of the range of repositories (not inclusive)
Returns:
the range of repositories
Throws:
SystemException - if a system exception occurred

findAll

List<Repository> findAll(int start,
                         int end,
                         OrderByComparator orderByComparator)
                         throws SystemException
Returns an ordered range of all the repositories.

Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to QueryUtil.ALL_POS will return the full result set.

Parameters:
start - the lower bound of the range of repositories
end - the upper bound of the range of repositories (not inclusive)
orderByComparator - the comparator to order the results by (optionally null)
Returns:
the ordered range of repositories
Throws:
SystemException - if a system exception occurred

removeByGroupId

void removeByGroupId(long groupId)
                     throws SystemException
Removes all the repositories where groupId = ? from the database.

Parameters:
groupId - the group ID
Throws:
SystemException - if a system exception occurred

removeAll

void removeAll()
               throws SystemException
Removes all the repositories from the database.

Throws:
SystemException - if a system exception occurred

countByGroupId

int countByGroupId(long groupId)
                   throws SystemException
Returns the number of repositories where groupId = ?.

Parameters:
groupId - the group ID
Returns:
the number of matching repositories
Throws:
SystemException - if a system exception occurred

countAll

int countAll()
             throws SystemException
Returns the number of repositories.

Returns:
the number of repositories
Throws:
SystemException - if a system exception occurred

remove

Repository remove(Repository repository)
                  throws SystemException
Description copied from interface: BasePersistence
Removes the model instance from the database. Also notifies the appropriate model listeners.

Specified by:
remove in interface BasePersistence<Repository>
Parameters:
repository - the model instance to remove
Returns:
the model instance that was removed
Throws:
SystemException - if a system exception occurred

Liferay 6.1.0