23
23
24
24
import javax .annotation .Nullable ;
25
25
26
- /** In "real" entity would be annotated with @Entity. */
26
+ import io .objectbox .annotation .Entity ;
27
+ import io .objectbox .annotation .Id ;
28
+ import io .objectbox .annotation .Unsigned ;
29
+
30
+ /**
31
+ * The annotations in this class have no effect as the Gradle plugin is not configured in this project. However, test
32
+ * code builds a model like if the annotations were processed.
33
+ * <p>
34
+ * There is a matching test in the internal integration test project where this is tested and model builder code can be
35
+ * "stolen" from.
36
+ */
37
+ @ Entity
27
38
public class TestEntity {
28
39
29
40
public static final String STRING_VALUE_THROW_IN_CONSTRUCTOR =
@@ -32,7 +43,7 @@ public class TestEntity {
32
43
public static final String EXCEPTION_IN_CONSTRUCTOR_MESSAGE =
33
44
"Hello, this is an exception from TestEntity constructor" ;
34
45
35
- /** In "real" entity would be annotated with @Id. */
46
+ @ Id
36
47
private long id ;
37
48
private boolean simpleBoolean ;
38
49
private byte simpleByte ;
@@ -47,11 +58,11 @@ public class TestEntity {
47
58
/** Not-null value. */
48
59
private String [] simpleStringArray ;
49
60
private List <String > simpleStringList ;
50
- /** In "real" entity would be annotated with @Unsigned. */
61
+ @ Unsigned
51
62
private short simpleShortU ;
52
- /** In "real" entity would be annotated with @Unsigned. */
63
+ @ Unsigned
53
64
private int simpleIntU ;
54
- /** In "real" entity would be annotated with @Unsigned. */
65
+ @ Unsigned
55
66
private long simpleLongU ;
56
67
private Map <String , Object > stringObjectMap ;
57
68
private Object flexProperty ;
0 commit comments