|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.solr.common.params.SolrParams org.apache.solr.common.params.RequiredSolrParams
public class RequiredSolrParams
This is a simple wrapper to SolrParams that will throw a 400
exception if you ask for a parameter that does not exist. Fields
specified with
In short, any value you for from a 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)
Field Summary | |
---|---|
protected SolrParams |
params
|
Constructor Summary | |
---|---|
RequiredSolrParams(SolrParams params)
|
Method Summary | |
---|---|
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()
|
Methods inherited from class org.apache.solr.common.params.SolrParams |
---|
fpname, getBool, getDouble, getDouble, getFieldBool, getFieldDouble, getFieldDouble, getFieldFloat, getFieldInt, getFloat, getInt, required, toFilteredSolrParams, toMap, toMultiMap, toNamedList, toSolrParams, wrapAppended, wrapDefaults |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected final SolrParams params
Constructor Detail |
---|
public RequiredSolrParams(SolrParams params)
Method Detail |
---|
public String get(String param)
get
in class SolrParams
public String getFieldParam(String field, String param)
SolrParams
getFieldParam
in class SolrParams
public String[] getFieldParams(String field, String param)
SolrParams
getFieldParams
in class SolrParams
public String[] getParams(String param)
SolrParams
getParams
in class SolrParams
public Iterator<String> getParameterNamesIterator()
getParameterNamesIterator
in class SolrParams
public String toString()
toString
in class Object
public String get(String param, String def)
SolrParams
get
in class SolrParams
public int getInt(String param, int def)
SolrParams
getInt
in class SolrParams
public float getFloat(String param, float def)
SolrParams
getFloat
in class SolrParams
public boolean getBool(String param, boolean def)
SolrParams
getBool
in class SolrParams
public int getFieldInt(String field, String param, int def)
SolrParams
getFieldInt
in class SolrParams
public boolean getFieldBool(String field, String param, boolean def)
SolrParams
getFieldBool
in class SolrParams
public float getFieldFloat(String field, String param, float def)
SolrParams
getFieldFloat
in class SolrParams
public String getFieldParam(String field, String param, String def)
SolrParams
getFieldParam
in class SolrParams
public void check(String... params)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |