Class CriterionInformation
java.lang.Object
ro.sync.ecss.extensions.commons.sort.CriterionInformation
Holds information about a single sorting criterion.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enum
Order enumeration.static enum
Type enumeration. -
Constructor Summary
ConstructorsConstructorDescriptionCriterionInformation
(int keyIndex, String displayName) Constructor.CriterionInformation
(int keyIndex, String type, String order, String displayName) Constructor.CriterionInformation
(int keyIndex, String type, String order, String displayName, boolean isInitiallyEnabled) Constructor. -
Method Summary
-
Constructor Details
-
CriterionInformation
Constructor.- Parameters:
keyIndex
- The index in its parent of the element that corresponds to the sorting key.type
- The sorting type. One ofCriterionInformation.TYPE.TEXT
,CriterionInformation.TYPE.NUMERIC
orCriterionInformation.TYPE.DATE
.order
- The sorting order. One ofCriterionInformation.ORDER.ASCENDING
orCriterionInformation.ORDER.DESCENDING
.displayName
- The key display name. For a table column it can be the text from the corresponding table header cell.
-
CriterionInformation
public CriterionInformation(int keyIndex, String type, String order, String displayName, boolean isInitiallyEnabled) Constructor.- Parameters:
keyIndex
- The index in its parent of the element that corresponds to the sorting key.type
- The sorting type. One ofCriterionInformation.TYPE.TEXT
,CriterionInformation.TYPE.NUMERIC
orCriterionInformation.TYPE.DATE
.order
- The sorting order. One ofCriterionInformation.ORDER.ASCENDING
orCriterionInformation.ORDER.DESCENDING
.displayName
- The key display name. For a table column it can be the text from the corresponding table header cell.isInitiallyEnabled
-true
if this criterion should be initially enabled.
-
CriterionInformation
Constructor.- Parameters:
keyIndex
- The index in its parent of the element that corresponds to the sorting key.displayName
- The key display name. For a table column it can be the text from the corresponding table header cell.
-
-
Method Details
-
getDisplayName
- Returns:
- Returns the display name of the criterion key.
-
getKeyIndex
public int getKeyIndex()- Returns:
- Returns the key index for the sorting criterion. This represents the index in its parent of the element associated with the key. For a table this represents the index of the cell in its parent row.
-
getType
- Returns:
- Returns the sorting type.
One of
CriterionInformation.TYPE.TEXT
,CriterionInformation.TYPE.NUMERIC
orCriterionInformation.TYPE.DATE
-
getOrder
- Returns:
- Returns the sorting order.
One of
CriterionInformation.ORDER.ASCENDING
orCriterionInformation.ORDER.DESCENDING
.
-
isInitiallySelected
public boolean isInitiallySelected()- Returns:
true
if the criterion is initially enabled.
-
toString
-