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 — prep RelationInfo for relationId · bobbisinaga/objectbox-java@cd148bf

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • objectbox-java/src/main/java/io/objectbox/relation
    • RelationInfo.java
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎objectbox-java/src/main/java/io/objectbox/relation/RelationInfo.java‎

Copy file name to clipboardExpand all lines: objectbox-java/src/main/java/io/objectbox/relation/RelationInfo.java
+14Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,16 @@ public class RelationInfo<TARGET> implements Serializable {
1818

1919
public final EntityInfo sourceInfo;
2020
public final EntityInfo<TARGET> targetInfo;
21+
22+
/** For relations based on a target ID property (null for stand-alone relations). */
2123
public final Property targetIdProperty;
2224

2325
/** For ToMany relations based on backlinks (null otherwise). */
2426
public final ToOneGetter toOneGetter;
2527

28+
/** For stand-alone to-many relations (0 otherwise). */
29+
public final int relationId;
30+
2631
public RelationInfo(EntityInfo sourceInfo, EntityInfo<TARGET> targetInfo, Property targetIdProperty) {
2732
this(sourceInfo, targetInfo, targetIdProperty, null);
2833
}
@@ -33,6 +38,15 @@ public RelationInfo(EntityInfo sourceInfo, EntityInfo<TARGET> targetInfo, Proper
3338
this.targetInfo = targetInfo;
3439
this.targetIdProperty = targetIdProperty;
3540
this.toOneGetter = toOneGetter;
41+
relationId = 0;
42+
}
43+
44+
public RelationInfo(EntityInfo sourceInfo, EntityInfo<TARGET> targetInfo, int relationId) {
45+
this.sourceInfo = sourceInfo;
46+
this.targetInfo = targetInfo;
47+
this.relationId = relationId;
48+
this.targetIdProperty = null;
49+
this.toOneGetter = null;
3650
}
3751
}
3852

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.