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.
|
List<Long> |
getRandomIds(Integer maxResults)
Returns a list of random IDs.
|
List<T> |
getRandomList(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, updateCopyright © 2014. All rights reserved.