Skip to content

Commit 8749a17

Browse files
committed
Merge pull request androidannotations#1251 from dodgex/remove_model_from_@OrmLiteDao
remove model parameter from @OrmLiteDao
2 parents 8987ca6 + 12f8e7e commit 8749a17

2 files changed

Lines changed: 6 additions & 24 deletions

File tree

‎AndroidAnnotations/androidannotations-api/src/main/java/org/androidannotations/annotations/OrmLiteDao.java‎

Lines changed: 5 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -26,14 +26,10 @@
2626
* with the provided mode and helper classes.
2727
* </p>
2828
* <p>
29-
* All parameters are mandatory:
29+
* The helper paramter is mandatory and should hold the class of your database
30+
* helper which should extend
31+
* com.j256.ormlite.android.apptools.OrmLiteSqliteOpenHelper
3032
* </p>
31-
* <ul>
32-
* <li><i>helper</i>: should hold the class of your database helper which should
33-
* extend com.j256.ormlite.android.apptools.OrmLiteSqliteOpenHelper</li>
34-
* <li><i>model</i>: should point to the model class that the DAO relates to. It
35-
* should match the type of the first generic parameter of your Dao.</li>
36-
* </ul>
3733
* <p>
3834
* <b>Note:</b> The minimum version required of ORMLite is 4.21
3935
* </p>
@@ -53,10 +49,10 @@
5349
* public class MyActivity extends Activity {
5450
*
5551
* // UserDao is a Dao&lt;User, Long&gt;
56-
* &#064;OrmLiteDao(helper = DatabaseHelper.class, model = User.class)
52+
* &#064;OrmLiteDao(helper = DatabaseHelper.class)
5753
* UserDao userDao;
5854
*
59-
* &#064;OrmLiteDao(helper = DatabaseHelper.class, model = Car.class)
55+
* &#064;OrmLiteDao(helper = DatabaseHelper.class)
6056
* Dao&lt;Car, Long&gt; carDao;
6157
* }
6258
* </pre>
@@ -73,17 +69,4 @@
7369
* @return the helper class
7470
*/
7571
Class<?> helper();
76-
77-
/**
78-
* The class of the model what this DAO can manage.
79-
*
80-
* @deprecated Since <b>3.1</b> the model class is inferred from the type of
81-
* the annotated field. This parameter will be removed in a
82-
* future version.
83-
*
84-
* @return the model class
85-
*/
86-
@Deprecated
87-
Class<?> model() default Void.class;
88-
8972
}

‎AndroidAnnotations/functional-test-1-5/src/main/java/org/androidannotations/test15/eservice/MySimpleIntentService.java‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@
3030
import org.androidannotations.annotations.UiThread;
3131
import org.androidannotations.test15.ebean.EnhancedClass;
3232
import org.androidannotations.test15.ormlite.DatabaseHelper;
33-
import org.androidannotations.test15.ormlite.User;
3433
import org.androidannotations.test15.ormlite.UserDao;
3534

3635
@EService
@@ -42,7 +41,7 @@ public class MySimpleIntentService extends IntentService {
4241
@Bean
4342
EnhancedClass dependency;
4443

45-
@OrmLiteDao(helper = DatabaseHelper.class, model = User.class)
44+
@OrmLiteDao(helper = DatabaseHelper.class)
4645
UserDao userDao;
4746

4847
public MySimpleIntentService() {

0 commit comments

Comments
 (0)