@Retention(value=CLASS) @Target(value=FIELD) public @interface OrmLiteDao
Use it on fields of any enhanced class to injects an OrmLite Dao, configured with the provided mode and helper classes.
All parameters are mandatory:
Note: The minimum version required of ORMLite is 4.21
Note: For getting and releasing the helper, we use the OpenHelperManager class, which cannot handle two different helpers at
the same time. So if you are using multiple database helpers, be careful with
OrmLiteDao
annotations.
Example :@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; }
public abstract Class<?> helper
@Deprecated public abstract Class<?> model
Copyright © 2010-2015. All Rights Reserved.