class DistanceDatabaseAdapter implements SelectionBackedDatabaseAdapter<Distance, Trip> {

    @NonNull
    @Override
    public Distance read(@NonNull Cursor cursor) {
        final int parentIndex = cursor.getColumnIndex(ReceiptsTable.COLUMN_PARENT_TRIP_ID);
        final Trip trip = mTripsTable.findByPrimaryKey(cursor.getInt(parentIndex)).blockingGet();
        return readForSelection(cursor, trip, true);
    }

    public  DistanceDatabaseAdapter(@NonNull Table<Trip> tripsTable, @NonNull Table<PaymentMethod> paymentMethodTable);
    public  DistanceDatabaseAdapter(@NonNull Table<Trip> tripsTable, @NonNull Table<PaymentMethod> paymentMethodTable,
                                   @NonNull SyncStateAdapter syncStateAdapter);

}