public class BasicQueryArgs extends Object implements QueryArgs
Constructor and Description |
---|
BasicQueryArgs(Catalog catalog)
Create a BasicQueryArgs object for the given catalog, with no parameter
values (or only default values) set.
|
Modifier and Type | Method and Description |
---|---|
Catalog |
getCatalog()
Return the catalog we are accesing.
|
SearchCondition[] |
getConditions()
Return an array of SearchCondition objects indicating the
values or range of values to search for.
|
String |
getId()
Return the object id being searched for, or null if none was defined.
|
int |
getMaxRows()
Returns the max number of rows to be returned from a table query
|
Object |
getParamValue(int i)
Get the value of the ith parameter
|
Object |
getParamValue(String label)
Get the value of the named parameter
|
double |
getParamValueAsDouble(String label,
double defaultValue)
Get the value of the named parameter as a double.
|
int |
getParamValueAsInt(String label,
int defaultValue)
Get the value of the named parameter as an integer.
|
String |
getParamValueAsString(String label,
String defaultValue)
Get the value of the named parameter as a String.
|
String |
getQueryType()
Returns the query type (an optional string, which may be interpreted by some catalogs)
|
CoordinateRadius |
getRegion()
Return an object describing the query region (center position and
radius range), or null if none was defined.
|
void |
setId(String id)
Set the object id to search for.
|
void |
setMaxRows(int maxRows)
Set the max number of rows to be returned from a table query
|
void |
setParamValue(int i,
Object value)
Set the value for the ith parameter
|
void |
setParamValue(String label,
double value)
Set the double value for the parameter with the given label
|
void |
setParamValue(String label,
int value)
Set the int value for the parameter with the given label
|
void |
setParamValue(String label,
Object value)
Set the value for the parameter with the given label
|
void |
setParamValues(Object[] values)
Set the array of parameter values directly.
|
void |
setQueryType(String queryType)
Set the query type (an optional string, which may be interpreted by some catalogs)
|
void |
setRegion(CoordinateRadius region)
Set the query region (center position and radius range) for
the search.
|
String |
toString()
Return a string of the form: arg=value&arg=value, ...
|
public BasicQueryArgs(Catalog catalog)
public void setParamValue(int i, Object value)
setParamValue
in interface QueryArgs
public void setParamValue(String label, Object value)
setParamValue
in interface QueryArgs
public void setParamValue(String label, int value)
setParamValue
in interface QueryArgs
public void setParamValue(String label, double value)
setParamValue
in interface QueryArgs
public void setParamValues(Object[] values)
setParamValues
in interface QueryArgs
public Object getParamValue(int i)
getParamValue
in interface QueryArgs
public Object getParamValue(String label)
getParamValue
in interface QueryArgs
label
- the parameter name or idpublic int getParamValueAsInt(String label, int defaultValue)
getParamValueAsInt
in interface QueryArgs
label
- the parameter labeldefaultValue
- the default value, if the parameter was not specifiedpublic double getParamValueAsDouble(String label, double defaultValue)
getParamValueAsDouble
in interface QueryArgs
label
- the parameter labeldefaultValue
- the default value, if the parameter was not specifiedpublic String getParamValueAsString(String label, String defaultValue)
getParamValueAsString
in interface QueryArgs
label
- the parameter labeldefaultValue
- the default value, if the parameter was not specifiedpublic String getId()
public void setId(String id)
public CoordinateRadius getRegion()
public void setRegion(CoordinateRadius region)
public Catalog getCatalog()
getCatalog
in interface QueryArgs
public SearchCondition[] getConditions()
getConditions
in interface QueryArgs
public int getMaxRows()
getMaxRows
in interface QueryArgs
public void setMaxRows(int maxRows)
setMaxRows
in interface QueryArgs
public String getQueryType()
getQueryType
in interface QueryArgs
public void setQueryType(String queryType)
setQueryType
in interface QueryArgs
Copyright © 2023 Central Laboratory of the Research Councils. All Rights Reserved.