Skip to content

Commit be4a669

Browse files
committed
JavaDoc covering special @uid values
1 parent bbb043b commit be4a669

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

  • objectbox-java-api/src/main/java/io/objectbox/annotation

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

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,5 +15,15 @@
1515
@Retention(RetentionPolicy.CLASS)
1616
@Target({ElementType.FIELD, ElementType.TYPE})
1717
public @interface Uid {
18+
/**
19+
* The UID associated with an entity/property.
20+
* <p>
21+
* Special values:
22+
* <ul>
23+
* <li>empty (or zero): and the ObjectBox Gradle plugin will set it automatically to the current value.</li>
24+
* <li>-1: will assign a new ID and UID forcing the property/entity to be treated as new
25+
* (for entities: all property IDs and UIDs will be renewed too)</li>
26+
* </ul>
27+
*/
1828
long value() default 0;
1929
}

0 commit comments

Comments
 (0)