Skip to content

Commit 29c60a7

Browse files
Query/QueryPublisher: drop unused hasOrder property.
Introduced with `9bb3dc74 Query.findLazy() returns LazyList` (28.01.2017) , but no longer used since `48aca681 findIds: drop no-order requirement, add offset/limit variant` (27.12.2018).
1 parent 5044123 commit 29c60a7

File tree

2 files changed

+2
-7
lines changed

2 files changed

+2
-7
lines changed

objectbox-java/src/main/java/io/objectbox/query/Query.java

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,6 @@ native void nativeSetParameter(long handle, int entityId, int propertyId, @Nulla
9090

9191
final Box<T> box;
9292
private final BoxStore store;
93-
private final boolean hasOrder;
9493
private final QueryPublisher<T> publisher;
9594
private final List<EagerRelation> eagerRelations;
9695
private final QueryFilter<T> filter;
@@ -100,13 +99,12 @@ native void nativeSetParameter(long handle, int entityId, int propertyId, @Nulla
10099

101100
long handle;
102101

103-
Query(Box<T> box, long queryHandle, boolean hasOrder, List<EagerRelation> eagerRelations, QueryFilter<T> filter,
102+
Query(Box<T> box, long queryHandle, List<EagerRelation> eagerRelations, QueryFilter<T> filter,
104103
Comparator<T> comparator) {
105104
this.box = box;
106105
store = box.getStore();
107106
queryAttempts = store.internalQueryAttempts();
108107
handle = queryHandle;
109-
this.hasOrder = hasOrder;
110108
publisher = new QueryPublisher<>(this, box);
111109
this.eagerRelations = eagerRelations;
112110
this.filter = filter;

objectbox-java/src/main/java/io/objectbox/query/QueryBuilder.java

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -91,8 +91,6 @@ enum Operator {
9191

9292
private long handle;
9393

94-
private boolean hasOrder;
95-
9694
private long lastCondition;
9795
private Operator combineNextWith = Operator.NONE;
9896

@@ -215,7 +213,7 @@ public Query<T> build() {
215213
throw new IllegalStateException("Incomplete logic condition. Use or()/and() between two conditions only.");
216214
}
217215
long queryHandle = nativeBuild(handle);
218-
Query<T> query = new Query<>(box, queryHandle, hasOrder, eagerRelations, filter, comparator);
216+
Query<T> query = new Query<>(box, queryHandle, eagerRelations, filter, comparator);
219217
close();
220218
return query;
221219
}
@@ -281,7 +279,6 @@ public QueryBuilder<T> order(Property<T> property, int flags) {
281279
"An operator is pending. Use operators like and() and or() only between two conditions.");
282280
}
283281
nativeOrder(handle, property.getId(), flags);
284-
hasOrder = true;
285282
return this;
286283
}
287284

0 commit comments

Comments
 (0)