public class QueryWrapper extends Object
Constructor and Description |
---|
QueryWrapper(TopicMapIF topicmap)
EXPERIMENTAL: Creates a wrapper for this particular topic map.
|
Modifier and Type | Method and Description |
---|---|
DeclarationContextIF |
getDeclarationContext() |
QueryProcessorIF |
getQueryProcessor() |
boolean |
isTrue(String query)
EXPERIMENTAL: Returns true if the query produces a row and
false if the query produces no rows.
|
boolean |
isTrue(String query,
Map params)
EXPERIMENTAL: Returns true if the query produces a row and
false if the query produces no rows.
|
Map |
makeParams(String name,
Object value)
EXPERIMENTAL: Utility method for creating parameter maps.
|
List |
queryForList(String query)
EXPERIMENTAL: Runs the query, and returns a the single value in
each row.
|
List |
queryForList(String query,
Map params)
EXPERIMENTAL: Runs the query, and returns a the single value in
each row.
|
List |
queryForList(String query,
RowMapperIF mapper)
EXPERIMENTAL: Runs the query, and calls the mapper for each row
in the query result.
|
List |
queryForList(String query,
RowMapperIF mapper,
Map params)
EXPERIMENTAL: Runs the query with the given parameters, and calls
the mapper for each row in the query result.
|
Map |
queryForMap(String query)
EXPERIMENTAL: Returns a map of the first row of the query
results, with each variable name (without $) as a key and each
variable value as the value of the key.
|
Map |
queryForMap(String query,
Map params)
EXPERIMENTAL: Returns a map of the first row of the query
results, with each variable name (without $) as a key and each
variable value as the value of the key.
|
List |
queryForMaps(String query)
EXPERIMENTAL: Returns a list of Map
|
List |
queryForMaps(String query,
Map params)
EXPERIMENTAL: Returns a list of Map
|
Object |
queryForObject(String query)
EXPERIMENTAL: Returns the value in the first column in the first
row of the query result.
|
Object |
queryForObject(String query,
Map params)
EXPERIMENTAL: Returns the value in the first column in the first
row of the query result.
|
Object |
queryForObject(String query,
RowMapperIF mapper)
EXPERIMENTAL: Returns the mapping of the value in the first
column in the first row of the query result.
|
Object |
queryForObject(String query,
RowMapperIF mapper,
Map params)
EXPERIMENTAL: Returns the mapping of the value in the first
column in the first row of the query result.
|
String |
queryForString(String query)
EXPERIMENTAL: Returns a String from the first column in the first
row of the query result.
|
String |
queryForString(String query,
Map params)
EXPERIMENTAL: Returns a String from the first column in the first
row of the query result.
|
TopicIF |
queryForTopic(String query)
EXPERIMENTAL: Returns a topic from the first column in the first
row of the query result.
|
TopicIF |
queryForTopic(String query,
Map params)
EXPERIMENTAL: Returns a topic from the first column in the first
row of the query result.
|
void |
setDeclarationContext(DeclarationContextIF context) |
void |
setDeclarations(String declarations)
EXPERIMENTAL: Sets the parsing context for the query processor.
|
int |
update(String query)
EXPERIMENTAL: Runs an update statement, returning the number of
changed rows.
|
int |
update(String query,
Map params)
EXPERIMENTAL: Runs an update statement, returning the number of
changed rows.
|
public QueryWrapper(TopicMapIF topicmap)
public QueryProcessorIF getQueryProcessor()
public DeclarationContextIF getDeclarationContext()
public void setDeclarationContext(DeclarationContextIF context)
public void setDeclarations(String declarations)
declarations
- a tolog fragment containing prefix declarationspublic Map makeParams(String name, Object value)
public List queryForList(String query)
public List queryForList(String query, Map params)
public List queryForList(String query, RowMapperIF mapper)
public List queryForList(String query, RowMapperIF mapper, Map params)
public Map queryForMap(String query)
public Map queryForMap(String query, Map params)
public List queryForMaps(String query)
public List queryForMaps(String query, Map params)
public boolean isTrue(String query)
public boolean isTrue(String query, Map params)
public String queryForString(String query)
public String queryForString(String query, Map params)
public TopicIF queryForTopic(String query)
public TopicIF queryForTopic(String query, Map params)
public Object queryForObject(String query)
public Object queryForObject(String query, RowMapperIF mapper)
public Object queryForObject(String query, Map params)
public Object queryForObject(String query, RowMapperIF mapper, Map params)
public int update(String query)