Package com.portal.pfc.ui.table
Class ColumnIdentifier
java.lang.Object
com.portal.pfc.ui.table.ColumnIdentifier
ColumnIdentifier is a object used to store meta data for a column within
a PFCTable. ColumnIdentifier stores the data type associated with
a particular column, so that the cells for that given column can be sorted
using the correct algorithm. In addition, the ColumnIdentifier also stores the
sort order state (ascending or descending) and whether the column is sortable.
String
AlphaNumeric
Numeric (Integer, Float, Double, BigDecimal, BigInteger)
Dates
Boolean
A given column can contain one of the following data types:
Based upon the data type, the correct sort will be performed. See
for more details.
invalid reference
CommonSortRoutines
- Author:
- Les Thomas
-
Constructor Summary
ConstructorsConstructorDescriptionConstructs a ColumnIdentifier object, and by default, sets the column to be sortable.ColumnIdentifier(boolean sortable) Construct a ColumnIdentifier object, and set the column to be sortable based upon specified value. -
Method Summary
Modifier and TypeMethodDescriptionbooleanReturns whether the given column data type is alpha numeric.booleanReturns whether the current sort order is ascending or not.booleanReturns whether the given column data type is a Boolean.booleanisDate()Returns whether the given column data type is a Date.booleanReturns whether the current sort order is descending or not.booleanReturns whether the given column data type is numeric.booleanReturns whether column is sortable.booleanisString()Returns whether the given column data type is a String.voidSets the current sort order to ascending.voidsetColumnIdentifier(Class columnClass) Sets the data type for the given column based upon the specified column class.voidSets the current sort order to descending.voidSets the column data type to alpha numeric.voidSets the column data type to Boolean.voidSets the column data type to Date.voidSets the column data type to numeric.voidSets the column data type to String (which is the default).voidsetSortable(boolean sortable) Sets the column to be sortable, based upon the specified value.
-
Constructor Details
-
ColumnIdentifier
public ColumnIdentifier()Constructs a ColumnIdentifier object, and by default, sets the column to be sortable. -
ColumnIdentifier
public ColumnIdentifier(boolean sortable) Construct a ColumnIdentifier object, and set the column to be sortable based upon specified value.- Parameters:
sortable- true (sortable) or false (not sortable).
-
-
Method Details
-
setSortable
public void setSortable(boolean sortable) Sets the column to be sortable, based upon the specified value.- Parameters:
sortable- true (sortable) or false (not sortable).
-
isSortable
public boolean isSortable()Returns whether column is sortable.- Returns:
- true if sortable, false otherwise.
-
isAscending
public boolean isAscending()Returns whether the current sort order is ascending or not.- Returns:
- true if ascending, false otherwise.
-
setAscending
public void setAscending()Sets the current sort order to ascending. -
isDescending
public boolean isDescending()Returns whether the current sort order is descending or not.- Returns:
- true if descending, false otherwise.
-
setDescending
public void setDescending()Sets the current sort order to descending. -
isNumeric
public boolean isNumeric()Returns whether the given column data type is numeric.- Returns:
- true if numeric, false otherwise.
-
setIsNumeric
public void setIsNumeric()Sets the column data type to numeric. -
isAlphaNumeric
public boolean isAlphaNumeric()Returns whether the given column data type is alpha numeric.- Returns:
- true if alpha numeric, false otherwise.
-
setIsAlphaNumeric
public void setIsAlphaNumeric()Sets the column data type to alpha numeric. -
isDate
public boolean isDate()Returns whether the given column data type is a Date.- Returns:
- true if Date, false otherwise.
-
setIsDate
public void setIsDate()Sets the column data type to Date. -
isString
public boolean isString()Returns whether the given column data type is a String.- Returns:
- true if String, false otherwise.
-
setIsString
public void setIsString()Sets the column data type to String (which is the default). -
isBoolean
public boolean isBoolean()Returns whether the given column data type is a Boolean.- Returns:
- true if Boolean, false otherwise.
-
setIsBoolean
public void setIsBoolean()Sets the column data type to Boolean. -
setColumnIdentifier
Sets the data type for the given column based upon the specified column class. For alpha numeric sorting, caller must call setIsAlphaNumeric()See
PFCTablefor details.- Parameters:
columnClass- column class used to determine appropriate data type.
-