GeezerVison is showing github.com — Update Flatbuffers to 1.12 · hpdx/objectbox-java@e22dfe3
File treeExpand file treeCollapse file tree Open diff view settings src/main/java/io/objectbox
Expand file treeCollapse file tree Open diff view settings Collapse file Copy file name to clipboardExpand all lines: objectbox-java/build.gradle +1-1Lines changed: 1 addition & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
@@ -8,7 +8,7 @@ dependencies { | 8 | 8 | compile fileTree(include: ['*.jar'], dir: 'libs') | 9 | 9 | compile project(':objectbox-java-api') | 10 | 10 | compile 'org.greenrobot:essentials:3.0.0-RC1' | 11 | | - compile 'com.google.flatbuffers:flatbuffers-java:1.11.1' | | 11 | + compile 'com.google.flatbuffers:flatbuffers-java:1.12.0' | 12 | 12 | compile 'com.google.code.findbugs:jsr305:3.0.2' | 13 | 13 | } | 14 | 14 |
| |
Collapse file Copy file name to clipboardExpand all lines: objectbox-java/src/main/java/io/objectbox/DebugFlags.java +1-1Lines changed: 1 addition & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
| 1 | 1 | /* | 2 | | - * Copyright 2019 ObjectBox Ltd. All rights reserved. | | 2 | + * Copyright 2020 ObjectBox Ltd. All rights reserved. | 3 | 3 | * | 4 | 4 | * Licensed under the Apache License, Version 2.0 (the "License"); | 5 | 5 | * you may not use this file except in compliance with the License. | |
Collapse file Copy file name to clipboardExpand all lines: objectbox-java/src/main/java/io/objectbox/model/EntityFlags.java +1-1Lines changed: 1 addition & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
| 1 | 1 | /* | 2 | | - * Copyright 2019 ObjectBox Ltd. All rights reserved. | | 2 | + * Copyright 2020 ObjectBox Ltd. All rights reserved. | 3 | 3 | * | 4 | 4 | * Licensed under the Apache License, Version 2.0 (the "License"); | 5 | 5 | * you may not use this file except in compliance with the License. | |
Collapse file Copy file name to clipboardExpand all lines: objectbox-java/src/main/java/io/objectbox/model/IdUid.java +10-3Lines changed: 10 additions & 3 deletions | Original file line number | Diff line number | Diff line change |
|---|
| 1 | 1 | /* | 2 | | - * Copyright 2019 ObjectBox Ltd. All rights reserved. | | 2 | + * Copyright 2020 ObjectBox Ltd. All rights reserved. | 3 | 3 | * | 4 | 4 | * Licensed under the Apache License, Version 2.0 (the "License"); | 5 | 5 | * you may not use this file except in compliance with the License. | | 23 | 23 | import java.util.*; | 24 | 24 | import com.google.flatbuffers.*; | 25 | 25 |
| | 26 | +@SuppressWarnings("unused") | 26 | 27 | /** | 27 | 28 | * ID tuple: besides the main ID there is also a UID for verification | 28 | 29 | */ | 29 | | -@SuppressWarnings("unused") | 30 | 30 | public final class IdUid extends Struct { | 31 | | - public void __init(int _i, ByteBuffer _bb) { bb_pos = _i; bb = _bb; } | | 31 | + public void __init(int _i, ByteBuffer _bb) { __reset(_i, _bb); } | 32 | 32 | public IdUid __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } | 33 | 33 |
| 34 | 34 | public long id() { return (long)bb.getInt(bb_pos + 0) & 0xFFFFFFFFL; } | @@ -45,5 +45,12 @@ public static int createIdUid(FlatBufferBuilder builder, long id, long uid) { | 45 | 45 | builder.putInt((int)id); | 46 | 46 | return builder.offset(); | 47 | 47 | } | | 48 | + | | 49 | + public static final class Vector extends BaseVector { | | 50 | + public Vector __assign(int _vector, int _element_size, ByteBuffer _bb) { __reset(_vector, _element_size, _bb); return this; } | | 51 | + | | 52 | + public IdUid get(int j) { return get(new IdUid(), j); } | | 53 | + public IdUid get(IdUid obj, int j) { return obj.__assign(__element(j), bb); } | | 54 | + } | 48 | 55 | } | 49 | 56 |
|
Collapse file Copy file name to clipboardExpand all lines: objectbox-java/src/main/java/io/objectbox/model/Model.java +24-14Lines changed: 24 additions & 14 deletions | Original file line number | Diff line number | Diff line change |
|---|
| 1 | 1 | /* | 2 | | - * Copyright 2019 ObjectBox Ltd. All rights reserved. | | 2 | + * Copyright 2020 ObjectBox Ltd. All rights reserved. | 3 | 3 | * | 4 | 4 | * Licensed under the Apache License, Version 2.0 (the "License"); | 5 | 5 | * you may not use this file except in compliance with the License. | | 23 | 23 | import java.util.*; | 24 | 24 | import com.google.flatbuffers.*; | 25 | 25 |
| | 26 | +@SuppressWarnings("unused") | 26 | 27 | /** | 27 | 28 | * A model describes all entities and other meta data. | 28 | 29 | * The current model of an app is synced against ObjectBox's persisted schema. | 29 | 30 | * The model itself is not persisted, and thus may change as long as both ends are consistent (Java and native). | 30 | 31 | * There could be multiple models/schemas (one dbi per schema) in the future. | 31 | 32 | */ | 32 | | -@SuppressWarnings("unused") | 33 | 33 | public final class Model extends Table { | | 34 | + public static void ValidateVersion() { Constants.FLATBUFFERS_1_12_0(); } | 34 | 35 | public static Model getRootAsModel(ByteBuffer _bb) { return getRootAsModel(_bb, new Model()); } | 35 | | - public static Model getRootAsModel(ByteBuffer _bb, Model obj) { Constants.FLATBUFFERS_1_11_1(); _bb.order(ByteOrder.LITTLE_ENDIAN); return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)); } | 36 | | - public void __init(int _i, ByteBuffer _bb) { bb_pos = _i; bb = _bb; vtable_start = bb_pos - bb.getInt(bb_pos); vtable_size = bb.getShort(vtable_start); } | | 36 | + public static Model getRootAsModel(ByteBuffer _bb, Model obj) { _bb.order(ByteOrder.LITTLE_ENDIAN); return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)); } | | 37 | + public void __init(int _i, ByteBuffer _bb) { __reset(_i, _bb); } | 37 | 38 | public Model __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } | 38 | 39 |
| 39 | 40 | /** | @@ -50,17 +51,19 @@ public final class Model extends Table { | 50 | 51 | * User controlled version, not really used at the moment | 51 | 52 | */ | 52 | 53 | public long version() { int o = __offset(8); return o != 0 ? bb.getLong(o + bb_pos) : 0L; } | 53 | | - public ModelEntity entities(int j) { return entities(new ModelEntity(), j); } | 54 | | - public ModelEntity entities(ModelEntity obj, int j) { int o = __offset(10); return o != 0 ? obj.__assign(__indirect(__vector(o) + j * 4), bb) : null; } | | 54 | + public io.objectbox.model.ModelEntity entities(int j) { return entities(new io.objectbox.model.ModelEntity(), j); } | | 55 | + public io.objectbox.model.ModelEntity entities(io.objectbox.model.ModelEntity obj, int j) { int o = __offset(10); return o != 0 ? obj.__assign(__indirect(__vector(o) + j * 4), bb) : null; } | 55 | 56 | public int entitiesLength() { int o = __offset(10); return o != 0 ? __vector_len(o) : 0; } | 56 | | - public IdUid lastEntityId() { return lastEntityId(new IdUid()); } | 57 | | - public IdUid lastEntityId(IdUid obj) { int o = __offset(12); return o != 0 ? obj.__assign(o + bb_pos, bb) : null; } | 58 | | - public IdUid lastIndexId() { return lastIndexId(new IdUid()); } | 59 | | - public IdUid lastIndexId(IdUid obj) { int o = __offset(14); return o != 0 ? obj.__assign(o + bb_pos, bb) : null; } | 60 | | - public IdUid lastSequenceId() { return lastSequenceId(new IdUid()); } | 61 | | - public IdUid lastSequenceId(IdUid obj) { int o = __offset(16); return o != 0 ? obj.__assign(o + bb_pos, bb) : null; } | 62 | | - public IdUid lastRelationId() { return lastRelationId(new IdUid()); } | 63 | | - public IdUid lastRelationId(IdUid obj) { int o = __offset(18); return o != 0 ? obj.__assign(o + bb_pos, bb) : null; } | | 57 | + public io.objectbox.model.ModelEntity.Vector entitiesVector() { return entitiesVector(new io.objectbox.model.ModelEntity.Vector()); } | | 58 | + public io.objectbox.model.ModelEntity.Vector entitiesVector(io.objectbox.model.ModelEntity.Vector obj) { int o = __offset(10); return o != 0 ? obj.__assign(__vector(o), 4, bb) : null; } | | 59 | + public io.objectbox.model.IdUid lastEntityId() { return lastEntityId(new io.objectbox.model.IdUid()); } | | 60 | + public io.objectbox.model.IdUid lastEntityId(io.objectbox.model.IdUid obj) { int o = __offset(12); return o != 0 ? obj.__assign(o + bb_pos, bb) : null; } | | 61 | + public io.objectbox.model.IdUid lastIndexId() { return lastIndexId(new io.objectbox.model.IdUid()); } | | 62 | + public io.objectbox.model.IdUid lastIndexId(io.objectbox.model.IdUid obj) { int o = __offset(14); return o != 0 ? obj.__assign(o + bb_pos, bb) : null; } | | 63 | + public io.objectbox.model.IdUid lastSequenceId() { return lastSequenceId(new io.objectbox.model.IdUid()); } | | 64 | + public io.objectbox.model.IdUid lastSequenceId(io.objectbox.model.IdUid obj) { int o = __offset(16); return o != 0 ? obj.__assign(o + bb_pos, bb) : null; } | | 65 | + public io.objectbox.model.IdUid lastRelationId() { return lastRelationId(new io.objectbox.model.IdUid()); } | | 66 | + public io.objectbox.model.IdUid lastRelationId(io.objectbox.model.IdUid obj) { int o = __offset(18); return o != 0 ? obj.__assign(o + bb_pos, bb) : null; } | 64 | 67 |
| 65 | 68 | public static void startModel(FlatBufferBuilder builder) { builder.startTable(8); } | 66 | 69 | public static void addModelVersion(FlatBufferBuilder builder, long modelVersion) { builder.addInt(0, (int)modelVersion, (int)0L); } | @@ -79,5 +82,12 @@ public static int endModel(FlatBufferBuilder builder) { | 79 | 82 | } | 80 | 83 | public static void finishModelBuffer(FlatBufferBuilder builder, int offset) { builder.finish(offset); } | 81 | 84 | public static void finishSizePrefixedModelBuffer(FlatBufferBuilder builder, int offset) { builder.finishSizePrefixed(offset); } | | 85 | + | | 86 | + public static final class Vector extends BaseVector { | | 87 | + public Vector __assign(int _vector, int _element_size, ByteBuffer _bb) { __reset(_vector, _element_size, _bb); return this; } | | 88 | + | | 89 | + public Model get(int j) { return get(new Model(), j); } | | 90 | + public Model get(Model obj, int j) { return obj.__assign(__indirect(__element(j), bb), bb); } | | 91 | + } | 82 | 92 | } | 83 | 93 |
|
Collapse file Copy file name to clipboardExpand all lines: objectbox-java/src/main/java/io/objectbox/model/ModelEntity.java +23-11Lines changed: 23 additions & 11 deletions | Original file line number | Diff line number | Diff line change |
|---|
| 1 | 1 | /* | 2 | | - * Copyright 2019 ObjectBox Ltd. All rights reserved. | | 2 | + * Copyright 2020 ObjectBox Ltd. All rights reserved. | 3 | 3 | * | 4 | 4 | * Licensed under the Apache License, Version 2.0 (the "License"); | 5 | 5 | * you may not use this file except in compliance with the License. | | 25 | 25 |
| 26 | 26 | @SuppressWarnings("unused") | 27 | 27 | public final class ModelEntity extends Table { | | 28 | + public static void ValidateVersion() { Constants.FLATBUFFERS_1_12_0(); } | 28 | 29 | public static ModelEntity getRootAsModelEntity(ByteBuffer _bb) { return getRootAsModelEntity(_bb, new ModelEntity()); } | 29 | | - public static ModelEntity getRootAsModelEntity(ByteBuffer _bb, ModelEntity obj) { Constants.FLATBUFFERS_1_11_1(); _bb.order(ByteOrder.LITTLE_ENDIAN); return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)); } | 30 | | - public void __init(int _i, ByteBuffer _bb) { bb_pos = _i; bb = _bb; vtable_start = bb_pos - bb.getInt(bb_pos); vtable_size = bb.getShort(vtable_start); } | | 30 | + public static ModelEntity getRootAsModelEntity(ByteBuffer _bb, ModelEntity obj) { _bb.order(ByteOrder.LITTLE_ENDIAN); return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)); } | | 31 | + public void __init(int _i, ByteBuffer _bb) { __reset(_i, _bb); } | 31 | 32 | public ModelEntity __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } | 32 | 33 |
| 33 | | - public IdUid id() { return id(new IdUid()); } | 34 | | - public IdUid id(IdUid obj) { int o = __offset(4); return o != 0 ? obj.__assign(o + bb_pos, bb) : null; } | | 34 | + public io.objectbox.model.IdUid id() { return id(new io.objectbox.model.IdUid()); } | | 35 | + public io.objectbox.model.IdUid id(io.objectbox.model.IdUid obj) { int o = __offset(4); return o != 0 ? obj.__assign(o + bb_pos, bb) : null; } | 35 | 36 | public String name() { int o = __offset(6); return o != 0 ? __string(o + bb_pos) : null; } | 36 | 37 | public ByteBuffer nameAsByteBuffer() { return __vector_as_bytebuffer(6, 1); } | 37 | 38 | public ByteBuffer nameInByteBuffer(ByteBuffer _bb) { return __vector_in_bytebuffer(_bb, 6, 1); } | 38 | | - public ModelProperty properties(int j) { return properties(new ModelProperty(), j); } | 39 | | - public ModelProperty properties(ModelProperty obj, int j) { int o = __offset(8); return o != 0 ? obj.__assign(__indirect(__vector(o) + j * 4), bb) : null; } | | 39 | + public io.objectbox.model.ModelProperty properties(int j) { return properties(new io.objectbox.model.ModelProperty(), j); } | | 40 | + public io.objectbox.model.ModelProperty properties(io.objectbox.model.ModelProperty obj, int j) { int o = __offset(8); return o != 0 ? obj.__assign(__indirect(__vector(o) + j * 4), bb) : null; } | 40 | 41 | public int propertiesLength() { int o = __offset(8); return o != 0 ? __vector_len(o) : 0; } | 41 | | - public IdUid lastPropertyId() { return lastPropertyId(new IdUid()); } | 42 | | - public IdUid lastPropertyId(IdUid obj) { int o = __offset(10); return o != 0 ? obj.__assign(o + bb_pos, bb) : null; } | 43 | | - public ModelRelation relations(int j) { return relations(new ModelRelation(), j); } | 44 | | - public ModelRelation relations(ModelRelation obj, int j) { int o = __offset(12); return o != 0 ? obj.__assign(__indirect(__vector(o) + j * 4), bb) : null; } | | 42 | + public io.objectbox.model.ModelProperty.Vector propertiesVector() { return propertiesVector(new io.objectbox.model.ModelProperty.Vector()); } | | 43 | + public io.objectbox.model.ModelProperty.Vector propertiesVector(io.objectbox.model.ModelProperty.Vector obj) { int o = __offset(8); return o != 0 ? obj.__assign(__vector(o), 4, bb) : null; } | | 44 | + public io.objectbox.model.IdUid lastPropertyId() { return lastPropertyId(new io.objectbox.model.IdUid()); } | | 45 | + public io.objectbox.model.IdUid lastPropertyId(io.objectbox.model.IdUid obj) { int o = __offset(10); return o != 0 ? obj.__assign(o + bb_pos, bb) : null; } | | 46 | + public io.objectbox.model.ModelRelation relations(int j) { return relations(new io.objectbox.model.ModelRelation(), j); } | | 47 | + public io.objectbox.model.ModelRelation relations(io.objectbox.model.ModelRelation obj, int j) { int o = __offset(12); return o != 0 ? obj.__assign(__indirect(__vector(o) + j * 4), bb) : null; } | 45 | 48 | public int relationsLength() { int o = __offset(12); return o != 0 ? __vector_len(o) : 0; } | | 49 | + public io.objectbox.model.ModelRelation.Vector relationsVector() { return relationsVector(new io.objectbox.model.ModelRelation.Vector()); } | | 50 | + public io.objectbox.model.ModelRelation.Vector relationsVector(io.objectbox.model.ModelRelation.Vector obj) { int o = __offset(12); return o != 0 ? obj.__assign(__vector(o), 4, bb) : null; } | 46 | 51 | /** | 47 | 52 | * Can be language specific, e.g. if no-args constructor should be used | 48 | 53 | */ | @@ -70,5 +75,12 @@ public static int endModelEntity(FlatBufferBuilder builder) { | 70 | 75 | int o = builder.endTable(); | 71 | 76 | return o; | 72 | 77 | } | | 78 | + | | 79 | + public static final class Vector extends BaseVector { | | 80 | + public Vector __assign(int _vector, int _element_size, ByteBuffer _bb) { __reset(_vector, _element_size, _bb); return this; } | | 81 | + | | 82 | + public ModelEntity get(int j) { return get(new ModelEntity(), j); } | | 83 | + public ModelEntity get(ModelEntity obj, int j) { return obj.__assign(__indirect(__element(j), bb), bb); } | | 84 | + } | 73 | 85 | } | 74 | 86 |
|
Collapse file Copy file name to clipboardExpand all lines: objectbox-java/src/main/java/io/objectbox/model/ModelProperty.java +15-7Lines changed: 15 additions & 7 deletions | Original file line number | Diff line number | Diff line change |
|---|
| 1 | 1 | /* | 2 | | - * Copyright 2019 ObjectBox Ltd. All rights reserved. | | 2 | + * Copyright 2020 ObjectBox Ltd. All rights reserved. | 3 | 3 | * | 4 | 4 | * Licensed under the Apache License, Version 2.0 (the "License"); | 5 | 5 | * you may not use this file except in compliance with the License. | | 25 | 25 |
| 26 | 26 | @SuppressWarnings("unused") | 27 | 27 | public final class ModelProperty extends Table { | | 28 | + public static void ValidateVersion() { Constants.FLATBUFFERS_1_12_0(); } | 28 | 29 | public static ModelProperty getRootAsModelProperty(ByteBuffer _bb) { return getRootAsModelProperty(_bb, new ModelProperty()); } | 29 | | - public static ModelProperty getRootAsModelProperty(ByteBuffer _bb, ModelProperty obj) { Constants.FLATBUFFERS_1_11_1(); _bb.order(ByteOrder.LITTLE_ENDIAN); return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)); } | 30 | | - public void __init(int _i, ByteBuffer _bb) { bb_pos = _i; bb = _bb; vtable_start = bb_pos - bb.getInt(bb_pos); vtable_size = bb.getShort(vtable_start); } | | 30 | + public static ModelProperty getRootAsModelProperty(ByteBuffer _bb, ModelProperty obj) { _bb.order(ByteOrder.LITTLE_ENDIAN); return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)); } | | 31 | + public void __init(int _i, ByteBuffer _bb) { __reset(_i, _bb); } | 31 | 32 | public ModelProperty __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } | 32 | 33 |
| 33 | | - public IdUid id() { return id(new IdUid()); } | 34 | | - public IdUid id(IdUid obj) { int o = __offset(4); return o != 0 ? obj.__assign(o + bb_pos, bb) : null; } | | 34 | + public io.objectbox.model.IdUid id() { return id(new io.objectbox.model.IdUid()); } | | 35 | + public io.objectbox.model.IdUid id(io.objectbox.model.IdUid obj) { int o = __offset(4); return o != 0 ? obj.__assign(o + bb_pos, bb) : null; } | 35 | 36 | public String name() { int o = __offset(6); return o != 0 ? __string(o + bb_pos) : null; } | 36 | 37 | public ByteBuffer nameAsByteBuffer() { return __vector_as_bytebuffer(6, 1); } | 37 | 38 | public ByteBuffer nameInByteBuffer(ByteBuffer _bb) { return __vector_in_bytebuffer(_bb, 6, 1); } | @@ -40,8 +41,8 @@ public final class ModelProperty extends Table { | 40 | 41 | * bit flags: e.g. indexed, not-nullable | 41 | 42 | */ | 42 | 43 | public long flags() { int o = __offset(10); return o != 0 ? (long)bb.getInt(o + bb_pos) & 0xFFFFFFFFL : 0L; } | 43 | | - public IdUid indexId() { return indexId(new IdUid()); } | 44 | | - public IdUid indexId(IdUid obj) { int o = __offset(12); return o != 0 ? obj.__assign(o + bb_pos, bb) : null; } | | 44 | + public io.objectbox.model.IdUid indexId() { return indexId(new io.objectbox.model.IdUid()); } | | 45 | + public io.objectbox.model.IdUid indexId(io.objectbox.model.IdUid obj) { int o = __offset(12); return o != 0 ? obj.__assign(o + bb_pos, bb) : null; } | 45 | 46 | /** | 46 | 47 | * For relations only: name of the target entity | 47 | 48 | */ | @@ -79,5 +80,12 @@ public static int endModelProperty(FlatBufferBuilder builder) { | 79 | 80 | int o = builder.endTable(); | 80 | 81 | return o; | 81 | 82 | } | | 83 | + | | 84 | + public static final class Vector extends BaseVector { | | 85 | + public Vector __assign(int _vector, int _element_size, ByteBuffer _bb) { __reset(_vector, _element_size, _bb); return this; } | | 86 | + | | 87 | + public ModelProperty get(int j) { return get(new ModelProperty(), j); } | | 88 | + public ModelProperty get(ModelProperty obj, int j) { return obj.__assign(__indirect(__element(j), bb), bb); } | | 89 | + } | 82 | 90 | } | 83 | 91 |
|
Collapse file Copy file name to clipboardExpand all lines: objectbox-java/src/main/java/io/objectbox/model/ModelRelation.java +15-7Lines changed: 15 additions & 7 deletions | Original file line number | Diff line number | Diff line change |
|---|
| 1 | 1 | /* | 2 | | - * Copyright 2019 ObjectBox Ltd. All rights reserved. | | 2 | + * Copyright 2020 ObjectBox Ltd. All rights reserved. | 3 | 3 | * | 4 | 4 | * Licensed under the Apache License, Version 2.0 (the "License"); | 5 | 5 | * you may not use this file except in compliance with the License. | | 25 | 25 |
| 26 | 26 | @SuppressWarnings("unused") | 27 | 27 | public final class ModelRelation extends Table { | | 28 | + public static void ValidateVersion() { Constants.FLATBUFFERS_1_12_0(); } | 28 | 29 | public static ModelRelation getRootAsModelRelation(ByteBuffer _bb) { return getRootAsModelRelation(_bb, new ModelRelation()); } | 29 | | - public static ModelRelation getRootAsModelRelation(ByteBuffer _bb, ModelRelation obj) { Constants.FLATBUFFERS_1_11_1(); _bb.order(ByteOrder.LITTLE_ENDIAN); return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)); } | 30 | | - public void __init(int _i, ByteBuffer _bb) { bb_pos = _i; bb = _bb; vtable_start = bb_pos - bb.getInt(bb_pos); vtable_size = bb.getShort(vtable_start); } | | 30 | + public static ModelRelation getRootAsModelRelation(ByteBuffer _bb, ModelRelation obj) { _bb.order(ByteOrder.LITTLE_ENDIAN); return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)); } | | 31 | + public void __init(int _i, ByteBuffer _bb) { __reset(_i, _bb); } | 31 | 32 | public ModelRelation __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } | 32 | 33 |
| 33 | | - public IdUid id() { return id(new IdUid()); } | 34 | | - public IdUid id(IdUid obj) { int o = __offset(4); return o != 0 ? obj.__assign(o + bb_pos, bb) : null; } | | 34 | + public io.objectbox.model.IdUid id() { return id(new io.objectbox.model.IdUid()); } | | 35 | + public io.objectbox.model.IdUid id(io.objectbox.model.IdUid obj) { int o = __offset(4); return o != 0 ? obj.__assign(o + bb_pos, bb) : null; } | 35 | 36 | public String name() { int o = __offset(6); return o != 0 ? __string(o + bb_pos) : null; } | 36 | 37 | public ByteBuffer nameAsByteBuffer() { return __vector_as_bytebuffer(6, 1); } | 37 | 38 | public ByteBuffer nameInByteBuffer(ByteBuffer _bb) { return __vector_in_bytebuffer(_bb, 6, 1); } | 38 | | - public IdUid targetEntityId() { return targetEntityId(new IdUid()); } | 39 | | - public IdUid targetEntityId(IdUid obj) { int o = __offset(8); return o != 0 ? obj.__assign(o + bb_pos, bb) : null; } | | 39 | + public io.objectbox.model.IdUid targetEntityId() { return targetEntityId(new io.objectbox.model.IdUid()); } | | 40 | + public io.objectbox.model.IdUid targetEntityId(io.objectbox.model.IdUid obj) { int o = __offset(8); return o != 0 ? obj.__assign(o + bb_pos, bb) : null; } | 40 | 41 |
| 41 | 42 | public static void startModelRelation(FlatBufferBuilder builder) { builder.startTable(3); } | 42 | 43 | public static void addId(FlatBufferBuilder builder, int idOffset) { builder.addStruct(0, idOffset, 0); } | @@ -46,5 +47,12 @@ public static int endModelRelation(FlatBufferBuilder builder) { | 46 | 47 | int o = builder.endTable(); | 47 | 48 | return o; | 48 | 49 | } | | 50 | + | | 51 | + public static final class Vector extends BaseVector { | | 52 | + public Vector __assign(int _vector, int _element_size, ByteBuffer _bb) { __reset(_vector, _element_size, _bb); return this; } | | 53 | + | | 54 | + public ModelRelation get(int j) { return get(new ModelRelation(), j); } | | 55 | + public ModelRelation get(ModelRelation obj, int j) { return obj.__assign(__indirect(__element(j), bb), bb); } | | 56 | + } | 49 | 57 | } | 50 | 58 |
|
|