(SelectStatement query)
| 200 | } |
| 201 | |
| 202 | private int getCount(SelectStatement query) { |
| 203 | SelectStatement countQuery = new SelectStatement(); |
| 204 | countQuery.from(query) |
| 205 | .count(); |
| 206 | |
| 207 | Cursor c = getCursor(countQuery); |
| 208 | |
| 209 | int count = 0; |
| 210 | |
| 211 | if(c.moveToFirst()) { |
| 212 | count = c.getInt(c.getColumnIndexOrThrow(Model.COUNT)); |
| 213 | } |
| 214 | |
| 215 | closeConnection(c); |
| 216 | |
| 217 | return count; |
| 218 | } |
| 219 | |
| 220 | /** |
| 221 | * Checks if the result of this query contains the given |
no test coverage detected