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.COMMITTEDstatus to theMembershipStatus.REMOVEDone; 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 interfaceCommunityMembershipRepository.CommunityMembershipsTableThe 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 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)static CommunityMembershipRepositoryget()Gets the single instance of this repository.default org.silverpeas.core.util.SilverpeasList<CommunityMembership>getAll()CommunityMembershipRepository.CommunityMembershipsTablegetMembershipsTable(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.CommunityMembershipsTableinstance 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:
deleteByComponentInstanceIdin 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:
deletein 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:
deletein 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:
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
default long deleteById(Collection<String> ids)
- 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
default org.silverpeas.core.util.SilverpeasList<CommunityMembership> getAll()
- Specified by:
getAllin interfaceorg.silverpeas.core.persistence.datasource.repository.EntityRepository<CommunityMembership>- Returns:
- nothing
- API Note:
- Not supported
-
-