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 theMembershipStatus.COMMITTED
status to theMembershipStatus.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 Classes Modifier and Type Interface Description static interface
CommunityMembershipRepository.CommunityMembershipsTable
The table of memberships of a given community of users.
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default void
delete(List<CommunityMembership> entities)
default void
delete(CommunityMembership... entity)
long
deleteByComponentInstanceId(String componentInstanceId)
Deletes all the members of the community of users managed by the specified component instance.default long
deleteById(String... ids)
default long
deleteById(Collection<String> ids)
static CommunityMembershipRepository
get()
Gets the single instance of this repository.default org.silverpeas.core.util.SilverpeasList<CommunityMembership>
getAll()
CommunityMembershipRepository.CommunityMembershipsTable
getMembershipsTable(CommunityOfUsers community)
Gets the table of members of the specified community.
-
-
-
Method Detail
-
get
static CommunityMembershipRepository 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.CommunityMembershipsTable
instance through which the members of the specified community can be requested.
-
deleteByComponentInstanceId
long deleteByComponentInstanceId(String componentInstanceId)
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:
deleteByComponentInstanceId
in interfaceorg.silverpeas.core.persistence.datasource.repository.EntityRepository<CommunityMembership>
- Parameters:
componentInstanceId
- the unique component instance identifier.- Returns:
- the number of deleted members.
- See Also:
CommunityMembershipRepository.CommunityMembershipsTable.deleteAll()
-
delete
default void delete(CommunityMembership... entity)
- Specified by:
delete
in interfaceorg.silverpeas.core.persistence.datasource.repository.EntityRepository<CommunityMembership>
- Parameters:
entity
- the entity/entities to delete.- API Note:
- Not supported
-
delete
default void delete(List<CommunityMembership> entities)
- Specified by:
delete
in interfaceorg.silverpeas.core.persistence.datasource.repository.EntityRepository<CommunityMembership>
- Parameters:
entities
- the entities to delete.- API Note:
- Not supported
-
deleteById
default long deleteById(String... ids)
- Specified by:
deleteById
in interfaceorg.silverpeas.core.persistence.datasource.repository.EntityRepository<CommunityMembership>
- Parameters:
ids
- the identifiers of the entities to delete.- Returns:
- nothing
- API Note:
- Not supported
-
deleteById
default long deleteById(Collection<String> ids)
- Specified by:
deleteById
in interfaceorg.silverpeas.core.persistence.datasource.repository.EntityRepository<CommunityMembership>
- Parameters:
ids
- the identifiers of the entities to delete.- Returns:
- nothing
- API Note:
- Not supported
-
getAll
default org.silverpeas.core.util.SilverpeasList<CommunityMembership> getAll()
- Specified by:
getAll
in interfaceorg.silverpeas.core.persistence.datasource.repository.EntityRepository<CommunityMembership>
- Returns:
- nothing
- API Note:
- Not supported
-
-