Package com.codingchili.core.storage
Class IndexedMapQuery<Value extends Storable>
java.lang.Object
com.codingchili.core.storage.AbstractQueryBuilder<Value>
com.codingchili.core.storage.IndexedMapQuery<Value>
- Type Parameters:
Value
- the value that is being queried.
- All Implemented Interfaces:
QueryBuilder<Value>
Common query class used for disk persisted storage and in-memory indexed.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionAdds a new AND clause to the query.Matches documents with the attribute between and including minimum and maximum.equalTo(Comparable match)
Matches if the attribute is an exact match to the given text.void
execute(io.vertx.core.Handler<io.vertx.core.AsyncResult<Collection<Value>>> handler)
Executes the constructed query asynchronously.in(Comparable... list)
Matches if a specified attribute is contained within the given listMatches documents where the attribute containst the given textChecks if the given attribute matches the given regex.The attribute to be queried.Adds a new OR clause to the query.startsWith(String text)
Matches if the specified attribute starts with the given textMethods inherited from class com.codingchili.core.storage.AbstractQueryBuilder
attribute, getArrayNotation, getAttribute, getName, getOrderByAttribute, getPage, getPageSize, getSortOrder, isAttributeArray, isOrdered, name, order, orderBy, page, pageSize, poll, setAttribute, setName
-
Constructor Details
-
IndexedMapQuery
-
-
Method Details
-
on
Description copied from interface:QueryBuilder
The attribute to be queried.- Specified by:
on
in interfaceQueryBuilder<Value extends Storable>
- Overrides:
on
in classAbstractQueryBuilder<Value extends Storable>
- Parameters:
attribute
- the name of the queried attribute.- Returns:
- fluent
-
and
Description copied from interface:QueryBuilder
Adds a new AND clause to the query.- Parameters:
attribute
- the name of the attribute to be queried.- Returns:
- fluent
-
or
Description copied from interface:QueryBuilder
Adds a new OR clause to the query.- Parameters:
attribute
- the name of the attribute to be queried.- Returns:
- fluent
-
between
Description copied from interface:QueryBuilder
Matches documents with the attribute between and including minimum and maximum.- Parameters:
minimum
- the minimum value to matchmaximum
- the maximum value to match- Returns:
- fluent
-
like
Description copied from interface:QueryBuilder
Matches documents where the attribute containst the given text- Parameters:
text
- the text to check if contained.- Returns:
- fluent
-
startsWith
Description copied from interface:QueryBuilder
Matches if the specified attribute starts with the given text- Parameters:
text
- the text to check if starting with.- Returns:
- fluent
-
in
Description copied from interface:QueryBuilder
Matches if a specified attribute is contained within the given list- Parameters:
list
- the list that the attribute value must be contained in to match.- Returns:
- fluent
-
equalTo
Description copied from interface:QueryBuilder
Matches if the attribute is an exact match to the given text.- Parameters:
match
- the text that should be equal to the specified attribute.- Returns:
- fluent
-
matches
Description copied from interface:QueryBuilder
Checks if the given attribute matches the given regex. Be careful when passing user input to this method. No complexity restrictions are applied. To pass user input use equals instead. If a query can use any non-regex constraint, it is recommended to use that instead.- Parameters:
regex
- the regular expression in which the attribute is to match- Returns:
- fluent
-
execute
Description copied from interface:QueryBuilder
Executes the constructed query asynchronously.- Parameters:
handler
- the handler to be invoked when the result is completed.
-
setMapper
-