T - Type of object this repository deals with.public interface RandomRepository<T extends Identifiable> extends Repository<T>
Repository with the capability of getting random objects.| Modifier and Type | Method and Description |
|---|---|
T |
getRandom()
Gets a random object from the repository.
|
java.util.List<java.lang.Long> |
getRandomIds(java.lang.Integer maxResults)
Returns a list of random IDs.
|
java.util.List<T> |
getRandomList(java.lang.Integer maxResults)
Gets a random list of objects from the repository.
|
add, addAll, findByField, get, getAll, getAll, getSize, getUniqueInstance, isEmpty, remove, remove, removeAll, removeAll, replaceAll, updatejava.util.List<T> getRandomList(java.lang.Integer maxResults)
maxResults - Maximum quantity of objects to get.T getRandom()
java.util.List<java.lang.Long> getRandomIds(java.lang.Integer maxResults)
maxResults - Maximum amount of IDs to return.