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)| 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 none
|
String |
toString() |
fpname, getAll, getBool, getDouble, getDouble, getFieldBool, getFieldDouble, getFieldDouble, getFieldFloat, getFieldInt, getFloat, getInt, getLong, getLong, getLong, required, toFilteredSolrParams, toMap, toMultiMap, toNamedList, toSolrParams, wrapAppended, wrapDefaultsprotected 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 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-2015 Apache Software Foundation. All Rights Reserved.