Class FilterParams

All Implemented Interfaces:
Serializable, Cloneable, Map<String,String>

public class FilterParams extends StringValueMap
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:
  • Constructor Details

    • FilterParams

      public FilterParams()
    • FilterParams

      public FilterParams(Map<?,?> map)
      Creates a new instance and initalizes it with elements from the specified map.
      Parameters:
      map - a map to initialize this instance.
  • Method Details

    • fromTuples

      public static FilterParams fromTuples(Object... tuples)
      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

      public static FilterParams fromString(String line)
      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

      public static FilterParams fromValue(Object value)
      Converts specified value into FilterParams.
      Parameters:
      value - value to be converted
      Returns:
      a newly created FilterParams.