it.tidalwave.role
Interface Sortable

Package class diagram package Sortable

public interface Sortable

The role of an object that has contents that can be sorted.

Version:
$Id$
Author:
Fabrizio Giudici
Status: stable API

Field Summary
static Sortable DEFAULT
          A default Sortable which does nothing (useful for implementing the NullObject pattern).
static Class<Sortable> Sortable
           
 
Method Summary
 Finder.SortCriterion getSortCriterion()
          Returns the current sort criterion.
 Finder.SortDirection getSortDirection()
          Returns the current sort direction.
 void setSortCriterion(Finder.SortCriterion sortCriterion)
          Sets the sort criterion.
 void setSortDirection(Finder.SortDirection sortDirection)
          Sets the sort direction.
 

Field Detail

Sortable

static final Class<Sortable> Sortable

DEFAULT

static final Sortable DEFAULT
A default Sortable which does nothing (useful for implementing the NullObject pattern). This object always returns Finder.SortCriterion.UNSORTED as sortCriterion and SortDirection.ASCENDING as sortDirection.

Method Detail

setSortCriterion

void setSortCriterion(@Nonnull
                      Finder.SortCriterion sortCriterion)
Sets the sort criterion.

Parameters:
sortCriterion - the sort criterion

setSortDirection

void setSortDirection(@Nonnull
                      Finder.SortDirection sortDirection)
Sets the sort direction.

Parameters:
sortDirection - the sort direction

getSortCriterion

@Nonnull
Finder.SortCriterion getSortCriterion()
Returns the current sort criterion.

Returns:
the sort criterion

getSortDirection

@Nonnull
Finder.SortDirection getSortDirection()
Returns the current sort direction.

Returns:
the sort direction


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