// Path: well-annotations/src/main/java/com/yarolegovich/wellsql/core/Identifiable.java
// public interface Identifiable {
//     void setId(int id);
//     int getId();
// }
// 
// Path: well-annotations/src/main/java/com/yarolegovich/wellsql/core/TableClass.java
// public interface TableClass {
//     String createStatement();
//     String getTableName();
//     boolean shouldAutoincrementId();
//     Class<?> getModelClass();
// }
// 
// Path: wellsql/src/main/java/com/yarolegovich/wellsql/mapper/SQLiteMapper.java
// public interface SQLiteMapper<T> extends InsertMapper<T>, SelectMapper<T> {}


import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteOpenHelper;
import com.yarolegovich.wellsql.core.Identifiable;
import com.yarolegovich.wellsql.core.TableClass;
import com.yarolegovich.wellsql.mapper.SQLiteMapper;
import java.util.Collections;
import java.util.List;

    public static <T extends Identifiable> DeleteQuery<T> delete(Class<T> token) {
        return new DeleteQuery<>(sInstance.getWritableDatabase(), token);
    }

    public static <T extends Identifiable> UpdateQuery<T> update(Class<T> token) {
        return new UpdateQuery<>(sInstance.getWritableDatabase(), token);
    }

    public static <T extends Identifiable>ResetAutoincrementQuery autoincrementFor(Class<T> token) {
        return new ResetAutoincrementQuery(sInstance.getWritableDatabase(), tableFor(token).getTableName());
    }

    public static SQLiteDatabase giveMeReadableDb() {
        return sInstance.getReadableDatabase();
    }

    public static SQLiteDatabase giveMeWritableDb() {
        return sInstance.getWritableDatabase();
    }

    public static <T> SQLiteMapper<T> mapperFor(Class<T> token) {
        SQLiteMapper<T> mapper = mDbConfig.getMapper(token);
        if (mapper == null) {
            throw new RuntimeException(mDbConfig.getContext()
                    .getString(R.string.mapper_not_found, token.getSimpleName()));
        }
        return mapper;
    }

// Path: well-annotations/src/main/java/com/yarolegovich/wellsql/core/Identifiable.java
// public interface Identifiable {
//     void setId(int id);
//     int getId();
// }
// 
// Path: well-annotations/src/main/java/com/yarolegovich/wellsql/core/TableClass.java
// public interface TableClass {
//     String createStatement();
//     String getTableName();
//     boolean shouldAutoincrementId();
//     Class<?> getModelClass();
// }
// 
// Path: wellsql/src/main/java/com/yarolegovich/wellsql/mapper/SQLiteMapper.java
// public interface SQLiteMapper<T> extends InsertMapper<T>, SelectMapper<T> {}


// Path: wellsql/src/main/java/com/yarolegovich/wellsql/WellSql.java
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteOpenHelper;
import com.yarolegovich.wellsql.core.Identifiable;
import com.yarolegovich.wellsql.core.TableClass;
import com.yarolegovich.wellsql.mapper.SQLiteMapper;
import java.util.Collections;
import java.util.List;


    public static <T extends Identifiable> DeleteQuery<T> delete(Class<T> token) {
        return new DeleteQuery<>(sInstance.getWritableDatabase(), token);
    }

    public static <T extends Identifiable> UpdateQuery<T> update(Class<T> token) {
        return new UpdateQuery<>(sInstance.getWritableDatabase(), token);
    }

    public static <T extends Identifiable>ResetAutoincrementQuery autoincrementFor(Class<T> token) {
        return new ResetAutoincrementQuery(sInstance.getWritableDatabase(), tableFor(token).getTableName());
    }

    public static SQLiteDatabase giveMeReadableDb() {
        return sInstance.getReadableDatabase();
    }

    public static SQLiteDatabase giveMeWritableDb() {
        return sInstance.getWritableDatabase();
    }

    public static <T> SQLiteMapper<T> mapperFor(Class<T> token) {
        SQLiteMapper<T> mapper = mDbConfig.getMapper(token);
        if (mapper == null) {
            throw new RuntimeException(mDbConfig.getContext()
                    .getString(R.string.mapper_not_found, token.getSimpleName()));
        }
        return mapper;
    }

    static <T extends Identifiable> TableClass tableFor(Class<T> token) {