public class FilterAndSortCriteria extends Object
| Modifier and Type | Field and Description |
|---|---|
protected List<String> |
filterValues |
static String |
IS_NOT_NULL_FILTER_VALUE |
static String |
IS_NULL_FILTER_VALUE |
static String |
MAX_INDEX_PARAMETER |
protected boolean |
nullsLast |
protected Integer |
order
for "order", a null value is relevant, meaning that this field moves to the end of any sort order consideration
(this is the opposite of what we would achieve, by having an uninitialized int variable set to 0)
|
protected String |
propertyId |
protected RestrictionType |
restrictionType |
static String |
SORT_DIRECTION_PARAMETER |
static String |
SORT_PROPERTY_PARAMETER |
protected SortDirection |
sortDirection |
static String |
START_INDEX_PARAMETER |
| Constructor and Description |
|---|
FilterAndSortCriteria(String propertyId) |
FilterAndSortCriteria(String propertyId,
int order) |
FilterAndSortCriteria(String propertyId,
List<String> filterValues) |
FilterAndSortCriteria(String propertyId,
List<String> filterValues,
int order) |
FilterAndSortCriteria(String propertyId,
List<String> filterValues,
SortDirection sortDirection) |
FilterAndSortCriteria(String propertyId,
List<String> filterValues,
SortDirection sortDirection,
int order) |
FilterAndSortCriteria(String propertyId,
String filterValue) |
FilterAndSortCriteria(String propertyId,
String[] filterValues) |
FilterAndSortCriteria(String propertyId,
String[] filterValues,
int order) |
FilterAndSortCriteria(String propertyId,
String filterValue,
int order) |
| Modifier and Type | Method and Description |
|---|---|
void |
addFilterValue(String value) |
void |
clearFilterValues() |
List<String> |
getFilterValues() |
Integer |
getOrder() |
protected TypedPredicate<String> |
getPredicateForSpecialValues(boolean inclusive) |
String |
getPropertyId() |
RestrictionType |
getRestrictionType() |
Boolean |
getSortAscending() |
SortDirection |
getSortDirection() |
List<String> |
getSpecialFilterValues() |
boolean |
hasSpecialFilterValue() |
boolean |
isNullsLast() |
void |
setFilterValue(String value) |
void |
setFilterValues(List<String> filterValues) |
void |
setNullsLast(boolean nullsLast) |
void |
setOrder(Integer order) |
void |
setPropertyId(String propertyId) |
void |
setRestrictionType(RestrictionType restrictionType)
Useful when you want to explicitly define the type of pre-built
Restriction
instance to be used. |
void |
setSortAscending(Boolean sortAscending) |
void |
setSortDirection(SortDirection sortDirection) |
public static final String SORT_PROPERTY_PARAMETER
public static final String SORT_DIRECTION_PARAMETER
public static final String START_INDEX_PARAMETER
public static final String MAX_INDEX_PARAMETER
public static final String IS_NULL_FILTER_VALUE
public static final String IS_NOT_NULL_FILTER_VALUE
protected String propertyId
protected RestrictionType restrictionType
protected Integer order
protected SortDirection sortDirection
protected boolean nullsLast
public FilterAndSortCriteria(String propertyId, int order)
public FilterAndSortCriteria(String propertyId)
public FilterAndSortCriteria(String propertyId, String filterValue, int order)
public FilterAndSortCriteria(String propertyId, List<String> filterValues, int order)
public FilterAndSortCriteria(String propertyId, List<String> filterValues, SortDirection sortDirection, int order)
public FilterAndSortCriteria(String propertyId, List<String> filterValues, SortDirection sortDirection)
public FilterAndSortCriteria(String propertyId, String[] filterValues, int order)
public String getPropertyId()
public void setPropertyId(String propertyId)
public void clearFilterValues()
public void setFilterValue(String value)
public void addFilterValue(String value)
public Boolean getSortAscending()
public void setSortAscending(Boolean sortAscending)
public SortDirection getSortDirection()
public void setSortDirection(SortDirection sortDirection)
public boolean hasSpecialFilterValue()
public RestrictionType getRestrictionType()
public void setRestrictionType(RestrictionType restrictionType)
Restriction
instance to be used. The available, pre-built restrictions are defined in the Spring configured map "blRestrictionFactoryMap".restrictionType - protected TypedPredicate<String> getPredicateForSpecialValues(boolean inclusive)
public Integer getOrder()
public void setOrder(Integer order)
public boolean isNullsLast()
public void setNullsLast(boolean nullsLast)
Copyright © 2017. All rights reserved.