aboutsummaryrefslogtreecommitdiffstats
path: root/main/src/cgeo/geocaching/loaders/OfflineGeocacheListLoader.java
blob: b80a1b8a42a2070c30c3019bb3ad1bd4f36a91db (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
package cgeo.geocaching.loaders;

import cgeo.geocaching.DataStore;
import cgeo.geocaching.SearchResult;
import cgeo.geocaching.geopoint.Geopoint;
import cgeo.geocaching.settings.Settings;

import android.content.Context;

public class OfflineGeocacheListLoader extends AbstractSearchLoader {

    private int listId;
    private Geopoint searchCenter;

    public OfflineGeocacheListLoader(Context context, Geopoint searchCenter, int listId) {
        super(context);
        this.searchCenter = searchCenter;
        this.listId = listId;
    }

    @Override
    public SearchResult runSearch() {
        return DataStore.getBatchOfStoredCaches(searchCenter, Settings.getCacheType(), listId);
    }

    public void setListId(int listId) {
        this.listId = listId;
    }

    public void setSearchCenter(Geopoint searchCenter) {
        this.searchCenter = searchCenter;
    }

}