Package org.pipservices3.commons.data
Class FilterParams
java.lang.Object
java.util.AbstractMap<K,V>
java.util.HashMap<String,String>
org.pipservices3.commons.data.StringValueMap
org.pipservices3.commons.data.FilterParams
- All Implemented Interfaces:
Serializable
,Cloneable
,Map<String,
String>
Data transfer object used to pass filter parameters as simple key-value pairs.
### Example ###
FilterParams filter = FilterParams.fromTuples(
"type", "Type1",
"from_create_time", new Date(2000, 0, 1),
"to_create_time", new Date(),
"completed", true
);
PagingParams paging = new PagingParams(0, 100);
myDataClient.getDataByFilter(filter, paging);
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class java.util.AbstractMap
AbstractMap.SimpleEntry<K extends Object,
V extends Object>, AbstractMap.SimpleImmutableEntry<K extends Object, V extends Object> -
Constructor Summary
ConstructorsConstructorDescriptionFilterParams
(Map<?, ?> map) Creates a new instance and initalizes it with elements from the specified map. -
Method Summary
Modifier and TypeMethodDescriptionstatic FilterParams
fromString
(String line) Parses semicolon-separated key-value pairs and returns them as a FilterParams.static FilterParams
fromTuples
(Object... tuples) Creates a new FilterParams from a list of key-value pairs called tuples.static FilterParams
Converts specified value into FilterParams.Methods inherited from class org.pipservices3.commons.data.StringValueMap
append, clone, fromMaps, fromTuplesArray, get, getAsArray, getAsArrayWithDefault, getAsBoolean, getAsBooleanWithDefault, getAsDateTime, getAsDateTimeWithDefault, getAsDouble, getAsDoubleWithDefault, getAsDuration, getAsDurationWithDefault, getAsEnum, getAsEnumWithDefault, getAsFloat, getAsFloatWithDefault, getAsInteger, getAsIntegerWithDefault, getAsLong, getAsLongWithDefault, getAsMap, getAsMapWithDefault, getAsNullableArray, getAsNullableBoolean, getAsNullableDateTime, getAsNullableDouble, getAsNullableDuration, getAsNullableEnum, getAsNullableFloat, getAsNullableInteger, getAsNullableLong, getAsNullableMap, getAsNullableString, getAsNullableType, getAsObject, getAsObject, getAsString, getAsStringWithDefault, getAsType, getAsTypeWithDefault, getAsValue, getKeys, length, put, setAsObject, setAsObject, toString
Methods inherited from class java.util.HashMap
clear, compute, computeIfAbsent, computeIfPresent, containsKey, containsValue, entrySet, forEach, get, getOrDefault, isEmpty, keySet, merge, put, putAll, putIfAbsent, remove, remove, replace, replace, replaceAll, size, values
Methods inherited from class java.util.AbstractMap
equals, hashCode
-
Constructor Details
-
FilterParams
public FilterParams() -
FilterParams
Creates a new instance and initalizes it with elements from the specified map.- Parameters:
map
- a map to initialize this instance.
-
-
Method Details
-
fromTuples
Creates a new FilterParams from a list of key-value pairs called tuples.- Parameters:
tuples
- a list of values where odd elements are keys and the following even elements are values- Returns:
- a newly created FilterParams.
-
fromString
Parses semicolon-separated key-value pairs and returns them as a FilterParams.- Parameters:
line
- semicolon-separated key-value list to initialize FilterParams.- Returns:
- a newly created FilterParams.
- See Also:
-
fromValue
Converts specified value into FilterParams.- Parameters:
value
- value to be converted- Returns:
- a newly created FilterParams.
-