How to extend the BaseDaoImpl class of ORMLite on Android to extend functionality How to extend the BaseDaoImpl class of ORMLite on Android to extend functionality sqlite sqlite

How to extend the BaseDaoImpl class of ORMLite on Android to extend functionality


My problem is that I don't know how to create an instance of ExtendedDaoImpl class form the OrmLiteSqliteOpenHelper class...

Nicely worded question. The @DatabaseTable annotation has a field daoClass which can be used to specify the DAO class to construct.

http://ormlite.com/javadoc/ormlite-core/com/j256/ormlite/table/DatabaseTable.html#daoClass()

Here are the docs for the DaoManager.

http://ormlite.com/docs/dao-manager

Your class will need to have a constructor with ConnectionSource and Class arguments.

The solution is not well documented. Let me know if you have any ideas how I can improve the documentation.