Pip-Services-Commons-Dotnet
Public Member Functions | Static Public Member Functions | List of all members
PipServices3.Commons.Data.FilterParams Class Reference

Data transfer object used to pass filter parameters as simple key-value pairs. More...

Inheritance diagram for PipServices3.Commons.Data.FilterParams:
PipServices3.Commons.Data.StringValueMap

Public Member Functions

 FilterParams ()
 Creates a new instance and initalizes it. More...
 
 FilterParams (IDictionary< string, string > map)
 Creates a new instance and initalizes it with elements from the specified map. More...
 
 FilterParams (AnyValueMap map)
 Creates a new instance and initalizes it with elements from the specified map. More...
 
override string ToString ()
 
override bool Equals (object obj)
 
override int GetHashCode ()
 
- Public Member Functions inherited from PipServices3.Commons.Data.StringValueMap
 StringValueMap ()
 Creates a new instance of the map and assigns its value. More...
 
 StringValueMap (IDictionary< string, string > map)
 Creates a new instance of the map and assigns its value. More...
 
 StringValueMap (object value)
 Creates a new instance of the map and assigns its value. More...
 
virtual string Get (string key)
 Gets a map element specified by its key. More...
 
virtual void Set (string key, string value)
 Sets a new value for this array element by its key More...
 
void Append (IDictionary< string, object > map)
 Appends new elements to this map. More...
 
void Append (IDictionary< string, string > map)
 Appends new elements to this map. More...
 
object GetAsObject ()
 Gets the value stored in this map element without any conversions More...
 
void SetAsObject (object value)
 Sets a new value for this array element More...
 
void SetAsObject (string key, object value)
 Sets a new value to map element specified by its index. When the index is not defined, it resets the entire map value.This method has double purpose because method overrides are not supported in JavaScript. More...
 
object GetAsObject (string key)
 Gets the value stored in map element without any conversions. When element key is not defined it returns the entire map value. More...
 
string GetAsNullableString (string key)
 Converts map element into a string or returns null if conversion is not possible. More...
 
string GetAsString (string key)
 Converts map element into a string or returns "" if conversion is not possible. More...
 
string GetAsStringWithDefault (string key, string defaultValue)
 Converts map element into a string or returns default value if conversion is not possible. More...
 
bool GetAsNullableBoolean (string key)
 Converts map element into a boolean or returns null if conversion is not possible. More...
 
bool GetAsBoolean (string key)
 Converts map element into a boolean or returns false if conversion is not possible. More...
 
bool GetAsBooleanWithDefault (string key, bool defaultValue)
 Converts map element into a boolean or returns default value if conversion is not possible. More...
 
int GetAsNullableInteger (string key)
 Converts map element into an integer or returns null if conversion is not possible. More...
 
int GetAsInteger (string key)
 Converts map element into an integer or returns 0 if conversion is not possible. More...
 
int GetAsIntegerWithDefault (string key, int defaultValue)
 Converts map element into an integer or returns default value if conversion is not possible. More...
 
long GetAsNullableLong (string key)
 Converts map element into a long or returns null if conversion is not possible. More...
 
long GetAsLong (string key)
 Converts map element into a long or returns 0 if conversion is not possible. More...
 
long GetAsLongWithDefault (string key, long defaultValue)
 Converts map element into a long or returns default value if conversion is not possible. More...
 
float GetAsNullableFloat (string key)
 Converts map element into a float or returns null if conversion is not possible. More...
 
float GetAsFloat (string key)
 Converts map element into a float or returns 0 if conversion is not possible. More...
 
float GetAsFloatWithDefault (string key, float defaultValue)
 Converts map element into a float or returns default value if conversion is not possible. More...
 
double GetAsNullableDouble (string key)
 Converts map element into a double or returns null if conversion is not possible. More...
 
double GetAsDouble (string key)
 Converts map element into a double or returns 0 if conversion is not possible. More...
 
double GetAsDoubleWithDefault (string key, double defaultValue)
 Converts map element into a double or returns default value if conversion is not possible. More...
 
DateTime GetAsNullableDateTime (string key)
 Converts map element into a Date or returns null if conversion is not possible. More...
 
DateTime GetAsDateTime (string key)
 Converts map element into a Date or returns current date if conversion is not possible. More...
 
DateTime GetAsDateTimeWithDefault (string key, DateTime? defaultValue)
 Converts map element into a Date or returns default value if conversion is not possible. More...
 
TimeSpan GetAsNullableTimeSpan (string key)
 
TimeSpan GetAsTimeSpan (string key)
 
TimeSpan GetAsTimeSpanWithDefault (string key, TimeSpan? defaultValue)
 
GetAsNullableEnum< T > (string key)
 
GetAsEnum< T > (string key)
 
GetAsEnumWithDefault< T > (string key, T defaultValue)
 
