Repository navigation
Ormlite
Damien edited this page Jun 20, 2013
·
11 revisions
Since AndroidAnnotations 2.7
Thanks to Johan Poirier, you may inject your OrmLite DAOs with the @OrmLiteDao annotation.
The @OrmLiteDao has two mandatory attributes :
-
helpershould hold the class of your database helper (which should extendandroid.database.sqlite.SQLiteOpenHelper) -
modelshould point to the model class that the DAO relates to. It should match the type of the first generic parameter of your Dao
Usage:
@EActivity
public class MyActivity extends Activity {
// UserDao is a Dao<User, Long>
@OrmLiteDao(helper = DatabaseHelper.class, model = User.class)
UserDao userDao;
@OrmLiteDao(helper = DatabaseHelper.class, model = Car.class)
Dao<Car, Long> carDao;
}Since AndroidAnnotations 3.0
Before 3.0, only subclasses of Dao could be annotated with @OrmLiteDao.
Now we also handle subclasses of RuntimeExceptionDao
AndroidAnnotations was created by Pierre-Yves Ricau and was originally sponsored by eBusinessInformations.
10/07/2015 The 3.3.2 release is out !
- Get started!
- Download
- Cookbook, full of recipes
- Customize annotation processing
- List of all available annotations
- Release Notes
- Examples
- Read the FAQ
- Join the Mailing list
- Create an issue
- Tag on Stack Overflow
- Ask on Gitter