Interface CommunityOfUsersRepository
- All Superinterfaces:
org.silverpeas.core.persistence.datasource.repository.EntityRepository<CommunityOfUsers>
- All Known Implementing Classes:
CommunityOfUsersJpaRepository
public interface CommunityOfUsersRepository
extends org.silverpeas.core.persistence.datasource.repository.EntityRepository<CommunityOfUsers>
This repository manages the persistence of communities of users. It abstracts the nature of the
datasource in which are stored the communities as well as the persistence engine used to manage
the access to such a datasource.
-
Method Summary
Modifier and TypeMethodDescriptionstatic CommunityOfUsersRepositoryget()Gets the single instance of this repository.getAllByUserId(String userId) Gets all the community of users the specified user is currently a member.getByComponentInstanceId(String componentInstanceId) Gets the community of users managed by the specified component instance.getBySpaceId(String spaceId) Gets the community of users of the specified collaborative space.Methods inherited from interface org.silverpeas.core.persistence.datasource.repository.EntityRepository
contains, delete, delete, deleteByComponentInstanceId, deleteById, deleteById, findByCriteria, flush, getAll, getById, getById, getById, save, save, save
-
Method Details
-
get
Gets the single instance of this repository. -
getByComponentInstanceId
Gets the community of users managed by the specified component instance.- Parameters:
componentInstanceId- the unique identifier of a component instance.- Returns:
- an
Optionalwith theCommunityOfUsersinstance or an emptyOptionalif no such component instance exists.
-
getBySpaceId
Gets the community of users of the specified collaborative space.- Parameters:
spaceId- the unique identifier of a space.- Returns:
- an
Optionalwith theCommunityOfUsersinstance or an emptyOptionalif no such space exists or if the space doesn't have any community.
-
getAllByUserId
Gets all the community of users the specified user is currently a member.- Parameters:
userId- the unique identifier of a user.- Returns:
- a list of communities to which the given user is a member.
-