public interface CRUDRead
| Modifier and Type | Method and Description |
|---|---|
void |
cancelNotification()
Removes notifications broadcasted by this plug-in.
|
void |
fireNotification(java.lang.String title,
java.lang.String text)
Sends a notification to be broadcasted by the host.
|
com.kasapakis.adam.plugin_model_library_core.database.CustomCursor |
query(java.lang.String pluginName,
int dbVersion,
java.lang.String tableName,
java.lang.String[] columns,
java.lang.String selection,
java.lang.String[] selectionArgs,
java.lang.String groupBy,
java.lang.String having,
java.lang.String orderBy)
Method to query host's database.
|
com.kasapakis.adam.plugin_model_library_core.database.CustomCursor query(java.lang.String pluginName,
int dbVersion,
java.lang.String tableName,
java.lang.String[] columns,
java.lang.String selection,
java.lang.String[] selectionArgs,
java.lang.String groupBy,
java.lang.String having,
java.lang.String orderBy)
throws com.kasapakis.adam.plugin_model_library_core.exceptions.NotActivatedException,
com.kasapakis.adam.plugin_model_library_core.exceptions.NotInitialisedException
pluginName - String: name of the plugin that created the table.
This is necessary to check if the table exists.dbVersion - int: version of the database Schema that defines the table.tableName - String: The table name to compile the query against.columns - String[]: A list of which columns to return. Passing null will return
all columns, which is discouraged to prevent reading data from storage
that isn't going to be used.selection - String: A filter declaring which rows to return,
formatted as an SQL WHERE clause (excluding the WHERE itself).
Passing null will return all rows for the given table.selectionArgs - String[]: You may include ?s in selection, which will be replaced by the
values from selectionArgs, in order that they appear in the selection.
The values will be bound as Strings.groupBy - String: A filter declaring how to group rows, formatted as
an SQL GROUP BY clause (excluding the GROUP BY itself).
Passing null will cause the rows to not be grouped.having - String: A filter declare which row groups to include in the cursor,
if row grouping is being used, formatted as an SQL HAVING clause
(excluding the HAVING itself).
Passing null will cause all row groups to be included, and is required
when row grouping is not being used.orderBy - String: How to order the rows, formatted as an SQL ORDER BY clause
(excluding the ORDER BY itself).
Passing null will use the default sort order, which may be unordered.com.kasapakis.adam.plugin_model_library_core.exceptions.NotActivatedException - thrown if the plug-in is not activated in host applicationcom.kasapakis.adam.plugin_model_library_core.exceptions.NotInitialisedException - thrown if the plug-in that create the tables that are queried
is not initialised in host application.void fireNotification(java.lang.String title,
java.lang.String text)
throws com.kasapakis.adam.plugin_model_library_core.exceptions.NotActivatedException
title - String: title of the notificationtext - String: message of the notificationcom.kasapakis.adam.plugin_model_library_core.exceptions.NotActivatedException - thrown if the plug-in is not activated in host applicationvoid cancelNotification()
throws com.kasapakis.adam.plugin_model_library_core.exceptions.NotActivatedException
com.kasapakis.adam.plugin_model_library_core.exceptions.NotActivatedException - thrown if the plug-in is not activated in host application