Package one.microstream.util.cql
Class CQL
- java.lang.Object
-
- one.microstream.util.cql.CQL
-
public final class CQL extends Object
Collection Query LibraryAPI for fluent query syntax and query instance definition.
-
-
Constructor Summary
Constructors Constructor Description CQL()
-
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>
RexecuteQuery(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>
RexecuteQuery(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 Detail
-
Selection
public static <I> CqlSelection<I> Selection()
-
Transfer
public static <I> CqlTransfer<I,XSequence<I>> Transfer()
-
Aggregation
public static <I,R> CqlAggregation<I,R> Aggregation()
-
Projection
public static <I,O> CqlProjection<I,O> Projection()
-
Iteration
public static <I,O,R extends XIterable<O>> CqlIteration<I,O,R> Iteration()
-
Query
public static <I,O,R> CqlQuery<I,O,R> Query()
-
isNotNull
public static <T> boolean isNotNull(T instance)
-
isNull
public static <T> boolean isNull(T instance)
-
select
public static <I> CqlSelection<I> select(Predicate<? super I> predicate)
-
aggregate
public static <I,R> CqlAggregation<I,R> aggregate(CqlResultor<I,R> aggregator)
-
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
public static <I> CqlSelection<I> from(XIterable<? extends I> source)
-
project
public static <I,O> CqlProjection<I,O> project(Function<? super I,O> projector)
-
project
@SafeVarargs public static <I> CqlProjection<I,Object[]> project(Function<? super I,Object>... projectors)
-
not
public static <T> Predicate<T> not(Predicate<T> predicate)
Fluent alias forpredicate.negate()
.- Parameters:
predicate
-
-
where
public static <T> Predicate<T> where(Predicate<T> predicate)
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
public static <T> Comparator<T> reversed(Comparator<T> order)
Fluent alias forComparator#reversed()
- Parameters:
order
-
-
comparing
public static <T> Comparator<T> comparing(Comparator<T> order)
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
public static <E,T> Comparator<E> comparing(Function<E,T> getter, Comparator<T> order)
-
identity
public static <I> Function<I,I> identity()
-
prepareSource
public static <I> XIterable<? extends I> prepareSource(XIterable<? extends I> source)
-
prepareTargetCollection
public static <E> XSequence<E> prepareTargetCollection(XIterable<?> source)
-
prepareSourceIterator
public static <I> Consumer<I> prepareSourceIterator(Long skip, Long limit, Predicate<? super I> selector, Consumer<? super I> target)
-
prepareSourceIterator
public static <I> Consumer<I> prepareSourceIterator(Long skip, Long limit, Consumer<? super I> target)
-
prepareSourceIterator
public static <I,O> Consumer<I> prepareSourceIterator(Long skip, Long limit, Predicate<? super I> selector, Function<? super I,O> projector, Consumer<? super O> target)
-
prepareSourceIterator
public static <I,O> Consumer<I> prepareSourceIterator(Long skip, Long limit, Function<? super I,O> projector, Consumer<? super O> target)
-
executeQuery
public static <E,T extends Consumer<? super E>> T executeQuery(XIterable<? extends E> source, T target)
-
executeQuery
public static <I,P extends Consumer<? super I>> P executeQuery(XIterable<? extends I> source, Long skip, Long limit, Predicate<? super I> selector, P target)
-
executeQuery
public static <I,P extends Consumer<I>> P executeQuery(XIterable<? extends I> source, Long skip, Long limit, Predicate<? super I> selector, P target, Comparator<? super I> order)
-
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
public static <I,O,P extends Consumer<O>> P executeQuery(XIterable<? extends I> source, Long skip, Long limit, Predicate<? super I> selector, Function<? super I,O> projector, P target, Comparator<? super O> order)
-
resulting
public static <O,T extends Consumer<O>> CqlResultor<O,T> resulting(Supplier<T> supplier)
-
resultingIterable
public static <O,T extends Consumer<O> & XIterable<O>> CqlResultor<O,T> resultingIterable(Supplier<T> supplier)
-
resultingBulkList
public static <O> CqlResultor<O,BulkList<O>> resultingBulkList()
-
resultingBulkList
public static <O> CqlResultor<O,BulkList<O>> resultingBulkList(int initialCapacity)
-
resultingLimitList
public static <O> CqlResultor<O,LimitList<O>> resultingLimitList(int initialCapacity)
-
resultingHashEnum
public static <O> CqlResultor<O,HashEnum<O>> resultingHashEnum()
-
resultingEqHashEnum
public static <O> CqlResultor<O,EqHashEnum<O>> resultingEqHashEnum()
-
resultingEqHashEnum
public static <O> CqlResultor<O,EqHashEnum<O>> resultingEqHashEnum(HashEqualator<? super O> hashEqualator)
-
resultingHashTable
public static <K,V> CqlResultor<KeyValue<K,V>,HashTable<K,V>> resultingHashTable()
-
resultingEqHashTable
public static <K,V> CqlResultor<KeyValue<K,V>,EqHashTable<K,V>> resultingEqHashTable()
-
resultingEqHashTable
public static <K,V> CqlResultor<KeyValue<K,V>,EqHashTable<K,V>> resultingEqHashTable(HashEqualator<? super K> hashEqualator)
-
sum
public static <O> CqlResultor<O,Double> sum(To_double<? super O> getter)
-
min
public static <O> CqlResultor<O,Double> min(To_double<? super O> getter)
-
chain
@SafeVarargs public static final <E> Comparator<? super E> chain(Comparator<? super E>... comparators)
-
-