public interface CollectionSearchQuery extends SearchQuery
Modifier and Type | Interface and Description |
---|---|
static class |
CollectionSearchQuery.AllCollapsedEntries |
static class |
CollectionSearchQuery.AllDeselectedEntries |
static class |
CollectionSearchQuery.AllExpandedEntries |
static class |
CollectionSearchQuery.AllSelectedEntries |
static interface |
CollectionSearchQuery.BasicCollectionEntryProcessor |
static interface |
CollectionSearchQuery.CollectionEntryProcessor<T>
Builder interface that takes the collection entries and
produces a result.
|
static class |
CollectionSearchQuery.ExpandedEntries |
static class |
CollectionSearchQuery.ExpandMode |
static class |
CollectionSearchQuery.MultiColumnLookupKey |
static class |
CollectionSearchQuery.SelectedEntries |
static class |
CollectionSearchQuery.SelectMode |
static class |
CollectionSearchQuery.SingleColumnLookupKey |
CollectionSearchQuery startAtFirstEntry()
CollectionSearchQuery startAtEntryId(int noteId)
noteId
- note idCollectionSearchQuery startAtPosition(String pos)
pos
- position string, e.g. "1.2.1"CollectionSearchQuery startAtLastEntry()
CollectionSearchQuery startAtCategory(String category)
category
- category, use "\" for multiple category levelsCollectionSearchQuery startAtCategory(List<Object> categoryLevels)
categoryLevels
- different levels of category values, supports strings and TemporalAccessor
objectsCollectionSearchQuery expand(CollectionSearchQuery.ExpandedEntries expandedEntries)
expandedEntries
- use CollectionSearchQuery.ExpandedEntries.expandAll()
or CollectionSearchQuery.ExpandedEntries.collapseAll()
to start building this objectCollectionSearchQuery select(CollectionSearchQuery.SelectedEntries selectedEntries)
selectedEntries
- use CollectionSearchQuery.SelectedEntries.selectAll()
or CollectionSearchQuery.SelectedEntries.deselectAll()
to start building this objectCollectionSearchQuery selectByKey(String key, boolean exact)
select(SelectedEntries)
with
CollectionSearchQuery.SelectedEntries.deselectAll()
and CollectionSearchQuery.AllDeselectedEntries.selectByKey(String, boolean)
.key
- lookup keyexact
- true for exact match, false for prefix searchCollectionSearchQuery selectByKey(List<Object> key, boolean exact)
select(SelectedEntries)
with
CollectionSearchQuery.SelectedEntries.selectAll()
and CollectionSearchQuery.AllSelectedEntries.deselectByKey(List, boolean)
.key
- lookup keyexact
- true for exact match, false for prefix searchCollectionSearchQuery deselectByKey(String key, boolean exact)
select(SelectedEntries)
with
CollectionSearchQuery.SelectedEntries.selectAll()
and CollectionSearchQuery.AllSelectedEntries.deselectByKey(String, boolean)
.key
- lookup keyexact
- true for exact match, false for prefix searchCollectionSearchQuery deselectByKey(List<Object> key, boolean exact)
select(SelectedEntries)
with
CollectionSearchQuery.SelectedEntries.deselectAll()
and CollectionSearchQuery.AllDeselectedEntries.selectByKey(List, boolean)
.key
- lookup keyexact
- true for exact match, false for prefix searchCollectionSearchQuery direction(Navigate mode)
mode
- modeCollectionSearchQuery readColumnValues()
TypedAccess.get(String, Class, Object)
or
TypedAccess.getAsList(String, Class, List)
.CollectionSearchQuery readUNID()
<T> T build(int skip, int count, CollectionSearchQuery.CollectionEntryProcessor<T> processor)
T
- result typeskip
- paging offsetcount
- paging countprocessor
- builder code to produce the resultdefault void forEach(CollectionSearchQuery.BasicCollectionEntryProcessor processor)
This is equivalent to calling build(int, int, CollectionEntryProcessor)
with
a processor that performs no action on start/end and returns no value.
processor
- the processor to execute on each entrySet<Integer> collectIds(int skip, int count)
Set
.
Implementations are likely, but not guaranteed, to return a LinkedHashSet
.
skip
- paging offsetcount
- paging countvoid collectIds(int skip, int count, Collection<Integer> idTable)
IDTable
skip
- paging offsetcount
- paging countidTable
- note ID collectionList<CollectionEntry> collectEntries(int skip, int count)
CollectionEntry
objects as listskip
- paging offsetcount
- paging countdefault Optional<CollectionEntry> firstEntry()
CollectionEntry
Optional
describing the first entry,
or an empty Optional
if there are no
matched entriesdefault Optional<Integer> firstId()
CollectionEntry
Optional
describing the first entry's note ID,
or an empty Optional
if there are no
matched entriesvoid collectEntries(int skip, int count, Collection<CollectionEntry> collection)
CollectionEntry
objects in a Collection
skip
- the number of entries to skip when collectingcount
- the maximum number of entries to collectcollection
- collection to add entriesint size()
CollectionSearchQuery readSpecialValues(CollectionEntry.SpecialValue... values)
values
- special valuesCollectionSearchQuery readSpecialValues(Collection<CollectionEntry.SpecialValue> values)
values
- special valuesCollectionSearchQuery readDocumentClass()
void forEachDocument(int skip, int count, BiConsumer<Document,Loop> consumer)
Copyright © 2019–2021 HCL. All rights reserved.