Code example for DetachedCriteria

Methods: add

	 * @param criteria The {@link DetachedCriteria} to fulfill. 
	 * @param maxResults Maximum quantity of results to find. 
	 * @return The random list. 
	protected List<T> findRandomList(DetachedCriteria criteria, Integer maxResults) {
		return find(criteria, maxResults);
	protected PagedResult<T> findRandom(DetachedCriteria detachedCriteria, Pager pager, Sorting sorting) {
		return find(detachedCriteria, pager, sorting);
	 * @see 
	public T getRandom() { 
		return getRandom(createDetachedCriteria()); 
Connect your IDE to all the code out there  Get Codota for Java