-
- All Superinterfaces:
WithFilter<Group>
public interface GroupStore extends WithFilter<Group>
Base groups interface from which all other group stores extend.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default Group.Buildercopy(Group existing)Clone an existing group to createContent a new groupdefault Group.Buildercreate()Create a new groupvoiddelete(Group group)Delete a group from the storedefault voiddelete(Collection<Group> groups)Delete a collection of groups from the storedefault voiddeleteAll()Delete all groups from the storedefault Group.Builderedit(Group existing)Edit an existing group, saving will replace itdefault Stream<Group>filter(Filter<Group> filter)Filter annotations to match the test.Stream<Group>getAll()Get all groupsGroup.BuildergetBuilder()Create a new group builderOptional<Group>getById(String groupId)Get the group with the given ID, if it is currently held in this storedefault Stream<Group>getByType(String type)Get all groups of a given type currently held in this storeItemgetItem()Get the item to which the groups relate.-
Methods inherited from interface io.annot8.api.helpers.WithFilter
find
-
-
-
-
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
-
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
-
-