Methods in this interface will work like the findAll methods in the SqlAdapter interface, but instead of returning a java.util.List of beans it will return a cursor. @author cristian
| 25 | * @author cristian |
| 26 | */ |
| 27 | public interface RawQuery { |
| 28 | /** |
| 29 | * Retrieves all elements from the database of the specified type |
| 30 | * |
| 31 | * @param theClass the class of the object that we want to retrieve |
| 32 | * @return a Cursor pointing to the filter rows |
| 33 | */ |
| 34 | Cursor findAll(Class<?> theClass); |
| 35 | |
| 36 | /** |
| 37 | * Retrieves all elements from the database that matches the specified sample |
| 38 | * |
| 39 | * @param where sample object |
| 40 | * @return a Cursor pointing to the filter rows |
| 41 | */ |
| 42 | Cursor findAll(Object where); |
| 43 | |
| 44 | /** |
| 45 | * Retrieves all elements from the database that matches the specified sample. And follows the specified constraint. |
| 46 | * |
| 47 | * @param where sample object |
| 48 | * @param constraint constrains for this query |
| 49 | * @return a Cursor pointing to the filter rows |
| 50 | */ |
| 51 | Cursor findAll(Object where, Constraint constraint); |
| 52 | |
| 53 | /** |
| 54 | * Retrieves all elements from the database that are attached to the specified object |
| 55 | * |
| 56 | * @param where the sample object |
| 57 | * @param attachedTo the object that is attached to the sample object |
| 58 | * @return a Cursor pointing to the filter rows |
| 59 | */ |
| 60 | Cursor findAll(Object where, Object attachedTo); |
| 61 | |
| 62 | /** |
| 63 | * Retrieves all elements from the database that matches the specified sample |
| 64 | * |
| 65 | * @param theClass the class to find all items |
| 66 | * @param where a SQL query. It is recommended to use wildcards like: <code>something = ? AND another = ?</code> |
| 67 | * @param whereArgs the list of values used in the wildcards |
| 68 | * @return a Cursor pointing to the filter rows |
| 69 | */ |
| 70 | Cursor findAll(Class<?> theClass, String where, String[] whereArgs); |
| 71 | |
| 72 | /** |
| 73 | * @param rawQuery an SQL query to execute |
| 74 | * @return A Cursor object, which is positioned before the first entry. Note that Cursors are not synchronized, |
| 75 | * see the documentation for more details. |
| 76 | */ |
| 77 | Cursor rawQuery(String rawQuery); |
| 78 | |
| 79 | /** |
| 80 | * @param table The table name to compile the query against. |
| 81 | * @param projection A list of which columns to return. Passing null will return all columns, which is |
| 82 | * discouraged to prevent reading data from storage that isn't going to be used. |
| 83 | * @param selection A filter declaring which rows to return, formatted as an SQL WHERE clause (excluding the |
| 84 | * WHERE itself). Passing null will return all rows for the given table. |
no outgoing calls
no test coverage detected
searching dependent graphs…