public class RequiredSolrParams extends SolrParams
RequiredSolrParams
will return a valid non-null value or throw a 400 exception.
(If you pass in null as the default value, you can
get a null return value)MapWriter.EntryWriter| Modifier and Type | Field and Description |
|---|---|
protected SolrParams |
params |
| Constructor and Description |
|---|
RequiredSolrParams(SolrParams params) |
| Modifier and Type | Method and Description |
|---|---|
void |
check(String... params) |
String |
get(String param)
get the param from params, fail if not found
|
String |
get(String param,
String def)
returns the value of the param, or def if not set
|
boolean |
getBool(String param,
boolean def)
Returns the boolean value of the param, or def if not set
|
boolean |
getFieldBool(String field,
String param,
boolean def)
Returns the boolean value of the field param,
or the value for param, or def if neither is set.
|
float |
getFieldFloat(String field,
String param,
float def)
Returns the float value of the field param,
or the value for param, or def if neither is set.
|
int |
getFieldInt(String field,
String param,
int def)
Returns the int value of the field param,
or the value for param, or def if neither is set.
|
String |
getFieldParam(String field,
String param)
returns the String value of the field parameter, "f.field.param", or
the value for "param" if that is not set.
|
String |
getFieldParam(String field,
String param,
String def)
returns the String value of the field parameter, "f.field.param", or
the value for "param" if that is not set.
|
String[] |
getFieldParams(String field,
String param)
returns the String values of the field parameter, "f.field.param", or
the values for "param" if that is not set.
|
float |
getFloat(String param,
float def)
Returns the float value of the param, or def if not set
|
int |
getInt(String param,
int def)
Returns the int value of the param, or def if not set
|
Iterator<String> |
getParameterNamesIterator()
returns an Iterator over the parameter names
|
String[] |
getParams(String param)
returns an array of the String values of a param, or null if no mapping for the param exists.
|
String |
toString()
Like
SolrParams.toQueryString(), but only replacing enough chars so that
the URL may be unambiguously pasted back into a browser. |
fpname, getAll, getAll, getBool, getDouble, getDouble, getFieldBool, getFieldDouble, getFieldDouble, getFieldFloat, getFieldInt, getFloat, getInt, getLong, getLong, getPrimitiveBool, getPrimitiveFieldBool, getPrimitiveFieldFloat, getPrimitiveInt, iterator, required, stream, toFilteredSolrParams, toLocalParamsString, toMap, toMultiMap, toNamedList, toQueryString, toSolrParams, wrapAppended, wrapDefaults, writeMapclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait_forEachEntry, _forEachEntry, _forEachEntry, _get, _get, _getStr, _getStr, _sizeforEach, spliteratorprotected final SolrParams params
public RequiredSolrParams(SolrParams params)
public String get(String param)
get in class SolrParamspublic String getFieldParam(String field, String param)
SolrParamsgetFieldParam in class SolrParamspublic String[] getFieldParams(String field, String param)
SolrParamsgetFieldParams in class SolrParamspublic String[] getParams(String param)
SolrParamsgetParams in class SolrParamspublic Iterator<String> getParameterNamesIterator()
getParameterNamesIterator in class SolrParamspublic String toString()
SolrParamsSolrParams.toQueryString(), but only replacing enough chars so that
the URL may be unambiguously pasted back into a browser.
This method can be used to properly log query parameters without
making them unreadable.
Characters with a numeric value less than 32 are encoded. &,=,%,+,space are encoded.
toString in class SolrParamspublic String get(String param, String def)
SolrParamsget in class SolrParamspublic int getInt(String param, int def)
SolrParamsgetInt in class SolrParamspublic float getFloat(String param, float def)
SolrParamsgetFloat in class SolrParamspublic boolean getBool(String param, boolean def)
SolrParamsgetBool in class SolrParamspublic int getFieldInt(String field, String param, int def)
SolrParamsgetFieldInt in class SolrParamspublic boolean getFieldBool(String field, String param, boolean def)
SolrParamsgetFieldBool in class SolrParamspublic float getFieldFloat(String field, String param, float def)
SolrParamsgetFieldFloat in class SolrParamspublic String getFieldParam(String field, String param, String def)
SolrParamsgetFieldParam in class SolrParamspublic void check(String... params)
Copyright © 2000-2020 Apache Software Foundation. All Rights Reserved.