Package io.vertigo.datamodel.data.model
Class DtListState
java.lang.Object
io.vertigo.datamodel.data.model.DtListState
DtList state : sorting and paging informations
- Author:
- npiedeloup
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intDefault max rows, when the param DT_LIST_DEFAULT_MAX_ROWS is not set : use getDefaultMaxRows() to get the applied value. -
Method Summary
Modifier and TypeMethodDescriptionstatic DtListStatestatic intDefault max rows of the lists : the param DT_LIST_DEFAULT_MAX_ROWS (from the ParamManager), DEFAULT_MAX_ROWS if not set.intstatic DtListStatestatic DtListStatewithDefault(Integer defaultMaxRows, DataFieldName defaultSortFieldName, Boolean defaultSortDesc) Added default properties to another DtListState.
-
Field Details
-
DEFAULT_MAX_ROWS
public static final int DEFAULT_MAX_ROWSDefault max rows, when the param DT_LIST_DEFAULT_MAX_ROWS is not set : use getDefaultMaxRows() to get the applied value.- See Also:
-
-
Method Details
-
defaultOf
- Parameters:
entityClass- entity class : gives the default sort field and direction- Returns:
- the default state of the entity lists : default max rows (see getDefaultMaxRows), default sort
-
getDefaultMaxRows
public static int getDefaultMaxRows()Default max rows of the lists : the param DT_LIST_DEFAULT_MAX_ROWS (from the ParamManager), DEFAULT_MAX_ROWS if not set. The param is read once.- Returns:
- the default max rows
-
of
- Parameters:
maxRows- max returning elements (null if not use) skipRows elements to skip (mandatory, 0 by default)
-
of
- Parameters:
maxRows- max returning elements (null if not use)skipRows- elements to skip (mandatory, 0 by default)sortFieldName- sort fieldName (null if not use)sortDesc- desc or asc order (null if not use)
-
withDefault
public DtListState withDefault(Integer defaultMaxRows, DataFieldName defaultSortFieldName, Boolean defaultSortDesc) Added default properties to another DtListState.- Parameters:
maxRows- max returning elements (null if not use)sortFieldName- sort fieldName (null if not use)sortDesc- desc or asc order (null if not use)
-
withLimit
-
getMaxRows
- Returns:
- max returning elements
-
getSkipRows
public int getSkipRows()- Returns:
- elements to skip
-
getSortFieldName
- Returns:
- sort fieldName
-
isSortDesc
- Returns:
- desc or asc order
-