Class ValqueriesQueryImpl<T>
- All Implemented Interfaces:
- ValqueriesGroupQuery<T>,- ValqueriesQuery<T>,- Setter,- CrudRepository.InlineQuery<T,,- ValqueriesQuery<T>> - AutoCloseable
- 
Field SummaryFields inherited from class com.valqueries.automapper.BaseValqueriesQuerygroupByPropertiesFields inherited from class io.ran.CrudRepoBaseQueryclazz, instance, queryWrapper, typeDescriber
- 
Constructor SummaryConstructorsConstructorDescriptionValqueriesQueryImpl(ITransactionContext transactionContext, Class<T> modelType, GenericFactory genericFactory, MappingHelper mappingHelper, SqlDialect dialect) 
- 
Method SummaryModifier and TypeMethodDescriptionand(Consumer<ValqueriesQuery<T>> subQuery) Match if all the sub-conditions match.buildSimpleSelectSql(String tableAlias, String where, Collection<String> columns) voidclose()protected voidlongcount()Count the number of rows that match the query.protected voiddelete()Delete all entries that match the query.<X> Stream<X>eq(Property.PropertyValue<?> propertyValue) execute()Execute the query and return the results as aStream.<X> Stream<X>executeSqlAndGetSingleColumn(Property<X> property, String sql) freetext(Property.PropertyValue<String> propertyValue) getTableName(Clazz<?> toClass) Execute the query.<X extends Comparable<? super X>>
 ValqueriesQuery<T>gt(Property.PropertyValue<X> propertyValue) <X extends Comparable<? super X>>
 ValqueriesQuery<T>gte(Property.PropertyValue<X> propertyValue) in(Property.PropertyValueList<?> propertyValues) like(Property.PropertyValue<String> 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>>
 ValqueriesQuery<T>lt(Property.PropertyValue<X> propertyValue) <X extends Comparable<? super X>>
 ValqueriesQuery<T>lte(Property.PropertyValue<X> propertyValue) protected <X extends Comparable<? super X>>
 voidprotected <X extends Comparable<? super X>>
 voidnotEq(Property.PropertyValue<?> property) notIn(Property.PropertyValueList<?> propertyValues) notLike(Property.PropertyValue<String> propertyValue) or(Consumer<ValqueriesQuery<T>> subQuery) Match if any of the sub-conditions match.<X> Stream<X>selectField(Property<X> property) voidset(IStatement statement) voidsetEmpty()<X extends Comparable<? super X>>
 ValqueriesQuery<T>sortAscending(Property<X> property) <X extends Comparable<? super X>>
 ValqueriesQuery<T>sortDescending(Property<X> property) <X,Z extends CrudRepository.InlineQuery<X, Z>> 
 ValqueriesQuery<T>subQuery(RelationDescriber relation, Consumer<Z> consumer) protected voidupdate(Consumer<ValqueriesUpdate<T>> updater) withEager(RelationDescriber relation) Methods inherited from class com.valqueries.automapper.BaseValqueriesQueryaggregateAll, concat, concat, count, count, distinct, freetext, freetext, groupBy, groupBy, in, in, in, in, isNotNull, isNotNull, like, like, max, max, min, min, notIn, notIn, notIn, notIn, notLike, notLike, selectField, subQuery, subQuery, subQueryList, subQueryList, subQueryList, sum, sumMethods inherited from class io.ran.CrudRepoBaseQueryeq, eq, gt, gt, gte, gte, isNull, isNull, lt, lt, lte, lte, notEq, notEq, 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, withEagerMethods inherited from interface com.valqueries.automapper.ValqueriesQueryaggregateAll, freetext, freetext, groupBy, groupBy, in, in, in, in, isNotNull, isNotNull, like, like, notIn, notIn, notIn, notIn, notLike, notLike, subQuery, subQuery, subQueryList, subQueryList, subQueryList
- 
Constructor Details- 
ValqueriesQueryImplpublic ValqueriesQueryImpl(ITransactionContext transactionContext, Class<T> modelType, GenericFactory genericFactory, MappingHelper mappingHelper, SqlDialect dialect) 
 
- 
- 
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,- ValqueriesQuery<T>> 
- 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,- ValqueriesQuery<T>> 
- Parameters:
- subQuery- the sub query to be inside the OR statement
- Returns:
- the query, for chaining
 
- 
eq- Specified by:
- eqin interface- CrudRepository.InlineQuery<T,- ValqueriesQuery<T>> 
 
- 
notEq- Specified by:
- notEqin interface- CrudRepository.InlineQuery<T,- ValqueriesQuery<T>> 
 
- 
in- Specified by:
- inin interface- ValqueriesQuery<T>
- Specified by:
- inin class- BaseValqueriesQuery<T>
 
- 
notIn- Specified by:
- notInin interface- ValqueriesQuery<T>
- Specified by:
- notInin class- BaseValqueriesQuery<T>
 
- 
like- Specified by:
- likein interface- ValqueriesQuery<T>
- Specified by:
- likein class- BaseValqueriesQuery<T>
 
- 
notLike- Specified by:
- notLikein interface- ValqueriesQuery<T>
- Specified by:
- notLikein class- BaseValqueriesQuery<T>
 
- 
freetext- Specified by:
- freetextin interface- ValqueriesQuery<T>
- Specified by:
- freetextin class- BaseValqueriesQuery<T>
 
- 
gtpublic <X extends Comparable<? super X>> ValqueriesQuery<T> gt(Property.PropertyValue<X> propertyValue) - Specified by:
- gtin interface- CrudRepository.InlineQuery<T,- ValqueriesQuery<T>> 
 
- 
gtepublic <X extends Comparable<? super X>> ValqueriesQuery<T> gte(Property.PropertyValue<X> propertyValue) - Specified by:
- gtein interface- CrudRepository.InlineQuery<T,- ValqueriesQuery<T>> 
 
- 
ltpublic <X extends Comparable<? super X>> ValqueriesQuery<T> lt(Property.PropertyValue<X> propertyValue) - Specified by:
- ltin interface- CrudRepository.InlineQuery<T,- ValqueriesQuery<T>> 
 
- 
ltepublic <X extends Comparable<? super X>> ValqueriesQuery<T> lte(Property.PropertyValue<X> propertyValue) - Specified by:
- ltein interface- CrudRepository.InlineQuery<T,- ValqueriesQuery<T>> 
 
- 
subQuerypublic <X,Z extends CrudRepository.InlineQuery<X, ValqueriesQuery<T> subQueryZ>> (RelationDescriber relation, Consumer<Z> consumer) - Specified by:
- subQueryin interface- CrudRepository.InlineQuery<T,- ValqueriesQuery<T>> 
 
- 
isNull- Specified by:
- isNullin interface- CrudRepository.InlineQuery<T,- ValqueriesQuery<T>> 
 
- 
isNotNull- Specified by:
- isNotNullin interface- ValqueriesQuery<T>
- Specified by:
- isNotNullin class- BaseValqueriesQuery<T>
 
- 
buildSimpleSelectSql
- 
getTableName
- 
withEager- Specified by:
- withEagerin interface- CrudRepository.InlineQuery<T,- ValqueriesQuery<T>> 
 
- 
sortAscending- Specified by:
- sortAscendingin interface- CrudRepository.InlineQuery<T,- ValqueriesQuery<T>> 
 
- 
sortDescending- Specified by:
- sortDescendingin interface- CrudRepository.InlineQuery<T,- ValqueriesQuery<T>> 
 
- 
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,- ValqueriesQuery<T>> 
- 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,- ValqueriesQuery<T>> 
- Parameters:
- limit- the number of rows to return
- Returns:
- the query, for chaining
- See Also:
 
- 
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,- ValqueriesQuery<T>> 
- Returns:
- a Streamof the results
 
- 
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,- ValqueriesQuery<T>> 
- Returns:
- the number of rows that match the query
 
- 
distinct- Specified by:
- distinctin interface- CrudRepository.InlineQuery<T,- ValqueriesQuery<T>> 
 
- 
selectField- Specified by:
- selectFieldin interface- CrudRepository.InlineQuery<T,- ValqueriesQuery<T>> 
 
- 
executeSqlAndGetSingleColumn
- 
count- Specified by:
- countin class- BaseValqueriesQuery<T>
 
- 
sum- Specified by:
- sumin class- BaseValqueriesQuery<T>
 
- 
max- Specified by:
- maxin class- BaseValqueriesQuery<T>
 
- 
min- Specified by:
- minin class- BaseValqueriesQuery<T>
 
- 
concat- Specified by:
- concatin class- BaseValqueriesQuery<T>
 
- 
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,- ValqueriesQuery<T>> 
- Returns:
- a CrudRepository.CrudUpdateResultwith the number of rows affected
- See Also:
 
- 
groupByExecuteDescription copied from interface:ValqueriesGroupQueryExecute the query.- Specified by:
- groupByExecutein interface- ValqueriesGroupQuery<T>
- Returns:
- A stream of rows, each containing the values of the fields that were grouped by and the values of the aggregations, both in the same order they were queried.
 
- 
set
- 
closepublic void close()- Specified by:
- closein interface- AutoCloseable
 
- 
update- Specified by:
- updatein interface- ValqueriesQuery<T>
 
- 
getTableAlias
- 
setEmptypublic void setEmpty()
 
-