Skip to content

Commit 193dbb2

Browse files
committed
JavaDocs for findStrings* methods
1 parent 5e05508 commit 193dbb2

1 file changed

Lines changed: 21 additions & 0 deletions

File tree

  • objectbox-java/src/main/java/io/objectbox/query

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

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -239,6 +239,17 @@ public LazyList<T> findLazy() {
239239
return new LazyList<>(box, findIds(), false);
240240
}
241241

242+
// TODO we might move all those property find methods in a "PropertyQuery" class for divide & conquer.
243+
244+
/**
245+
* Find the values for the given string property for objects matching the query.
246+
* <p>
247+
* Note: this will list all strings (except null values), which may contain duplicates.
248+
* Check {@link #findStringsUnique(Property, QueryBuilder.StringOrder)} to avoid duplicates.
249+
*
250+
* @param property the property (must be of type String) for which to return values
251+
* @return Found strings
252+
*/
242253
public String[] findStrings(final Property property) {
243254
return callInReadTx(new Callable<String[]>() {
244255
@Override
@@ -249,10 +260,20 @@ public String[] call() {
249260
});
250261
}
251262

263+
/** Case-insensitive short-hand for {@link #findStringsUnique(Property, QueryBuilder.StringOrder)}. */
252264
public String[] findStringsUnique(final Property property) {
253265
return findStringsUnique(property, QueryBuilder.StringOrder.CASE_INSENSITIVE);
254266
}
255267

268+
/**
269+
* Find the unique values for the given string property for objects matching the query.
270+
* <p>
271+
* Note: the order of returned strings may be completely random.
272+
*
273+
* @param property the property (must be of type String) for which to return values
274+
* @param stringOrder e.g. case sensitive/insensitive
275+
* @return Found strings
276+
*/
256277
public String[] findStringsUnique(final Property property, final QueryBuilder.StringOrder stringOrder) {
257278
return callInReadTx(new Callable<String[]>() {
258279
@Override

0 commit comments

Comments
 (0)