EvalConfig can be used to alter how this utility formats values. Note, formatted values
may be suitable for display only (i.e. a formatted value may not be accepted as an input value to a Table
add/update method).
| Modifier and Type | Class and Description |
|---|---|
| private class | ColumnFormatter.
Utility class to provide an EvalContext for the expression evaluation engine format support. |
| Modifier and Type | Field and Description |
|---|---|
| private final ColumnImpl | |
| private final ColumnFormatter. | |
| private FormatUtil. | |
| private String |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public String | Returns: the formatted result, always non-nulla valid input value for the DataType of the underlying Column (i.e. a value which could be passed to a
Table add/update method for this Column). may be val)nullFormats the given value according to the format currently defined for the underlying Column. |
| public String | |
| public String | Returns: the formatted result, always non-nullConvenience method for retrieving the appropriate Column value from the given row array and formatting it. |
| public String | Returns: the formatted result, always non-nullConvenience method for retrieving the appropriate Column value from the given row map and formatting it. |
| public final void | reload()
If the properties for the underlying Column have been modified directly (or the EvalConfig for the underlying Database has been modified), this method may be called to reload the format for the underlying Column. |
| public void | setFormatString(String
the new format string. may be newFmtStr)null, in which case the "Format" property is removed from the
underlying ColumnSets the given format string as the "Format" property for the underlying Column and reloads this formatter. |
| col | back to summary |
|---|---|
| private final ColumnImpl col | |
| ctx | back to summary |
|---|---|
| private final ColumnFormatter. | |
| fmt | back to summary |
|---|---|
| private FormatUtil. | |
| fmtStr | back to summary |
|---|---|
| private String fmtStr | |
| ColumnFormatter | back to summary |
|---|---|
| public ColumnFormatter(Column col) throws IOException | |
| format | back to summary |
|---|---|
| public String format(Object val) Formats the given value according to the format currently defined for the underlying Column. | |
| getFormatString | back to summary |
|---|---|
| public String getFormatString() Returns the currently loaded "Format" property for this formatter, may be | |
| getRowValue | back to summary |
|---|---|
| public String getRowValue(Object[] rowArray) Convenience method for retrieving the appropriate Column value from the given row array and formatting it.
| |
| getRowValue | back to summary |
|---|---|
| public String getRowValue(Map<String, ?> rowMap) Convenience method for retrieving the appropriate Column value from the given row map and formatting it.
| |
| reload | back to summary |
|---|---|
| public final void reload() throws IOException If the properties for the underlying Column have been modified directly (or the EvalConfig for the underlying Database has been modified), this method may be called to reload the format for the underlying Column. | |
| setFormatString | back to summary |
|---|---|
| public void setFormatString(String newFmtStr) throws IOException Sets the given format string as the "Format" property for the underlying Column and reloads this formatter.
| |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public String |
| FormatEvalContext | back to summary |
|---|---|
| private FormatEvalContext(ColumnImpl col) | |
| format | back to summary |
|---|---|
| public String format(Object val) | |