Package com.d3x.core.repo
Interface Repo<T>
-
- Type Parameters:
T- the type for repo
public interface Repo<T>An interface to a repository of objects that supports CRUD and query operations- Author:
- Xavier Witdouck
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description java.lang.Class<T>getType()Returns the type for this repodefault voidput(T value)Stores a single value into this repovoidputAll(java.util.Collection<T> values)Stores one or more values in this repodefault voidremove(T value)Removes a single value from this repovoidremoveAll(java.util.Collection<T> values)Removes one or more values from this repo<R extends RepoRequest>
java.util.List<T>select(R request)Returns a list of objects for the request
-
-
-
Method Detail
-
getType
java.lang.Class<T> getType()
Returns the type for this repo- Returns:
- the type for repo
-
put
default void put(T value)
Stores a single value into this repo- Parameters:
value- the value to store
-
remove
default void remove(T value)
Removes a single value from this repo- Parameters:
value- the value to remove
-
putAll
void putAll(java.util.Collection<T> values)
Stores one or more values in this repo- Parameters:
values- the values to store
-
removeAll
void removeAll(java.util.Collection<T> values)
Removes one or more values from this repo- Parameters:
values- the values to remove
-
select
<R extends RepoRequest> java.util.List<T> select(R request)
Returns a list of objects for the request- Parameters:
request- the request descriptor- Returns:
- the list of objects
-
-