|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface IContextQuery
This interface allows querying context events from the ContextStore database. The query syntax depends on the actual storage implementation of the ContextStore. Up to now two implementations are shipped: a JDBC-based and an Android/SQLite-based. Hence, queries are to be supplied in SQL (refer to official documentation of the used database).
For details regarding the table structure etc., see the actual storage implementation class (e.g. JDBCStorage
or AndroidStorage
).
OSGi notice: In OSGi environments, the ContextStore is registered as a service for this interface.
Method Summary | |
---|---|
ContextEvent[] |
query(java.lang.String query,
java.lang.Object... params)
This method allows you to perform a query on the ContextStore database to get contexts with the specified properties |
java.lang.Iterable<ContextEvent> |
queryLazy(java.lang.String query,
java.lang.Object... params)
Lazy variant of query(String, Object...) , i.e. it loads one ContextEvent at a time during iteration. |
Method Detail |
---|
ContextEvent[] query(java.lang.String query, java.lang.Object... params)
query
- the query to be executedparams
- parameters which may occur in the query (e.g., using the ? syntax) and are bound accordingly (so escaping, quoting etc. is unnecessary)
IContextEvent[]
s (which is empty if no contexts were found)java.lang.Iterable<ContextEvent> queryLazy(java.lang.String query, java.lang.Object... params) throws java.lang.UnsupportedOperationException
query(String, Object...)
, i.e. it loads one ContextEvent at a time during iteration. This operation is optional.
java.lang.UnsupportedOperationException
- if the underlying storage implementation does not support lazy queryingquery(String, Object...)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |