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
  • Method Details

    • get

      Gets the single instance of this repository.
    • getMembershipsTable

      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 interface org.silverpeas.core.persistence.datasource.repository.EntityRepository<CommunityMembership>
      Parameters:
      componentInstanceId - the unique component instance identifier.
      Returns:
      the number of deleted members.
      See Also:
    • delete

      default void delete(CommunityMembership... entity)
      Specified by:
      delete in interface org.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 interface org.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 interface org.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 interface org.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 interface org.silverpeas.core.persistence.datasource.repository.EntityRepository<CommunityMembership>
      Returns:
      nothing
      API Note:
      Not supported