Package org.apache.empire.data.list
Class DataListHead
java.lang.Object
org.apache.empire.data.list.DataListHead
- All Implemented Interfaces:
Serializable
- See Also:
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionDataListHead(ColumnExpr[] columns) Constructs a DataListHead based on an DataListEntry constructor -
Method Summary
Modifier and TypeMethodDescriptionprotected StringformatValue(ColumnExpr column, Object value) Convert a non-string value to a string Overwrite this function in order to provide a localeintgetColumnIndex(String columnName) intgetColumnIndex(ColumnExpr column) <T extends DBDatabase>
TgetDatabase(Class<T> dbClass) Returns the database instance associated with this DataList (if any) The database is extracted from the column listfinal StringReturns the value of a column as a formatted text This converts the value to a string if necessary and performs an options lookup To customize conversion please override convertToString()
-
Field Details
-
columns
-
columnSeparator
-
-
Constructor Details
-
DataListHead
Constructs a DataListHead based on an DataListEntry constructor- Parameters:
columns- the list entry columns
-
-
Method Details
-
getColumns
-
getColumnIndex
-
getColumnIndex
-
getDatabase
Returns the database instance associated with this DataList (if any) The database is extracted from the column list- Type Parameters:
T- the type of the database- Parameters:
dbClass- the desired subclass of DBDatabase- Returns:
- the database instance or null if no Database instance of this type could be found
-
getText
Returns the value of a column as a formatted text This converts the value to a string if necessary and performs an options lookup To customize conversion please override convertToString()- Parameters:
index- the field index for which to get the formatted valuevalue- the value to format- Returns:
- the formatted value
-
formatValue
Convert a non-string value to a string Overwrite this function in order to provide a locale- Parameters:
column- the column expressionvalue- the value to format- Returns:
- the formatted string
-