it.tidalwave.util
Interface Finder<T>

Package class diagram package Finder
All Superinterfaces:
java.lang.Cloneable, java.io.Serializable
All Known Implementing Classes:
FinderSupport

public interface Finder<T>
extends java.lang.Cloneable, java.io.Serializable

Version:
$Id: Finder.java,v 1fac844c8d8a 2010/03/21 17:00:04 fabrizio $
Author:
Fabrizio Giudici
Status: draft API

Nested Class Summary
static interface Finder.SortCriterion
           
static class Finder.SortDirection
           
 
Method Summary
 int count()
           
 T firstResult()
           
 Finder<T> from(int firstResult)
           
 Finder<T> max(int maxResults)
           
<X> Finder<X>
ofType(java.lang.Class<X> type)
           
 T result()
           
 java.util.List<? extends T> results()
           
 Finder<T> sort(Finder.SortCriterion criterion)
           
 Finder<T> sort(Finder.SortCriterion criterion, Finder.SortDirection direction)
           
 

Method Detail

count

int count()

from

@Nonnull
Finder<T> from(@Nonnegative
                       int firstResult)

max

@Nonnull
Finder<T> max(@Nonnegative
                      int maxResults)

ofType

@Nonnull
<X> Finder<X> ofType(@Nonnull
                             java.lang.Class<X> type)

result

@Nonnull
T result()
         throws NotFoundException
Throws:
NotFoundException

firstResult

@Nonnull
T firstResult()
              throws NotFoundException
Throws:
NotFoundException

results

@Nonnull
java.util.List<? extends T> results()

sort

@Nonnull
Finder<T> sort(@Nonnull
                       Finder.SortCriterion criterion,
                       @Nonnull
                       Finder.SortDirection direction)

sort

@Nonnull
Finder<T> sort(@Nonnull
                       Finder.SortCriterion criterion)


Copyright © 2009-2010 Tidalwave s.a.s.. All Rights Reserved.