Class QueryParams
- java.lang.Object
-
- com.linkedin.venice.controllerapi.QueryParams
-
- Direct Known Subclasses:
UpdateClusterConfigQueryParams
,UpdateStoragePersonaQueryParams
,UpdateStoreQueryParams
public class QueryParams extends java.lang.Object
A simple container with builder functions to sugar-coat the code a bit.
-
-
Field Summary
Fields Modifier and Type Field Description protected java.util.Map<java.lang.String,java.lang.String>
params
-
Constructor Summary
Constructors Constructor Description QueryParams()
QueryParams(java.util.Map<java.lang.String,java.lang.String> initialParams)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description QueryParams
add(java.lang.String name, java.lang.Boolean value)
QueryParams
add(java.lang.String name, java.lang.Integer value)
QueryParams
add(java.lang.String name, java.lang.Long value)
QueryParams
add(java.lang.String name, java.lang.String value)
<TYPE> QueryParams
add(java.lang.String name, java.util.Optional<TYPE> optionalValue)
java.util.List<org.apache.http.NameValuePair>
getAbbreviatedNameValuePairs()
java.util.Optional<java.lang.Long>
getLong(java.lang.String name)
java.util.List<org.apache.http.NameValuePair>
getNameValuePairs()
java.util.Optional<java.lang.String>
getString(java.lang.String name)
java.util.Optional<java.util.Map<java.lang.String,java.lang.String>>
getStringMap(java.lang.String name)
java.util.Optional<java.util.Set<java.lang.String>>
getStringSet(java.lang.String name)
QueryParams
putStringMap(java.lang.String name, java.util.Map<java.lang.String,java.lang.String> value)
QueryParams
putStringSet(java.lang.String name, java.util.Set<java.lang.String> value)
java.lang.String
toString()
-
-
-
Method Detail
-
add
public QueryParams add(java.lang.String name, java.lang.Integer value)
-
add
public QueryParams add(java.lang.String name, java.lang.Long value)
-
add
public QueryParams add(java.lang.String name, java.lang.Boolean value)
-
add
public QueryParams add(java.lang.String name, java.lang.String value)
-
add
public <TYPE> QueryParams add(java.lang.String name, java.util.Optional<TYPE> optionalValue)
-
getNameValuePairs
public java.util.List<org.apache.http.NameValuePair> getNameValuePairs()
-
getAbbreviatedNameValuePairs
public java.util.List<org.apache.http.NameValuePair> getAbbreviatedNameValuePairs()
-
putStringMap
public QueryParams putStringMap(java.lang.String name, java.util.Map<java.lang.String,java.lang.String> value)
-
putStringSet
public QueryParams putStringSet(java.lang.String name, java.util.Set<java.lang.String> value)
-
getStringSet
public java.util.Optional<java.util.Set<java.lang.String>> getStringSet(java.lang.String name)
-
getStringMap
public java.util.Optional<java.util.Map<java.lang.String,java.lang.String>> getStringMap(java.lang.String name)
-
getString
public java.util.Optional<java.lang.String> getString(java.lang.String name)
-
getLong
public java.util.Optional<java.lang.Long> getLong(java.lang.String name)
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-