I have a model class, let's call it "History":
public class History {
    int _id;
    String _file_name;
    String _full_path;
    String _file_type;
    public History(){
    }
    public History(int id, String _name, String _full_path, String _file_type){
        this._id = id;
        this._file_name = _name;
        this._full_path = _full_path;
 this._file_type = _file_type;
}
public int get_id() {
    return _id;
}
public void set_id(int _id) {
    this._id = _id;
}
public String get_file_name() {
    return _file_name;
}
public void set_file_name(String _file_name) {
    this._file_name = _file_name;
}
public String get_full_path() {
    return _full_path;
}
public void set_full_path(String _full_path) {
    this._full_path = _full_path;
}
public String get_file_type() {
    return _file_type;
}
public void set_file_type(String _file_type) {
    this._file_type = _file_type;
}
}
I'd like to auto-generate a Database Handler for all of my models that looks similar to this:
import android.content.Context;
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteOpenHelper;
public class DatabaseHandler extends SQLiteOpenHelper {
    private static final int DATABASE_VERSION = 1;
    private static final String DATABASE_NAME = "file_explorer";
    private static final String TABLE_HISTORY = "history";
    private static final String KEY_ID = "id";
    private static final String KEY_NAME = "name";
    private static final String KEY_PH_NO = "phone_number";
    public DatabaseHandler(Context context) {
        super(context, DATABASE_NAME, null, DATABASE_VERSION);
    }
    @Override
    public void onCreate(SQLiteDatabase db) {
        String CREATE_CONTACTS_TABLE = "CREATE TABLE " + TABLE_HISTORY + "("
                + KEY_ID + " INTEGER PRIMARY KEY," + KEY_NAME + " TEXT,"
                + KEY_PH_NO + " TEXT" + ")";
        db.execSQL(CREATE_CONTACTS_TABLE);
    }
    @Override
    public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {
        db.execSQL("DROP TABLE IF EXISTS " + TABLE_HISTORY);
        onCreate(db);
    }
}
(This isn't a handler for my model, but you get the idea)
Is this possible or do I have to manually create a database handler for each model?
I checked Eclipse's auto generation options but I didn't find what I need.
 
     
     
    