GetAsNullableType< T > (string key)
 Converts map element into a value defined by specied typecode. If conversion is not possible it returns null. More...
 
GetAsType< T > (string key)
 Converts map element into a value defined by specied typecode. If conversion is not possible it returns default value for the specied typecode. More...
 
GetAsTypeWithDefault< T > (string key, T defaultValue)
 Converts map element into a value defined by specied typecode. If conversion is not possible it returns default value. More...
 
AnyValue GetAsValue (string key)
 Converts map element into an AnyValue or returns an empty AnyValue if conversion is not possible. More...
 
AnyValueArray GetAsNullableArray (string key)
 Converts map element into an AnyValueArray or returns null if conversion is not possible. More...
 
AnyValueArray GetAsArray (string key)
 Converts map element into an AnyValueArray or returns empty AnyValueArray if conversion is not possible. More...
 
AnyValueArray GetAsArrayWithDefault (string key, AnyValueArray defaultValue)
 Converts map element into an AnyValueArray or returns default value if conversion is not possible. More...
 
AnyValueMap GetAsNullableMap (string key)
 Converts map element into an AnyValueMap or returns null if conversion is not possible. More...
 
AnyValueMap GetAsMap (string key)
 Converts map element into an AnyValueMap or returns empty AnyValueMap if conversion is not possible. More...
 
AnyValueMap GetAsMapWithDefault (string key, AnyValueMap defaultValue)
 Converts map element into an AnyValueMap or returns default value if conversion is not possible. More...
 
override string ToString ()
 Gets a string representation of the object. The result is a semicolon-separated list of key-value pairs as "key1=value1;key2=value2;key=value3" More...
 
object Clone ()
 Creates a binary clone of this object. More...
 

Static Public Member Functions

static new FilterParams FromTuples (params object[] values)
 Creates a new FilterParams from a list of key-value pairs called tuples. More...
 
static new FilterParams FromString (string line)
 Parses semicolon-separated key-value pairs and returns them as a FilterParams. More...
 
static new FilterParams FromValue (object value)
 Converts specified value into FilterParams. More...
 
- Static Public Member Functions inherited from PipServices3.Commons.Data.StringValueMap
static StringValueMap FromValue (object value)
 Converts specified value into StringValueMap. More...
 
static StringValueMap FromTuples (params object[] tuples)
 Creates a new StringValueMap from a list of key-value pairs called tuples. More...
 
static StringValueMap FromString (string line)
 arses semicolon-separated key-value pairs and returns them as a StringValueMap. More...
 
static StringValueMap FromMaps (params IDictionary< string, string >[] maps)
 Creates a new StringValueMap by merging two or more maps. Maps defined later in the list override values from previously defined maps. More...
 

Additional Inherited Members

- Properties inherited from PipServices3.Commons.Data.StringValueMap
new string this[string key] [get, set]
 

Detailed Description

Data transfer object used to pass filter parameters as simple key-value pairs.

var filter = FilterParams.fromTuples(
"type", "Type1",
"from_create_time", new Date(2000, 0, 1),
"to_create_time", new Date(),
"completed", true );
var paging = new PagingParams(0, 100);
myDataClient.GetDataByFilter(filter, paging);

See StringValueMap

Constructor & Destructor Documentation

◆ FilterParams() [1/3]

PipServices3.Commons.Data.FilterParams.FilterParams ( )

Creates a new instance and initalizes it.

◆ FilterParams() [2/3]

PipServices3.Commons.Data.FilterParams.FilterParams ( IDictionary< string, string >  map)

Creates a new instance and initalizes it with elements from the specified map.

Parameters
mapa map to initialize this instance.

◆ FilterParams() [3/3]

PipServices3.Commons.Data.FilterParams.FilterParams ( AnyValueMap  map)

Creates a new instance and initalizes it with elements from the specified map.

Parameters
mapa map to initialize this instance.

Member Function Documentation

◆ FromString()

static new FilterParams PipServices3.Commons.Data.FilterParams.FromString ( string  line)
static

Parses semicolon-separated key-value pairs and returns them as a FilterParams.

Parameters
linesemicolon-separated key-value list to initialize FilterParams.
Returns
a newly created FilterParams.

◆ FromTuples()

static new FilterParams PipServices3.Commons.Data.FilterParams.FromTuples ( params object []  values)
static

Creates a new FilterParams from a list of key-value pairs called tuples.

Parameters
valuesa list of values where odd elements are keys and the following even elements are values
Returns
a newly created FilterParams.

◆ FromValue()

static new FilterParams PipServices3.Commons.Data.FilterParams.FromValue ( object  value)
static

Converts specified value into FilterParams.

Parameters
valuevalue to be converted
Returns
a newly created FilterParams.

The documentation for this class was generated from the following file: