Class TestDoubleQuery<T,Z extends CrudRepository.InlineQuery<T,Z>>  
- All Implemented Interfaces:
- CrudRepository.InlineQuery<T,- Z> 
- Direct Known Subclasses:
- TestDoubleQuery
- 
Field SummaryFieldsModifier and TypeFieldDescriptionprotected booleanprotected final GenericFactoryprotected final TestDoubleIndexprotected Integerprotected final MappingHelperprotected intprotected final List<Comparator<T>>protected final TestDoubleStore<Object,T> protected final TestDoubleDbFields inherited from class io.ran.CrudRepoBaseQueryclazz, genericFactory, instance, queryWrapper, typeDescriber
- 
Constructor SummaryConstructorsConstructorDescriptionTestDoubleQuery(Class<T> modelType, GenericFactory genericFactory, MappingHelper mappingHelper, TestDoubleDb testDoubleDb) 
- 
Method SummaryModifier and TypeMethodDescriptionMatch if all the sub-conditions match.longcount()Count the number of rows that match the query.delete()Delete all entries that match the query.<X> Stream<X>eq(Property.PropertyValue<?> propertyValue) execute()Execute the query and return the results as aStream.protected abstract Z<X extends Comparable<? super X>>
 Zgt(Property.PropertyValue<X> propertyValue) <X extends Comparable<? super X>>
 Zgte(Property.PropertyValue<X> propertyValue) limit(int limit) Limit the results to the given number of rows.limit(int offset, int limit) Limit the results to the given number of rows, starting at the given offset.<X extends Comparable<? super X>>
 Zlt(Property.PropertyValue<X> propertyValue) <X extends Comparable<? super X>>
 Zlte(Property.PropertyValue<X> propertyValue) notEq(Property.PropertyValue<?> propertyValue) Match if any of the sub-conditions match.<X> Stream<X>selectField(Property<X> property) <X extends Comparable<? super X>>
 ZsortAscending(Property<X> property) <X extends Comparable<? super X>>
 ZsortDescending(Property<X> property) <X,Y extends CrudRepository.InlineQuery<X, Y>> 
 ZsubQuery(RelationDescriber relationDescriber, Consumer<Y> consumer) withEager(RelationDescriber relationDescriber) Methods inherited from class io.ran.CrudRepoBaseQuerydistinct, eq, eq, gt, gt, gte, gte, isNull, isNull, lt, lt, lte, lte, notEq, notEq, selectField, sortAscending, sortAscending, sortDescending, sortDescending, withEager, withEagerMethods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.ran.CrudRepository.InlineQuerydistinct, eq, eq, gt, gt, gte, gte, isNull, isNull, lt, lt, lte, lte, notEq, notEq, selectField, sortAscending, sortAscending, sortDescending, sortDescending, withEager, withEager
- 
Field Details- 
filters
- 
indexLookups
- 
sorts
- 
mappingHelper
- 
testDoubleDb
- 
store
- 
index
- 
factory
- 
offsetprotected int offset
- 
limit
- 
delayLimitprotected boolean delayLimit
 
- 
- 
Constructor Details- 
TestDoubleQuerypublic TestDoubleQuery(Class<T> modelType, GenericFactory genericFactory, MappingHelper mappingHelper, TestDoubleDb testDoubleDb) 
 
- 
- 
Method Details- 
andDescription copied from interface:CrudRepository.InlineQueryMatch if all the sub-conditions match. The conditions in your sub query will be AND-ed together. Since this is the default behavior, this method is intended to be used insideCrudRepository.InlineQuery.or(Consumer).Example: 
 Will result into the following SQL:query.or(or -> or.eq(Person::getName, "Mike").and(and -> and.eq(Person::getName, "Bob").eq(Person::getAge, 42)));WHERE (name = 'Mike' OR (name = 'Bob' AND age = 42))- Specified by:
- andin interface- CrudRepository.InlineQuery<T,- Z extends CrudRepository.InlineQuery<T, - Z>> 
- Parameters:
- subQuery- the sub query to be inside the AND statement
- Returns:
- the query, for chaining
 
- 
orDescription copied from interface:CrudRepository.InlineQueryMatch if any of the sub-conditions match. The conditions in your sub query will be OR-ed together.Example: 
 Will result into the following SQL:query.or(sub -> sub.eq(Person::getName, "Bob").eq(Person::getAge, 42));WHERE (name = 'Bob' OR age = 42)- Specified by:
- orin interface- CrudRepository.InlineQuery<T,- Z extends CrudRepository.InlineQuery<T, - Z>> 
- Parameters:
- subQuery- the sub query to be inside the OR statement
- Returns:
- the query, for chaining
 
- 
eq- Specified by:
- eqin interface- CrudRepository.InlineQuery<T,- Z extends CrudRepository.InlineQuery<T, - Z>> 
 
- 
notEq- Specified by:
- notEqin interface- CrudRepository.InlineQuery<T,- Z extends CrudRepository.InlineQuery<T, - Z>> 
 
- 
gt- Specified by:
- gtin interface- CrudRepository.InlineQuery<T,- Z extends CrudRepository.InlineQuery<T, - Z>> 
 
- 
gte- Specified by:
- gtein interface- CrudRepository.InlineQuery<T,- Z extends CrudRepository.InlineQuery<T, - Z>> 
 
- 
lt- Specified by:
- ltin interface- CrudRepository.InlineQuery<T,- Z extends CrudRepository.InlineQuery<T, - Z>> 
 
- 
lte- Specified by:
- ltein interface- CrudRepository.InlineQuery<T,- Z extends CrudRepository.InlineQuery<T, - Z>> 
 
- 
isNull- Specified by:
- isNullin interface- CrudRepository.InlineQuery<T,- Z extends CrudRepository.InlineQuery<T, - Z>> 
 
- 
withEager- Specified by:
- withEagerin interface- CrudRepository.InlineQuery<T,- Z extends CrudRepository.InlineQuery<T, - Z>> 
 
- 
sortAscending- Specified by:
- sortAscendingin interface- CrudRepository.InlineQuery<T,- Z extends CrudRepository.InlineQuery<T, - Z>> 
 
- 
sortDescending- Specified by:
- sortDescendingin interface- CrudRepository.InlineQuery<T,- Z extends CrudRepository.InlineQuery<T, - Z>> 
 
- 
limitDescription copied from interface:CrudRepository.InlineQueryLimit the results to the given number of rows, starting at the given offset.Offset is 0-based (the first row is 0). Offset is inclusive, limit is the size of the returned collection. Example: query.limit(10, 20)This will return rows 10, 11, 12, ..., 29. - Specified by:
- limitin interface- CrudRepository.InlineQuery<T,- Z extends CrudRepository.InlineQuery<T, - Z>> 
- Parameters:
- offset- the offset to start at
- limit- the number of rows to return
- Returns:
- the query, for chaining
- See Also:
 
- 
limitDescription copied from interface:CrudRepository.InlineQueryLimit the results to the given number of rows.Example: query.limit(10)This will return the first 10 rows. - Specified by:
- limitin interface- CrudRepository.InlineQuery<T,- Z extends CrudRepository.InlineQuery<T, - Z>> 
- Parameters:
- limit- the number of rows to return
- Returns:
- the query, for chaining
- See Also:
 
- 
subQuerypublic <X,Y extends CrudRepository.InlineQuery<X, Z subQueryY>> (RelationDescriber relationDescriber, Consumer<Y> consumer) - Specified by:
- subQueryin interface- CrudRepository.InlineQuery<T,- Z extends CrudRepository.InlineQuery<T, - Z>> 
 
- 
getQuery
- 
executeDescription copied from interface:CrudRepository.InlineQueryExecute the query and return the results as aStream.This is a terminal operation. As such, the query should not be reused after this method is called. The resulting Streamfrom the operation may be a lazy stream, meaning that the results are not fetched from the database until they are accessed. As such it is important that a terminal operation is performed on the stream within a reasonable time frame to avoid holding database connections open.- Specified by:
- executein interface- CrudRepository.InlineQuery<T,- Z extends CrudRepository.InlineQuery<T, - Z>> 
- Returns:
- a Streamof the results
 
- 
executeInternal
- 
countpublic long count()Description copied from interface:CrudRepository.InlineQueryCount the number of rows that match the query.This is a terminal operation. As such, the query should not be reused after this method is called. - Specified by:
- countin interface- CrudRepository.InlineQuery<T,- Z extends CrudRepository.InlineQuery<T, - Z>> 
- Returns:
- the number of rows that match the query
 
- 
distinct- Specified by:
- distinctin interface- CrudRepository.InlineQuery<T,- Z extends CrudRepository.InlineQuery<T, - Z>> 
 
- 
selectField- Specified by:
- selectFieldin interface- CrudRepository.InlineQuery<T,- Z extends CrudRepository.InlineQuery<T, - Z>> 
 
- 
deleteDescription copied from interface:CrudRepository.InlineQueryDelete all entries that match the query.This is a terminal operation. As such, the query should not be reused after this method is called. WARNING: If you invoke no query methods prior to this, all rows in the table with be deleted. - Specified by:
- deletein interface- CrudRepository.InlineQuery<T,- Z extends CrudRepository.InlineQuery<T, - Z>> 
- Returns:
- a CrudRepository.CrudUpdateResultwith the number of rows affected
- See Also:
 
 
-