org.olat.core.gui.control.generic.portal
Class SortingCriteria

java.lang.Object
  extended by org.olat.core.gui.control.generic.portal.SortingCriteria

public class SortingCriteria
extends java.lang.Object

Description:
Encapsulates the sorting info for a portlet. The info is intended to be stored as a map so the conversion businessObject -> Map and vice versa is also provided here.

Initial Date: 15.11.2007

Author:
Lavinia Dumitrescu

Field Summary
static int ALPHABETICAL_SORTING
           
static int AUTO_SORTING
           
static int DATE_SORTING
           
static int MANUAL_SORTING
           
static int TYPE_SORTING
           
 
Constructor Summary
SortingCriteria()
          Manual sorting constructor.
SortingCriteria(java.util.List<java.lang.Integer> sortingTermsList)
          Auto sorting constructor.
SortingCriteria(java.util.Map<java.lang.String,java.lang.Integer> paramMap, java.util.List<java.lang.Integer> sortingTermsList)
           
 
Method Summary
 int getMaxEntries()
           
 java.util.Map getPersistable()
           
 int getSortingTerm()
           
 java.util.List<java.lang.Integer> getSortingTermsList()
           
 int getSortingType()
           
 boolean isAscending()
           
 void setAscending(boolean ascending)
           
 void setMaxEntries(int maxEntries)
           
 void setSortingTerm(int sortingTerm)
           
 void setSortingType(int sortingType)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ALPHABETICAL_SORTING

public static final int ALPHABETICAL_SORTING
See Also:
Constant Field Values

DATE_SORTING

public static final int DATE_SORTING
See Also:
Constant Field Values

TYPE_SORTING

public static final int TYPE_SORTING
See Also:
Constant Field Values

AUTO_SORTING

public static final int AUTO_SORTING
See Also:
Constant Field Values

MANUAL_SORTING

public static final int MANUAL_SORTING
See Also:
Constant Field Values
Constructor Detail

SortingCriteria

public SortingCriteria(java.util.List<java.lang.Integer> sortingTermsList)
Auto sorting constructor.


SortingCriteria

public SortingCriteria(java.util.Map<java.lang.String,java.lang.Integer> paramMap,
                       java.util.List<java.lang.Integer> sortingTermsList)

SortingCriteria

public SortingCriteria()
Manual sorting constructor.

Method Detail

getPersistable

public java.util.Map getPersistable()
Returns:
a Map with the current sortingCriteria attribute values.

isAscending

public boolean isAscending()

setAscending

public void setAscending(boolean ascending)

getMaxEntries

public int getMaxEntries()

setMaxEntries

public void setMaxEntries(int maxEntries)

getSortingTerm

public int getSortingTerm()

setSortingTerm

public void setSortingTerm(int sortingTerm)

getSortingType

public int getSortingType()

setSortingType

public void setSortingType(int sortingType)

getSortingTermsList

public java.util.List<java.lang.Integer> getSortingTermsList()