use of me.himanshusoni.quantumflux.model.util.CursorIterator in project QuantumFlux by himanshu-soni.
the class QuantumFlux method findAll.
public static <T> Iterator<T> findAll(Class<T> dataModel) {
TableDetails tableDetails = findTableDetails(dataModel);
Uri itemUri = UriMatcherHelper.generateItemUriBuilder(tableDetails).build();
ContentResolver contentResolver = mApplicationContext.getContentResolver();
Cursor cursor = contentResolver.query(itemUri, null, null, null, null);
return new CursorIterator<T>(tableDetails, cursor);
}
Aggregations