// Path: framework/src/main/java/com/kifile/android/cornerstone/core/DataFetcher.java
// public interface DataFetcher<DATA> {
// 
//     /**
//      * Fetch data.
//      *
//      * @return If fetch successful, return the data.
//      * @throws FetchException   Throw FetchException when you cannot fetch a data.
//      * @throws ConvertException Throw ConvertException when you cannot convert the data to another type.
//      */
//     DATA fetch() throws FetchException, ConvertException;
// }


import com.kifile.android.cornerstone.core.DataFetcher;
package com.kifile.android.cornerstone.impl.providers;


/**
 * Paged data provider.
 * <p/>
 * Created by kifile on 15/8/25.
 */
public abstract class PageDataProvider<DATA> extends AbstractDataProvider<PageDataProvider.PageData<DATA>> {

    private DataFetcher<DATA> mFetcher;

    @Override
    public void setFetcher(DataFetcher<PageData<DATA>> fetcher) {
        throw new UnsupportedOperationException("Should call #setPageFetcher to setFetcher");
    }

// Path: framework/src/main/java/com/kifile/android/cornerstone/core/DataFetcher.java
// public interface DataFetcher<DATA> {
// 
//     /**
//      * Fetch data.
//      *
//      * @return If fetch successful, return the data.
//      * @throws FetchException   Throw FetchException when you cannot fetch a data.
//      * @throws ConvertException Throw ConvertException when you cannot convert the data to another type.
//      */
//     DATA fetch() throws FetchException, ConvertException;
// }


// Path: framework/src/main/java/com/kifile/android/cornerstone/impl/providers/PageDataProvider.java
import com.kifile.android.cornerstone.core.DataFetcher;

package com.kifile.android.cornerstone.impl.providers;


/**
 * Paged data provider.
 * <p/>
 * Created by kifile on 15/8/25.
 */
public abstract class PageDataProvider<DATA> extends AbstractDataProvider<PageDataProvider.PageData<DATA>> {

    private DataFetcher<DATA> mFetcher;

    @Override
    public void setFetcher(DataFetcher<PageData<DATA>> fetcher) {
        throw new UnsupportedOperationException("Should call #setPageFetcher to setFetcher");
    }

    public void setPageFetcher(DataFetcher<DATA> fetcher) {