GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — API_ added @TargetIdProperty, deprecated old annotations · a200332/objectbox-java@934e3ab

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • objectbox-java-api/src/main/java/io/objectbox/annotation
    • Backlink.java
    • Generated.java
    • Keep.java
    • Relation.java
    • TargetIdProperty.java
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎objectbox-java-api/src/main/java/io/objectbox/annotation/Backlink.java‎

Copy file name to clipboardExpand all lines: objectbox-java-api/src/main/java/io/objectbox/annotation/Backlink.java
+2Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@
1212
* <p>
1313
* Example: one "Order" references one "Customer" (to-one relation).
1414
* The backlink to this is a to-many in the reverse direction: one "Customer" has a number of "Order"s.
15+
*
16+
* Note: backlinks to to-many relations will be supported in the future.
1517
*/
1618
@Retention(RetentionPolicy.CLASS)
1719
@Target(ElementType.FIELD)
Collapse file

‎objectbox-java-api/src/main/java/io/objectbox/annotation/Generated.java‎

Copy file name to clipboardExpand all lines: objectbox-java-api/src/main/java/io/objectbox/annotation/Generated.java
+1Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
*/
1515
@Retention(RetentionPolicy.CLASS)
1616
@Target({ElementType.FIELD, ElementType.CONSTRUCTOR, ElementType.METHOD})
17+
@Deprecated
1718
public @interface Generated {
1819
/** A hash to identify the generated code */
1920
int value() default -1;
Collapse file

‎objectbox-java-api/src/main/java/io/objectbox/annotation/Keep.java‎

Copy file name to clipboardExpand all lines: objectbox-java-api/src/main/java/io/objectbox/annotation/Keep.java
+1Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,5 +20,6 @@
2020
*/
2121
@Retention(RetentionPolicy.CLASS)
2222
@Target({ElementType.FIELD, ElementType.CONSTRUCTOR, ElementType.METHOD, ElementType.TYPE})
23+
@Deprecated
2324
public @interface Keep {
2425
}
Collapse file

‎objectbox-java-api/src/main/java/io/objectbox/annotation/Relation.java‎

Copy file name to clipboardExpand all lines: objectbox-java-api/src/main/java/io/objectbox/annotation/Relation.java
+1Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
@Target(ElementType.FIELD)
1717
@Beta
1818
@Temporary
19+
@Deprecated
1920
public @interface Relation {
2021
/**
2122
* Name of the property (in the source entity) holding the id (key) as a base for this to-one relation.
Collapse file

‎objectbox-java-api/src/main/java/io/objectbox/annotation/TargetIdProperty.java‎

Copy file name to clipboard
+20Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
package io.objectbox.annotation;
2+
3+
import java.lang.annotation.ElementType;
4+
import java.lang.annotation.Retention;
5+
import java.lang.annotation.RetentionPolicy;
6+
import java.lang.annotation.Target;
7+
8+
/**
9+
* Defines the property serving as the target ID of a ToOne.
10+
* This allows exposing an explicit property, which may be convenient for other parsers/serializers (e.g. JSON).
11+
*/
12+
@Retention(RetentionPolicy.CLASS)
13+
@Target({ElementType.FIELD, ElementType.TYPE})
14+
public @interface TargetIdProperty {
15+
/**
16+
* Name used in the database.
17+
*/
18+
String value();
19+
20+
}

0 commit comments

Comments
0 (0)
You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.