|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.ontopia.topicmaps.query.utils.QueryWrapper
public class QueryWrapper
EXPERIMENTAL: Class a la Spring's JDBC templates to simplify use of the tolog query engine API.
Constructor Summary | |
---|---|
QueryWrapper(TopicMapIF topicmap)
EXPERIMENTAL: Creates a wrapper for this particular topic map. |
Method Summary | |
---|---|
DeclarationContextIF |
getDeclarationContext()
|
QueryProcessorIF |
getQueryProcessor()
|
boolean |
isTrue(java.lang.String query)
EXPERIMENTAL: Returns true if the query produces a row and false if the query produces no rows. |
boolean |
isTrue(java.lang.String query,
java.util.Map params)
EXPERIMENTAL: Returns true if the query produces a row and false if the query produces no rows. |
java.util.Map |
makeParams(java.lang.String name,
java.lang.Object value)
EXPERIMENTAL: Utility method for creating parameter maps. |
java.util.List |
queryForList(java.lang.String query)
EXPERIMENTAL: Runs the query, and returns a the single value in each row. |
java.util.List |
queryForList(java.lang.String query,
java.util.Map params)
EXPERIMENTAL: Runs the query, and returns a the single value in each row. |
java.util.List |
queryForList(java.lang.String query,
RowMapperIF mapper)
EXPERIMENTAL: Runs the query, and calls the mapper for each row in the query result. |
java.util.List |
queryForList(java.lang.String query,
RowMapperIF mapper,
java.util.Map params)
EXPERIMENTAL: Runs the query with the given parameters, and calls the mapper for each row in the query result. |
java.util.Map |
queryForMap(java.lang.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. |
java.util.Map |
queryForMap(java.lang.String query,
java.util.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. |
java.util.List |
queryForMaps(java.lang.String query)
EXPERIMENTAL: Returns a list of Map |
java.util.List |
queryForMaps(java.lang.String query,
java.util.Map params)
EXPERIMENTAL: Returns a list of Map |
java.lang.Object |
queryForObject(java.lang.String query)
EXPERIMENTAL: Returns the value in the first column in the first row of the query result. |
java.lang.Object |
queryForObject(java.lang.String query,
java.util.Map params)
EXPERIMENTAL: Returns the value in the first column in the first row of the query result. |
java.lang.Object |
queryForObject(java.lang.String query,
RowMapperIF mapper)
EXPERIMENTAL: Returns the mapping of the value in the first column in the first row of the query result. |
java.lang.Object |
queryForObject(java.lang.String query,
RowMapperIF mapper,
java.util.Map params)
EXPERIMENTAL: Returns the mapping of the value in the first column in the first row of the query result. |
java.lang.String |
queryForString(java.lang.String query)
EXPERIMENTAL: Returns a String from the first column in the first row of the query result. |
java.lang.String |
queryForString(java.lang.String query,
java.util.Map params)
EXPERIMENTAL: Returns a String from the first column in the first row of the query result. |
TopicIF |
queryForTopic(java.lang.String query)
EXPERIMENTAL: Returns a topic from the first column in the first row of the query result. |
TopicIF |
queryForTopic(java.lang.String query,
java.util.Map params)
EXPERIMENTAL: Returns a topic from the first column in the first row of the query result. |
void |
setDeclarationContext(DeclarationContextIF context)
|
void |
setDeclarations(java.lang.String declarations)
EXPERIMENTAL: Sets the parsing context for the query processor. |
int |
update(java.lang.String query)
EXPERIMENTAL: Runs an update statement, returning the number of changed rows. |
int |
update(java.lang.String query,
java.util.Map params)
EXPERIMENTAL: Runs an update statement, returning the number of changed rows. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public QueryWrapper(TopicMapIF topicmap)
Method Detail |
---|
public QueryProcessorIF getQueryProcessor()
public DeclarationContextIF getDeclarationContext()
public void setDeclarationContext(DeclarationContextIF context)
public void setDeclarations(java.lang.String declarations)
declarations
- a tolog fragment containing prefix declarationspublic java.util.Map makeParams(java.lang.String name, java.lang.Object value)
public java.util.List queryForList(java.lang.String query)
public java.util.List queryForList(java.lang.String query, java.util.Map params)
public java.util.List queryForList(java.lang.String query, RowMapperIF mapper)
public java.util.List queryForList(java.lang.String query, RowMapperIF mapper, java.util.Map params)
public java.util.Map queryForMap(java.lang.String query)
public java.util.Map queryForMap(java.lang.String query, java.util.Map params)
public java.util.List queryForMaps(java.lang.String query)
public java.util.List queryForMaps(java.lang.String query, java.util.Map params)
public boolean isTrue(java.lang.String query)
public boolean isTrue(java.lang.String query, java.util.Map params)
public java.lang.String queryForString(java.lang.String query)
public java.lang.String queryForString(java.lang.String query, java.util.Map params)
public TopicIF queryForTopic(java.lang.String query)
public TopicIF queryForTopic(java.lang.String query, java.util.Map params)
public java.lang.Object queryForObject(java.lang.String query)
public java.lang.Object queryForObject(java.lang.String query, RowMapperIF mapper)
public java.lang.Object queryForObject(java.lang.String query, java.util.Map params)
public java.lang.Object queryForObject(java.lang.String query, RowMapperIF mapper, java.util.Map params)
public int update(java.lang.String query)
public int update(java.lang.String query, java.util.Map params)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |