public abstract class FilterModel<M,R> extends Object
| Modifier and Type | Field and Description |
|---|---|
protected boolean |
exclusiveMode
flag to says inclusive mode (need one param accept)
or exclusive mode (need all params to accept)
|
protected List<M> |
original
list of original items
|
protected List<String> |
paramKeys
list of param keys to be used
|
protected Map<String,FilterParamModel<M,?>> |
paramModels
map -> paramKey to param models
|
protected List<M> |
result
current filter result list of items
|
| Modifier | Constructor and Description |
|---|---|
protected |
FilterModel(List<M> original,
Map<String,FilterParamModel<M,?>> paramModels) |
| Modifier and Type | Method and Description |
|---|---|
abstract R |
convertToResult(M item) |
List<M> |
doFilter() |
List<M> |
getFiltered() |
List<R> |
getFilteredResult() |
int |
getNbOriginal() |
int |
getNbResult() |
List<M> |
getOriginal() |
FilterParamModel<M,?> |
getParamModel(String paramKey) |
void |
reset() |
void |
selectAll() |
void |
setFiltered(List<M> filtered) |
String |
toString() |
protected Map<String,FilterParamModel<M,?>> paramModels
protected boolean exclusiveMode
public abstract R convertToResult(M item)
item - item to convert to resultpublic FilterParamModel<M,?> getParamModel(String paramKey)
public void reset()
public void selectAll()
public int getNbResult()
public int getNbOriginal()
Copyright © 1999–2013 CodeLutin. All rights reserved.