Skip to content

Commit 7eb48c5

Browse files
committed
RetentionPolicy.CLASS for a couple more annotations
1 parent c8c3d68 commit 7eb48c5

6 files changed

Lines changed: 8 additions & 7 deletions

File tree

objectbox-java-api/src/main/java/io/objectbox/annotation/Convert.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
/**
1111
* Specifies {@link PropertyConverter} for the field to support custom types
1212
*/
13-
@Retention(RetentionPolicy.SOURCE)
13+
@Retention(RetentionPolicy.CLASS)
1414
@Target(ElementType.FIELD)
1515
public @interface Convert {
1616
/** Converter class */

objectbox-java-api/src/main/java/io/objectbox/annotation/Id.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
/**
99
* Marks field is the primary key of the entity's table
1010
*/
11-
@Retention(RetentionPolicy.SOURCE)
11+
@Retention(RetentionPolicy.CLASS)
1212
@Target(ElementType.FIELD)
1313
public @interface Id {
1414
/**

objectbox-java-api/src/main/java/io/objectbox/annotation/Index.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
/**
99
* Specifies that the property should be indexed, which is highly recommended if you do queries using this property.
1010
*/
11-
@Retention(RetentionPolicy.SOURCE)
11+
@Retention(RetentionPolicy.CLASS)
1212
@Target(ElementType.FIELD)
1313
public @interface Index {
1414
// /**

objectbox-java-api/src/main/java/io/objectbox/annotation/NotNull.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
* they are equal to using this
1313
* </p>
1414
*/
15-
@Retention(RetentionPolicy.SOURCE)
15+
@Retention(RetentionPolicy.CLASS)
1616
@Target({ElementType.FIELD, ElementType.METHOD, ElementType.PARAMETER})
1717
/** TODO public */ @interface NotNull {
1818
}

objectbox-java-api/src/main/java/io/objectbox/annotation/Property.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
* Optional: configures the mapped column for a persistent field.
1010
* This annotation is also applicable with @ToOne without additional foreign key property
1111
*/
12-
@Retention(RetentionPolicy.SOURCE)
12+
@Retention(RetentionPolicy.CLASS)
1313
@Target(ElementType.FIELD)
1414
public @interface Property {
1515
/**

objectbox-java-api/src/main/java/io/objectbox/annotation/Transient.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,13 @@
44
import java.lang.annotation.Retention;
55
import java.lang.annotation.Target;
66

7-
import static java.lang.annotation.RetentionPolicy.SOURCE;
7+
8+
import static java.lang.annotation.RetentionPolicy.CLASS;
89

910
/**
1011
* Transient fields are not persisted in the database.
1112
*/
12-
@Retention(SOURCE)
13+
@Retention(CLASS)
1314
@Target(ElementType.FIELD)
1415
public @interface Transient {
1516
}

0 commit comments

Comments
 (0)