Interface CommunityMembershipRepository
- All Superinterfaces:
org.silverpeas.core.persistence.datasource.repository.EntityRepository<CommunityMembership>
- All Known Implementing Classes:
CommunityMembershipJpaRepository
public interface CommunityMembershipRepository
extends org.silverpeas.core.persistence.datasource.repository.EntityRepository<CommunityMembership>
A repository to persist the memberships to a community of users. This repository doesn't support
the deletion of the entities in the repository neither the getting of all the entities. When a
member is removed from a community, only its status is changed: he passes then from the
MembershipStatus.COMMITTED status to the
MembershipStatus.REMOVED one; this is for
keeping the history of the memberships of a community. Members of a community is really deleted
only when their community is also deleted.- Author:
- mmoquillon
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic interfaceThe table of memberships of a given community of users. -
Method Summary
Modifier and TypeMethodDescriptiondefault voiddelete(List<CommunityMembership> entities) default voiddelete(CommunityMembership... entity) longdeleteByComponentInstanceId(String componentInstanceId) Deletes all the members of the community of users managed by the specified component instance.default longdeleteById(String... ids) default longdeleteById(Collection<String> ids) get()Gets the single instance of this repository.default org.silverpeas.core.util.SilverpeasList<CommunityMembership>getAll()getMembershipsTable(CommunityOfUsers community) Gets the table of members of the specified community.Methods inherited from interface org.silverpeas.core.persistence.datasource.repository.EntityRepository
contains, findByCriteria, flush, getById, getById, getById, save, save, save
-
Method Details
-
get
Gets the single instance of this repository. -
getMembershipsTable
CommunityMembershipRepository.CommunityMembershipsTable getMembershipsTable(CommunityOfUsers community) Gets the table of members of the specified community.- Parameters:
community- a community of users.- Returns:
- a
CommunityMembershipRepository.CommunityMembershipsTableinstance through which the members of the specified community can be requested.
-
deleteByComponentInstanceId
Deletes all the members of the community of users managed by the specified component instance. The method has to be invoked only when the given component instance, and thus the community managed of users by it, is being deleted.- Specified by:
deleteByComponentInstanceIdin interfaceorg.silverpeas.core.persistence.datasource.repository.EntityRepository<CommunityMembership>- Parameters:
componentInstanceId- the unique component instance identifier.- Returns:
- the number of deleted members.
- See Also:
-
delete
- Specified by:
deletein interfaceorg.silverpeas.core.persistence.datasource.repository.EntityRepository<CommunityMembership>- Parameters:
entity- the entity/entities to delete.- API Note:
- Not supported
-
delete
- Specified by:
deletein interfaceorg.silverpeas.core.persistence.datasource.repository.EntityRepository<CommunityMembership>- Parameters:
entities- the entities to delete.- API Note:
- Not supported
-
deleteById
- Specified by:
deleteByIdin interfaceorg.silverpeas.core.persistence.datasource.repository.EntityRepository<CommunityMembership>- Parameters:
ids- the identifiers of the entities to delete.- Returns:
- nothing
- API Note:
- Not supported
-
deleteById
- Specified by:
deleteByIdin interfaceorg.silverpeas.core.persistence.datasource.repository.EntityRepository<CommunityMembership>- Parameters:
ids- the identifiers of the entities to delete.- Returns:
- nothing
- API Note:
- Not supported
-
getAll
- Specified by:
getAllin interfaceorg.silverpeas.core.persistence.datasource.repository.EntityRepository<CommunityMembership>- Returns:
- nothing
- API Note:
- Not supported
-