only field prefixes returned instead of full values

When using autocomplete to return field values I
missed, that autocomplete had the feature that cut
values at dots. So instead of returning full field
values only the prefix up to the first dot was
returned.
Fixed by making the cut-at-dot feature optional.
This commit is contained in:
2019-08-27 20:37:07 +02:00
parent a174ec21ad
commit 4161cd7f98
5 changed files with 146 additions and 38 deletions

View File

@@ -2,11 +2,18 @@ package org.lucares.pdb.api;
public class QueryWithCaretMarker extends Query implements QueryConstants {
private final int caretIndex;
public enum ResultMode {
CUT_AT_DOT, FULL_VALUES
}
public QueryWithCaretMarker(final String query, final DateTimeRange dateRange, final int caretIndex) {
private final int caretIndex;
private final ResultMode resultMode;
public QueryWithCaretMarker(final String query, final DateTimeRange dateRange, final int caretIndex,
final ResultMode resultMode) {
super(query, dateRange);
this.caretIndex = caretIndex;
this.resultMode = resultMode;
}
public String getQueryWithCaretMarker() {
@@ -15,4 +22,8 @@ public class QueryWithCaretMarker extends Query implements QueryConstants {
return queryWithCaretMarker.toString();
}
public ResultMode getResultMode() {
return resultMode;
}
}