Class CriterionInformation
- java.lang.Object
-
- ro.sync.ecss.extensions.commons.sort.CriterionInformation
-
@API(type=INTERNAL, src=PUBLIC) public class CriterionInformation extends java.lang.Object
Holds information about a single sorting criterion.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
CriterionInformation.ORDER
Order enumeration.static class
CriterionInformation.TYPE
Type enumeration.
-
Constructor Summary
Constructors Constructor Description CriterionInformation(int keyIndex, java.lang.String displayName)
Constructor.CriterionInformation(int keyIndex, java.lang.String type, java.lang.String order, java.lang.String displayName)
Constructor.CriterionInformation(int keyIndex, java.lang.String type, java.lang.String order, java.lang.String displayName, boolean isInitiallyEnabled)
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
getDisplayName()
int
getKeyIndex()
java.lang.String
getOrder()
java.lang.String
getType()
boolean
isInitiallySelected()
java.lang.String
toString()
-
-
-
Constructor Detail
-
CriterionInformation
public CriterionInformation(int keyIndex, java.lang.String type, java.lang.String order, java.lang.String displayName)
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, java.lang.String type, java.lang.String order, java.lang.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
public CriterionInformation(int keyIndex, java.lang.String displayName)
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 Detail
-
getDisplayName
public java.lang.String 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
public java.lang.String getType()
- Returns:
- Returns the sorting type.
One of
CriterionInformation.TYPE.TEXT
,CriterionInformation.TYPE.NUMERIC
orCriterionInformation.TYPE.DATE
-
getOrder
public java.lang.String 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
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
- See Also:
Object.toString()
-
-