Package one.microstream.util.cql
Class CQL
java.lang.Object
one.microstream.util.cql.CQL
public final class CQL extends Object
Collection Query Library
API for fluent query syntax and query instance definition.
-
Method Summary
Modifier and Type Method Description static <I, R> CqlAggregation<I,R>
aggregate(Supplier<R> supplier, BiConsumer<I,R> linker)
static <I, R extends Sortable<I>>
CqlAggregation<I,R>aggregate(Supplier<R> supplier, BiConsumer<I,R> linker, Comparator<? super I> order)
static <I, R> CqlAggregation<I,R>
aggregate(Supplier<R> supplier, BiConsumer<I,R> linker, Consumer<? super R> finalizer)
static <I, R> CqlAggregation<I,R>
aggregate(CqlResultor<I,R> aggregator)
static <I, R> CqlAggregation<I,R>
Aggregation()
static <E> Comparator<? super E>
chain(Comparator<? super E>... comparators)
static <T> Comparator<T>
comparing(Comparator<T> order)
Helper method to make a lambda or method reference expression chainable.static <E, T> Comparator<E>
comparing(Function<E,T> getter, Comparator<T> order)
static <E> XSequence<E>
executeQuery(XIterable<? extends E> source)
static <E, T extends Consumer<? super E>>
TexecuteQuery(XIterable<? extends E> source, T target)
static <I, O, R> R
executeQuery(XIterable<? extends I> source, Long skip, Long limit, Predicate<? super I> selector, Function<? super I,O> projector, CqlResultor<O,R> resultor, Comparator<? super O> order)
static <I, O, P extends Consumer<O>>
PexecuteQuery(XIterable<? extends I> source, Long skip, Long limit, Predicate<? super I> selector, Function<? super I,O> projector, P target, Comparator<? super O> order)
static <I, R> R
executeQuery(XIterable<? extends I> source, Long skip, Long limit, Predicate<? super I> selector, CqlResultor<I,R> resultor, Comparator<? super I> order)
static <I, P extends Consumer<? super I>>
PexecuteQuery(XIterable<? extends I> source, Long skip, Long limit, Predicate<? super I> selector, P target)
static <I, P extends Consumer<I>>
PexecuteQuery(XIterable<? extends I> source, Long skip, Long limit, Predicate<? super I> selector, P target, Comparator<? super I> order)
static <I> CqlSelection<I>
from(XIterable<? extends I> source)
static <I> Function<I,I>
identity()
static <T> boolean
isNotNull(T instance)
static <T> boolean
isNull(T instance)
static <I, O, R extends XIterable<O>>
CqlIteration<I,O,R>Iteration()
static <O> CqlResultor<O,Double>
min(To_double<? super O> getter)
static <T> Predicate<T>
not(Predicate<T> predicate)
Fluent alias forpredicate.negate()
.static <I> XIterable<? extends I>
prepareSource(XIterable<? extends I> source)
static <I> Consumer<I>
prepareSourceIterator(Long skip, Long limit, Consumer<? super I> target)
static <I, O> Consumer<I>
prepareSourceIterator(Long skip, Long limit, Function<? super I,O> projector, Consumer<? super O> target)
static <I> Consumer<I>
prepareSourceIterator(Long skip, Long limit, Predicate<? super I> selector, Consumer<? super I> target)
static <I, O> Consumer<I>
prepareSourceIterator(Long skip, Long limit, Predicate<? super I> selector, Function<? super I,O> projector, Consumer<? super O> target)
static <E> XSequence<E>
prepareTargetCollection(XIterable<?> source)
static <I> CqlProjection<I,Object[]>
project(Function<? super I,Object>... projectors)
static <I, O> CqlProjection<I,O>
project(Function<? super I,O> projector)
static <I, O> CqlProjection<I,O>
Projection()
static <I, O, R> CqlQuery<I,O,R>
Query()
static <O, T extends Consumer<O>>
CqlResultor<O,T>resulting(Supplier<T> supplier)
static <O> CqlResultor<O,BulkList<O>>
resultingBulkList()
static <O> CqlResultor<O,BulkList<O>>
resultingBulkList(int initialCapacity)
static <O> CqlResultor<O,EqHashEnum<O>>
resultingEqHashEnum()
static <O> CqlResultor<O,EqHashEnum<O>>
resultingEqHashEnum(HashEqualator<? super O> hashEqualator)
static <K, V> CqlResultor<KeyValue<K,V>,EqHashTable<K,V>>
resultingEqHashTable()
static <K, V> CqlResultor<KeyValue<K,V>,EqHashTable<K,V>>
resultingEqHashTable(HashEqualator<? super K> hashEqualator)
static <O> CqlResultor<O,HashEnum<O>>
resultingHashEnum()
static <K, V> CqlResultor<KeyValue<K,V>,HashTable<K,V>>
resultingHashTable()
static <O, T extends Consumer<O> & XIterable<O>>
CqlResultor<O,T>resultingIterable(Supplier<T> supplier)
static <O> CqlResultor<O,LimitList<O>>
resultingLimitList(int initialCapacity)
static <T> Comparator<T>
reversed(Comparator<T> order)
Fluent alias forComparator#reversed()
static <I> CqlSelection<I>
select(Predicate<? super I> predicate)
static <I> CqlSelection<I>
Selection()
static <O> CqlResultor<O,Double>
sum(To_double<? super O> getter)
static <I> CqlTransfer<I,XSequence<I>>
Transfer()
static <T> Predicate<T>
where(Predicate<T> predicate)
Helper method to make a lambda or method reference expression chainable.
-
Method Details
-
Selection
-
Transfer
-
Aggregation
-
Projection
-
Iteration
-
Query
-
isNotNull
public static <T> boolean isNotNull(T instance) -
isNull
public static <T> boolean isNull(T instance) -
select
-
aggregate
-
aggregate
public static <I, R> CqlAggregation<I,R> aggregate(Supplier<R> supplier, BiConsumer<I,R> linker) -
aggregate
public static <I, R extends Sortable<I>> CqlAggregation<I,R> aggregate(Supplier<R> supplier, BiConsumer<I,R> linker, Comparator<? super I> order) -
aggregate
public static <I, R> CqlAggregation<I,R> aggregate(Supplier<R> supplier, BiConsumer<I,R> linker, Consumer<? super R> finalizer) -
from
-
project
-
project
@SafeVarargs public static <I> CqlProjection<I,Object[]> project(Function<? super I,Object>... projectors) -
not
Fluent alias forpredicate.negate()
.- Parameters:
predicate
-
-
where
Helper method to make a lambda or method reference expression chainable. They somehow forgot that in the lambda language extension, so it has to be worked around, sadly.- Parameters:
predicate
-
-
reversed
Fluent alias forComparator#reversed()
- Parameters:
order
-
-
comparing
Helper method to make a lambda or method reference expression chainable. They somehow forgot that in the lambda language extension, so it has to be worked around, sadly.- Parameters:
order
-
-
comparing
-
identity
-
prepareSource
-
prepareTargetCollection
-
prepareSourceIterator
-
prepareSourceIterator
-
prepareSourceIterator
-
prepareSourceIterator
-
executeQuery
-
executeQuery
-
executeQuery
-
executeQuery
-
executeQuery
public static <I, R> R executeQuery(XIterable<? extends I> source, Long skip, Long limit, Predicate<? super I> selector, CqlResultor<I,R> resultor, Comparator<? super I> order) -
executeQuery
public static <I, O, R> R executeQuery(XIterable<? extends I> source, Long skip, Long limit, Predicate<? super I> selector, Function<? super I,O> projector, CqlResultor<O,R> resultor, Comparator<? super O> order) -
executeQuery
-
resulting
-
resultingIterable
public static <O, T extends Consumer<O> & XIterable<O>> CqlResultor<O,T> resultingIterable(Supplier<T> supplier) -
resultingBulkList
-
resultingBulkList
-
resultingLimitList
-
resultingHashEnum
-
resultingEqHashEnum
-
resultingEqHashEnum
public static <O> CqlResultor<O,EqHashEnum<O>> resultingEqHashEnum(HashEqualator<? super O> hashEqualator) -
resultingHashTable
-
resultingEqHashTable
-
resultingEqHashTable
public static <K, V> CqlResultor<KeyValue<K,V>,EqHashTable<K,V>> resultingEqHashTable(HashEqualator<? super K> hashEqualator) -
sum
-
min
-
chain
@SafeVarargs public static final <E> Comparator<? super E> chain(Comparator<? super E>... comparators)
-