Interface GroupStore

  • All Superinterfaces:
    WithFilter<Group>

    public interface GroupStore
    extends WithFilter<Group>
    Base groups interface from which all other group stores extend.
    • Method Detail

      • getItem

        Item getItem()
        Get the item to which the groups relate.
        Returns:
        item
      • getBuilder

        Group.Builder getBuilder()
        Create a new group builder
        Returns:
        a builder object for the supported group
      • create

        default Group.Builder create()
        Create a new group
        Returns:
        a builder to createContent a new group
      • copy

        default Group.Builder copy​(Group existing)
        Clone an existing group to createContent a new group
        Parameters:
        existing - the existing group
        Returns:
        a builder to based on the an existing group, but don't overwrite that group on save.
      • edit

        default Group.Builder edit​(Group existing)
        Edit an existing group, saving will replace it
        Parameters:
        existing - the existing group
        Returns:
        a builder to edit an existing group
      • delete

        void delete​(Group group)
        Delete a group from the store
        Parameters:
        group - to delete
      • delete

        default void delete​(Collection<Group> groups)
        Delete a collection of groups from the store
        Parameters:
        groups - the groups to delete
      • deleteAll

        default void deleteAll()
        Delete all groups from the store
      • getAll

        Stream<Group> getAll()
        Get all groups
        Returns:
        all groups currently held in this store
      • getByType

        default Stream<Group> getByType​(String type)
        Get all groups of a given type currently held in this store
        Parameters:
        type - the type to filter on
        Returns:
        the groups of that types
      • getById

        Optional<Group> getById​(String groupId)
        Get the group with the given ID, if it is currently held in this store
        Parameters:
        groupId - the id
        Returns:
        the group
      • filter

        default Stream<Group> filter​(Filter<Group> filter)
        Filter annotations to match the test.
        Specified by:
        filter in interface WithFilter<Group>
        Parameters:
        filter - the test to filter with
        Returns:
        stream of matching annotations