T
- Type of the Beans in the backing data source.public class SortStatePersistor<T> extends Object implements IPersistable
ISortModel
.Modifier and Type | Class and Description |
---|---|
protected class |
SortStatePersistor.SortState
Encapsulation of the sort state of a column
|
Modifier and Type | Field and Description |
---|---|
static String |
PERSISTENCE_KEY_SORTING_STATE |
DOT, VALUE_SEPARATOR
Constructor and Description |
---|
SortStatePersistor(ISortModel sortModel) |
Modifier and Type | Method and Description |
---|---|
protected SortStatePersistor.SortState |
getSortStateFromString(String token)
Parse the string representation to extract the
column index, sort direction and sort order
|
void |
loadState(String prefix,
Properties properties)
Parses the saved string and restores the state to the
ISortModel . |
void |
saveState(String prefix,
Properties properties)
Save the sorting state in the properties file.
|
public static final String PERSISTENCE_KEY_SORTING_STATE
public SortStatePersistor(ISortModel sortModel)
public void saveState(String prefix, Properties properties)
Key:
PERSISTENCE_KEY_SORTING_STATE
Format: column index : sort direction : sort order |
saveState
in interface IPersistable
prefix
- The prefix to use for the state keys. Is also used as the state
configuration name.properties
- The Properties instance to save the state to.public void loadState(String prefix, Properties properties)
ISortModel
.loadState
in interface IPersistable
prefix
- The prefix to use for the state keys. Is also used as the state
configuration name.properties
- The Properties instance to load the state from.protected SortStatePersistor.SortState getSortStateFromString(String token)
Copyright © 2013. All Rights Reserved.